develooper Front page | perl.perl5.porters | Postings from November 2000

Re: What was it layers were for again ?

Thread Previous | Thread Next
Nick Ing-Simmons
November 28, 2000 13:22
Re: What was it layers were for again ?
Message ID:
Bart Schuller <> writes:
>On Tue, Nov 28, 2000 at 04:09:30PM +0000, Nick Ing-Simmons wrote:
>> (One grumbling alligator - on Win32 "text mode" files not only do CRLF->'\n'
>> but also treat ^Z as end-of-file - I have ignored ^Z so far - suggestions
>> as to what the "right" thing to do would be wellcome.)
>I'd love to hear from people/programs who actually use this "feature".

They don't know they are using it...

>And wasn't it really DOS or even an ancestor of that that used it last?

CP/M did not store the file length in the directory just a sector count. 
The ^Z allowed you to have files which were not a multiple of sector size. 
DOS (even with 12-bit FAT) has always allowed binary files on floppies.

>Are there functions in the Win32 API that will write a ^Z in textmode?

fclose() will write one depending on the "mode". I have no idea what happens
if user-code writes one - I expect it just goes through.

Nick Ing-Simmons

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About