nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] fseek(fp, 0, SEEK_CUR)?

2013-01-15 19:07:29
I wrote:
If it is read/write, I seem to recall that fseek is advised when
switching between read and write modes.

Here's a more precise statement from an old HPUX fopen() man page:

     When a file is opened for update, both input and output can be done on
     the resulting stream.  However, output cannot be directly followed by
     input without an intervening call to fflush() or to a file positioning
     function (fseek(), fsetpos(), or rewind()), and input cannot be
     directly followed by output without an intervening call to a file
     positioning function unless the input operation encounters end-of-
     file.

                        regards, tom lane

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>