Xref: utzoo comp.lang.c:31923 comp.sys.ibm.pc.misc:1771 Path: utzoo!attcan!uunet!world!decwrl!ucbvax!janus.Berkeley.EDU!brand From: brand@janus.Berkeley.EDU (Graham Brand) Newsgroups: comp.lang.c,comp.sys.ibm.pc.misc Subject: Turbo C, fopen(), fprintf() and ^Z - I need help!! Message-ID: <38742@ucbvax.BERKELEY.EDU> Date: 18 Sep 90 06:53:46 GMT Sender: usenet@ucbvax.BERKELEY.EDU Reply-To: brand@janus.Berkeley.EDU Lines: 16 I should like some help with a simple problem in Turbo C. I have a C program which I have been running on UNIX with no problem. I am trying to port it to Turbo C 2.0 running on my '386 under MSDOS (V3.3) but am having a strange problem. The program opens files for appending data using the: fopen(fp,filename,"a") construction and writes the data with the usual fprintf(fp,"%s ...%d\n",.....) instruction. The problem that I am having is that the line that is appended in the file is preceeded with a ^Z which makes the data invisible when a type command is issued from MSDOS. I can use vi and edit the file to remove the ^Z but don't want to have to do that every time. Can someone explain what is going on and propose a fix? Thanks in advance, Graham Brand (brand@janus.berkeley.edu)