Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!bfmny0!tneff From: tneff@bfmny0.UUCP (Tom Neff) Newsgroups: comp.lang.c Subject: Re: binary data files Summary: know thy DOS Message-ID: <14301@bfmny0.UUCP> Date: 3 May 89 14:50:58 GMT References: <10946@bloom-beacon.MIT.EDU> <12546@ut-emx.UUCP> <8758@csli.Stanford.EDU> <11021@bloom-beacon.MIT.EDU> Reply-To: tneff@bfmny0.UUCP (Tom Neff) Organization: ^ Lines: 19 In article <11021@bloom-beacon.MIT.EDU> scs@adam.pika.mit.edu (Steve Summit) writes: >Actually, this illustrates another thing it's worth shying away >from if you can. The assumption that you can determine, without >actually reading them, exactly how many characters a file >contains, can get you in to trouble, although of course it's a >perfectly valid assumption on Unix systems. Not so on VMS and >MS-DOS and doubtless other lesser systems -- stat() or the ^^^^^^ >equivalent may only give you an approximation. MS-DOS has exact filesizes in bytes, and a standard OS call to retrieve a file's size in bytes. The poster may have been thinking of CP/M, but CP/M is not MS-DOS. -- Tom Neff UUCP: ...!uunet!bfmny0!tneff "Truisms aren't everything." Internet: tneff@bfmny0.UU.NET