From: Daniel Kelley Date: 2003-09-20T11:41:38+09:00 Subject: Re: Trouble with binary files? >>>>> "Hal" == Hal Fulton writes: Hal> Steven Jenkins wrote: >> Hal Fulton wrote: >>> True, but let's be fair. >>> >>> MSDOS stole many things from Unix, such as the notion of a >>> hierarchical directory structure and the use of < > | at the >>> shell level. (Many things were incompletely stolen, >>> unfortunately.) >>> >>> The binmode/textmode distinction came from Unix. At that time >>> Unix had an EOF character of control-D (which explains the ^D >>> we still type occasionally at the terminal). >> >> >> No. Unix never distinguished between text and binary >> files. Unix did (and does) interpret ASCII EOT (ctrl-d) as an >> end-of-input indicator for terminal devices, but it never used >> any in-band character to mark the end of a file. The EOT never >> got past the terminal driver, and was never delivered to an >> application. Hal> If Unix never distinguished between text and binary files, Hal> what was the binary mode flag for? I recall that the whole ^Z terminator from CP/M and the fact that file sizes were always multiples of 128 bytes (saving 7 bits in a size field being important at the time), so a text file needed a special character to mark the end of the text. MSDOS carried that "tradition" on, to ease porting of CP/M applications to DOS, and, well, saving bits was important at that time, at least it *seemed* to be important! d.k. -- Daniel Kelley - San Jose, CA For email, replace the first dot in the domain with an at.