Path: utzoo!attcan!uunet!lll-winken!decwrl!shlump.nac.dec.com!engage.enet.dec.com!oldtmr!wallace From: wallace@oldtmr.dec.com (Ray Wallace) Newsgroups: comp.lang.c Subject: Re: append mode ("a") query Message-ID: <1490@engage.enet.dec.com> Date: 13 Feb 90 19:13:30 GMT Sender: news@engage.enet.dec.com Organization: Digital Equipment Corporation Lines: 20 In article <4983.25d7e9db@uwovax.uwo.ca>, chet@uwovax.uwo.ca writes... >(i.e. the 2nd ten lines are inserted before the EOF mark), but program B >positions its appends after the EOF mark (so that they don't appear when >the file is typed out)? And what I can do to fix B. This happens on It looks to me like you need to add the line fprintf(fp, "%s\n", entry); to your add_subentry() function, and remove the fprintf() from the end of your main() function. As it was posted program B only writes to the file once, at the end of main() it writes out your "semantic_field". --- Ray Wallace (INTERNET,UUCP) wallace@oldtmr.enet.dec.com (UUCP) ...!decwrl!oldtmr.enet!wallace (INTERNET) wallace%oldtmr.enet@decwrl.dec.com ---