[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nmh-workers] fseek(fp, 0, SEEK_CUR)?
From: |
Tom Lane |
Subject: |
Re: [Nmh-workers] fseek(fp, 0, SEEK_CUR)? |
Date: |
Tue, 15 Jan 2013 20:07:20 -0500 |
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] fseek(fp, 0, SEEK_CUR)?, David Levine, 2013/01/14
- Re: [Nmh-workers] fseek(fp, 0, SEEK_CUR)?, David Levine, 2013/01/14
- Re: [Nmh-workers] fseek(fp, 0, SEEK_CUR)?, David Levine, 2013/01/15
- Re: [Nmh-workers] fseek(fp, 0, SEEK_CUR)?, David Levine, 2013/01/15