Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site ulowell.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!wanginst!wang!ulowell!rimbold From: rimbold@ulowell.UUCP (Rob Rimbold) Newsgroups: net.lang.c Subject: VAX C help Message-ID: <157@ulowell.UUCP> Date: Mon, 13-Jan-86 20:42:26 EST Article-I.D.: ulowell.157 Posted: Mon Jan 13 20:42:26 1986 Date-Received: Wed, 15-Jan-86 01:36:00 EST Distribution: net Organization: University of Lowell Lines: 36 While writing a program that does a lot of file I/O, I have come across a few problems. I am writing integers to a file as integers using "%d" and fprintf. I open the file using "r+". I would like to keep track increment or simply change the integer that is already recorded in the file. My problem is that when rewinding to the beginning of the file and re-writing another integer the following things occur: 1. If the integer previously in the file is a single digit, only a single digit may be written over it, the same thing goes for double or triple digit integers. 2. If I attempt to 'reopen' the file and write into it with "w" or "w+" access, and use the same file (i.e. same version all the time.), it won't let me. Same goes for the close-and-open ploy. 3. If I close the file, and reopen it with "r+", I still am unable to modify it past the number of digits that already exist there. I don't get errors for any of this, simply nothing happens. Also, how does one go about deleting a file using VAX C? I was unable to figure it out. It seems that almost every function is listed as 'not provided' in the back of the manual. I am getting desperate. It seems that workarounds are ever so necessary when using this cruddy compiler. ANY ideas or suggestions would be most appreciated. Of course, snippets of code for examples are EVEN more welcome. 'Rob -- -> Rob Rimbold "But running in parallel is more fun!" UUCP : decvax!wanginst!ulowell!rimbold ARPA : rimbold@ulowell.CSNET AT&T : (617) 452-5000 x2233