/[mailutils]/mailutils/mailbox/file_stream.c
ViewVC logotype

Diff of /mailutils/mailbox/file_stream.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.27 by gray, Thu Nov 21 13:47:12 2002 UTC revision 1.28 by gray, Fri Nov 29 09:33:31 2002 UTC
# Line 177  static int Line 177  static int
177  _stdin_file_read (stream_t stream, char *optr, size_t osize,  _stdin_file_read (stream_t stream, char *optr, size_t osize,
178                    off_t offset, size_t *pnbytes)                    off_t offset, size_t *pnbytes)
179  {  {
180    int status;    int status = 0;
181    size_t nbytes;    size_t nbytes;
182    struct _file_stream *fs = stream_get_owner (stream);    struct _file_stream *fs = stream_get_owner (stream);
183    int fs_offset = fs->offset;    int fs_offset = fs->offset;
# Line 212  _stdin_file_read (stream_t stream, char Line 212  _stdin_file_read (stream_t stream, char
212        if (status)        if (status)
213          return status;          return status;
214      }      }
215      
216      if (feof (fs->file))
217        nbytes = 0;
218      else
219        {
220    status = _file_read (stream, optr, osize, fs_offset, &nbytes);    status = _file_read (stream, optr, osize, fs_offset, &nbytes);
221    if (status == 0 && nbytes)    if (status == 0 && nbytes)
222      {      {
# Line 222  _stdin_file_read (stream_t stream, char Line 227  _stdin_file_read (stream_t stream, char
227          return status;          return status;
228        if (k != nbytes)        if (k != nbytes)
229          return EIO;          return EIO;
230          }
231      }      }
232    if (pnbytes)    if (pnbytes)
233      *pnbytes = nbytes;      *pnbytes = nbytes;

Legend:
Removed from v.1.27  
changed lines
  Added in v.1.28

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26