Braindamaged libc.a - Unisoft V7 - fopen() & friends
DoN Nichols
nvt9001 at belvoir-emh3.army.mil
Tue Oct 17 02:04:05 AEST 1989
Help!
I seem to be afflicted with a braindamaged libc.a (or at least
the part which deals with fopen(), fseek(), etc.
hardware: COSMOS CMS/16 (mc68000 based) (maker seems to be
out-of-business - machine came from a hamfest with unix)
OS: UniSoft port of V7 unix (done in 1982 - they say that they
don't even have any backup tapes that old)
I knew that random file updates did not work for me with
fopen()ed files, but worked fine if I used open() and friends, so I just
took the portability hit and stayed with open(), etc.
I have recently been attempting to the bnews working on my
system, and have hit the problem that they make extensive use of
fopen(), fseek(), etc.
I dissassembled the code in fopen(), and discovered that it
didn't even look for the '+' which the man page says may follow 'a',
'r', or 'w'. Thus the file is never opened in update mode, so it is not
surprising that it cannot perform random updates.
OK - so now I re-write fopen() so it does what I believe to be
"the right thing". Still no proper behavior, which implies that perhaps
fseek(), fread(), fwrite(), etc may be also brain-damaged.
I would rather not invest the time required to re-write these
routines if some public-domain or freely-distributable sources already
exist. If so, could you please give me pointers to them. I can't seem
to find anything filling my need from the listings in the simtel20
archives, but I may be missing something.
Also, could someone who still has V7 sources around please look
at the code for fopen() and tell me whether they do actually pay
attention to the '+' parameter as the man page implies. This may have
been braindamaged in all of V7 for all I know.
Thank You all for any help you may give
Donald Nichols (DoN.)
<nvt9001 at belvoir-emh3.army.mil>
P.S. My posting is not from the computer with the problem. It is
*MINE*, this one belongs to uncle, so I must say that any opinions
expressed are mine, and not those of the organization, government,
world, etc.
I may not be able to respond directly to those not on milnet,
arpanet, etc. It seems that more people can send to me than I can send
to. Strange topopoly in the net, isn't it?
More information about the Comp.unix.wizards
mailing list