r+ on fopen.

gwyn%brl-vld at sri-unix.UUCP gwyn%brl-vld at sri-unix.UUCP
Thu Sep 15 23:04:13 AEST 1983


From:      Doug Gwyn (VLD/VMB) <gwyn at brl-vld>

Your anonymous hacker should read the manual; there is nothing wrong
with fopen( , "r+" ).

"When a file is opened for update, both input and output may be done
on the resulting stream.  However, output may not be directly followed
by input without an intervening fseek or rewind, and input may not be
directly followed by output without an intervening fseek, rewind, or an
input operation which encounters end-of-file."



More information about the Comp.unix.wizards mailing list