andy@mks.UUCP (Andy Toy) (08/12/89)
In article <380@wjh12.harvard.edu> djb@wjh12.UUCP (David J. Birnbaum) writes: >I looked for an MS-DOS implemen- >tation and tried the one in picnix31, but it includes the EOF >character and I am unable to concatenate text files and then look >at them without tripping over the embedded control-Z. There doesn't >seem to be a switch that would concatenate text files and dump the >extra control-Zs (retaining the one at the end of the last file, of >course). Why, oh why, do programmes insist on putting ^Z in files? ^Z is just another character and it could be in files for real. There is absolutely no reason to have ^Z in MS-DOS files because there no requirement for a MS-DOS file to end in ^Z. The actual size of the files is stored elsewhere. It is a real ascii code and and should not be thrown away and it should not be tossed in unless it's part of the file. Help stomp out putting ^Z at the end of files indiscrimimently and preserve the friendly ^Z that is supposed to be in the file. And be sure not use software that pads the whole last block with ^Zs (shudder)! Well, there, I got it out of my system :-) -- Andy Toy, Mortice Kern Systems Inc., Internet: andy@mks.com 35 King Street North, Waterloo, UUCP: uunet!watmath!mks!andy Ontario, CANADA N2J 2W9 Phone: 519/884-2251 FAX: 519/884-8861
ho@fergvax.unl.edu (Tiny Bubbles...) (08/14/89)
From article <1436@mks.UUCP>, by andy@mks.UUCP (Andy Toy): > Help stomp out putting ^Z at the end of files indiscrimimently and > preserve the friendly ^Z that is supposed to be in the file. And be > sure not use software that pads the whole last block with ^Zs (shudder)! So much for Xmodem and Ymodem. Glad I use Zmodem. What does Kermit the Frog do? Boo! (See last post for why Boo is there. :-) ) --- ... Michael Ho, University of Nebraska <ho@fergvax.unl.edu>
sue@gtx.com (Sue Miller) (08/14/89)
In article <1436@mks.UUCP> andy@mks.waterloo.edu (Andy Toy) writes: >Why, oh why, do programmes insist on putting ^Z in files? ^Z is just >another character and it could be in files for real. There is >absolutely no reason to have ^Z in MS-DOS files because there no >requirement for a MS-DOS file to end in ^Z. The actual size of >the files is stored elsewhere. I have always rather fuzzily assumed that ^Z was a requirement for MS-DOS 1.0 or so. Is this true? I have then further assumed that it is a vestigial leftover that many developers have preserved Just In Case that there may still be some people who are still using that antique OS. The reason I assume that MS-DOS 1.0 might have used ^Z is because I remember that CP/M used it, and MS-DOS is quite heavily based on CP/M. My next question is: Why the heck was ^Z used for EOF? That seems a very strange choice. -- listen: there's a hell of a good universe next door; let's go. __________________________________ ee cummings |Sue Miller ...!sun!sunburn!gtx!sue|
johnl@esegue.uucp (John Levine) (08/15/89)
In article <1129@gtx.com> sue@gtx.UUCP (Sue Miller) writes: >In article <1436@mks.UUCP> andy@mks.waterloo.edu (Andy Toy) writes: >>Why, oh why, do programmes insist on putting ^Z in files? ... > ... >The reason I assume that MS-DOS 1.0 might have used ^Z is because I >remember that CP/M used it, and MS-DOS is quite heavily based on CP/M. >My next question is: Why the heck was ^Z used for EOF? That seems a very >strange choice. CP/M stored files as a set of 128 byte records (which usually corresponded directly to 128 byte floppy disk blocks) and the ^Z was important because there was no other way to tell where in the last block the text ended. MS-DOS has aways kept an actual file length in the directory, so there has never been a compelling reason for DOS programs to use ^Z. An uncompelling reason is that many early DOS programs were translated more or less mechanically from CP/M and so padded files out to a multiple of 128 and put in the ^Z, just like they did on CP/M. DOS 1.x was a direct clone of CP/M, and legend says that IBM required that it be "100% compatible with CP/M-80," even though nobody knew what that meant on the 8088, which of course can't run any kind of 8080 code, CP/M or otherwise. One presumes that an IBMer asked whether it was 100% compatible, and Bill Gates said yes, thereby making himself a billion dollars. If you're wondering why ^Z, it's because PDP-10 TOPS-10, from which CP/M borrowed much of its interface style, used it to signal EOF from the keyboard, and occasionally in old programs as an end of text indicator in a file. -- John R. Levine, Segue Software, POB 349, Cambridge MA 02238, +1 617 492 3869 {ima|lotus}!esegue!johnl, johnl@ima.isc.com, Levine@YALE.something Massachusetts has 64 licensed drivers who are over 100 years old. -The Globe