Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!yale!husc6!spdcc!ima!haddock!karl From: karl@haddock.ima.isc.com (Karl Heuer) Newsgroups: comp.lang.c Subject: Re: Turbo C, fopen(), fprintf() and ^Z - I need help!! Message-ID: <18103@haddock.ima.isc.com> Date: 22 Sep 90 00:28:10 GMT References: <38742@ucbvax.BERKELEY.EDU> <14084@mentor.cc.purdue.edu> <1990Sep20.014132.29461@druid.uucp> Reply-To: karl@haddock.ima.isc.com (Karl Heuer) Organization: Interactive Systems, Cambridge, MA 02138-5302 Lines: 10 In article otto@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@kelp.ima.isc.com or ima!kelp!karl), The Walking Lint