Article View: pdx.utek
Article #12Re: stdio bug in UTek 4.0?
From: Bill Trost
Date: Thu, 31 Dec 1992 00:05
Date: Thu, 31 Dec 1992 00:05
15 lines
1232 bytes
1232 bytes
In article <TROST.92Dec30133811@ogicse.cse.ogi.edu> trost@ogicse.cse.ogi.edu (Bill Trost) writes: while ((*s++ = getc(fp)) != EOL && !EOF) No, the code isn't really that bad. I didn't have it in front of me at the time of posting, so I just sketched it -- poorly. Anyhow, given a few helpful mail responses to the problem, I was lead to trace the problem to a read of the file after EOF had already been see, putting the FILE into an error state. The workaround, alas, is not to prevent a read past EOF, but to check ferror sooner...ag. Anyhow, thanks to one and all for the help! -- Bill Trost <trost@cse.ogi.edu> Space is nature's way of keeping everything from happening all in one spot.
Technical Details
Message-ID:
<TROST.92Dec30160537@ogicse.cse.ogi.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!ogicse!newsserver.cse.ogi.edu!trostReferences:
<TROST.92Dec30133811@ogicse.cse.ogi.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!ogicse!newsserver.cse.ogi.edu!trost From: trost@ogicse.cse.ogi.edu (Bill Trost) Newsgroups: pdx.utek Subject: Re: stdio bug in UTek 4.0? Message-ID: <TROST.92Dec30160537@ogicse.cse.ogi.edu> Date: 31 Dec 92 00:05:39 GMT Article-I.D.: ogicse.TROST.92Dec30160537 References: <TROST.92Dec30133811@ogicse.cse.ogi.edu> Sender: news@ogicse.ogi.edu Organization: Oregon Graduate Institute, Beaverton, OR Lines: 15 In-reply-to: trost@ogicse.cse.ogi.edu's message of 30 Dec 92 21:38:12 GMT