ASCII mode FTP (was RE: Fw: error)
Jay R. Ashworth
jra at baylink.com
Fri Jan 12 09:57:11 PST 2007
On Fri, Jan 12, 2007 at 12:16:55PM -0500, Kenneth Brody wrote:
> > Ctrl-Z's *actually in files* were the result of programmers who didn't
> > understand the spec.
>
> No, Ctrl-Z's in files were a necessity back in CP/M and MS-DOS 1.0, as
> all files were multiples of 128 bytes. The only way to know where the
> "real" end of a text file belonged was to pad the remaining bytes in
> the file with Ctrl-Z's. Even when MS-DOS 2.0 added arbitrarily-sized
> files, it was still common to append a single Ctrl-Z to the end of a
> text stream.
Ok. DOS 1.0 actually predates me; I was still dealing mostly with
TRS-DOS in that time frame. Oh, and Xenix.
> in Ctrl-Z. When you open a file in text mode, MSVC's runtime library
> reads the last character in the file, and if it's a Ctrl-Z it will
> truncate that last byte off of the file. (I ran into this one a while
> back with filePro. Some legacy code within filePro would open screens
> in default [text] mode, and then switch them to binary mode. This was
> necessary long ago due to some limits in the DOS C compiler which
> wouldn't allow us to open a shared file in binary mode -- long story,
> but that description should suffice for now. If you happened to be
> using bright-green-on-blue text on your filePro screens, the file
> would shrink by one byte every time you accessed it -- even if you
> weren't updating it in dscreen.)
Eeek!
Cheers,
-- jra
--
Jay R. Ashworth jra at baylink.com
Designer Baylink RFC 2100
Ashworth & Associates The Things I Think '87 e24
St Petersburg FL USA http://baylink.pitas.com +1 727 647 1274
More information about the Filepro-list
mailing list