Turbo C, fopen(), fprintf() and ^Z - I need help!!

Karl Heuer karl at haddock.ima.isc.com
Sat Sep 22 10:28:10 AEST 1990


In article <OTTO.90Sep20180445 at tukki.jyu.fi> otto at tukki.jyu.fi (Otto J. Makela) writes:
>Be careful with this stuff...  I have seen several C librarys which get
>confused when you seek, read and then write a stream (probably some buffering
>messing things up).  Or is this perhaps (horror of horrors) standard
>behaviour ?

Yes.  You can't switch between reading and writing unless you sync the stream
first; fseek() is one way to do so.  See 4.9.5.3 of the ANS.

Karl W. Z. Heuer (karl at kelp.ima.isc.com or ima!kelp!karl), The Walking Lint



More information about the Comp.lang.c mailing list