[comp.unix.questions] Possible bug in fopen

mrapple@quack.UUCP (Nick Sayer) (09/13/89)

I have a very old unix version 7 system with an excruciating
problem.

When I use fopen with a mode of "w+", it doesn't work properly.
I find I can write to the file alright, but fseek won't work,
and reading results in reading data from the end of the file
(usually the last line of the file repeated ad nauseum).

This has made installing atob/btoa difficult (I had to completely
close the temporary file and reopen it for reading to get around the
problem), and vnews impossible.  However, trivialized test cases work
perfectly.

Is anyone aware of any fopen bugs in unix version 7? I have included
the boot/copyright screen:

68000 UNIX for the MOMENTUM 32 Series
    Release 2.2   September 22, 1983

        (C) Copyright 1981 - Unisoft Corporation.
        (C) Copyright 1983 - Momentum Computer Systems International.

I know it's ancient, but it's all I've got...

---------------------------------------------------------------------
Nick Sayer | ...{ lll-winken!cheers ucdavis!uop } !quack!mrapple
.... or.... cheers!quack!mrapple@apple.com or quack!mrapple@uop.edu
Packet radio: N6QQQ @ WB6V | FredMail: NSAYER@MADERA%NORCAL
Disclaimer: The BBC would like to appologise for that announcement