Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!snorkelwacker!spdcc!merk!alliant!linus!linus!mwunix.mitre.org!jcmorris From: jcmorris@mwunix.mitre.org (Joe Morris) Newsgroups: comp.os.msdos.programmer Subject: Re: Help. End of Diskette VS EOF Message-ID: <116585@linus.mitre.org> Date: 9 Aug 90 15:32:36 GMT References: <1990Aug9.004845.16663@sun.soe.clarkson.edu> Sender: usenet@linus.mitre.org Reply-To: jcmorris@mwunix.mitre.org (Joe Morris) Organization: The Mitre Corporation Lines: 20 In a recent article levericw@clutx.clarkson.edu (Allanon) writes: >I would like to know if a C program will return different error codes if >it reaches the end of a file or reaches the end of a diskette, are these >two things the same or can I tell them apart. Unless the application which writes the file leaves some out-of-band information about the ending status, there is no way to distinguish the cases. By definition a file ends when the forward pointer in the FAT is the EOF flag, and DOS does not define the concept of a multi-volume file. One could probably be devised which would provide a multiplex interrupt hook to let the writing program mark EOV instead of EOF, and let the reader know which one terminated the read, but there's nothing there now. (Microsoft, are you reading this?) Programs like BACKUP have a separate file for the out-of-band signals such as disk number and EOF/EOV status. DOS has nothing to do with the ability of these programs to carry large files across multiple volumes. For your particular application what is needed is a special dump/restore type of program. There's gotta be someone who has written such a beastie...