VAX C help

Rob Rimbold rimbold at ulowell.UUCP
Tue Jan 14 11:42:26 AEST 1986

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 Rimbold		"But running in parallel is more fun!"

	UUCP : 	decvax!wanginst!ulowell!rimbold
	ARPA :	rimbold at ulowell.CSNET
	AT&T :	(617) 452-5000 x2233

More information about the Comp.lang.c mailing list