Path: utzoo!attcan!uunet!yale!husc6!wjh12!lotto From: lotto@wjh12.harvard.edu (Jerry Lotto) Newsgroups: comp.sys.ibm.pc Subject: Re: more details on microsoft c file io bug Message-ID: <232@wjh12.harvard.edu> Date: 17 Jun 88 13:12:00 GMT References: <1327@spdcc.COM> Reply-To: lotto@wjh12.UUCP (Jerry Lotto) Distribution: na Organization: Harvard Univ. Chem. Dept. Lines: 22 In article <1327@spdcc.COM> eli@spdcc.UUCP (Steve Elias) writes: >From: Gary Ross >the file read operation does not appear to work correctly. More specifically >I have a file of a given size (according to several different utilities that >I have used) and when I try to read it with my c program it craps out half >way through the file and is unable to find the rest of the data. How was this file opened? uSoft C treats files opened as ASCII in cruel and unusual ways. Expanding CR-LF and Treating character data ^Z as EOF are features of 'read'ing a file opened as ASCII. Actually MS-DOS programs in general are often guilty of ignoring directory size entries completely. Dump the file and look for a ^Z or open it as binary data, and your problem has a reasonable chance of disappearing. -- Gerald Lotto - Harvard Chemistry Dept. UUCP: {seismo,harpo,ihnp4,linus,allegra,ut-sally}!harvard!lotto ARPA: lotto@harvard.harvard.edu