Xref: utzoo comp.os.msdos.programmer:2648 comp.lang.c:35021 Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!zaphod.mps.ohio-state.edu!rpi!uupsi!sunic!fuug!news.funet.fi!tukki.jyu.fi!jyu.fi!otto From: otto@tukki.jyu.fi (Otto J. Makela) Newsgroups: comp.os.msdos.programmer,comp.lang.c Subject: Re: Turbo C and ^Z's Message-ID: Date: 4 Jan 91 10:54:49 GMT References: <10251@hydra.Helsinki.FI> Sender: news@tukki.jyu.fi (News articles) Followup-To: comp.os.msdos.programmer Organization: Turing Police, Criminal AI section Lines: 14 In-Reply-To: wirzeniu@cs.Helsinki.FI's message of 3 Jan 91 17:54:57 GMT Nntp-Posting-Host: jyu.fi In article <10251@hydra.Helsinki.FI> wirzeniu@cs.Helsinki.FI (Lars Wirzenius) writes: In article otto@tukki.jyu.fi (Otto J. Makela) writes: > if(f=fopen(filename,"a+b")) { "a" means that all writes happen at the end of the file, use "r+b" instead. ALL WRITES ? Come on, the first thing I do after that is to seek the file... I'd like to point out I can't use "r+b", 'cause it'll fail if the file does not exist beforehand. -- /* * * Otto J. Makela * * * * * * * * * * * * * * * * * * */ /* Phone: +358 41 613 847, BBS: +358 41 211 562 (CCITT, Bell 24/12/300) */ /* Mail: Kauppakatu 1 B 18, SF-40100 Jyvaskyla, Finland, EUROPE */ /* * * Computers Rule 01001111 01001011 * * * * * * * * * * * * * * * * */