Lines Matching refs:stream
35 rpl_fflush (FILE *stream)
40 /* When stream is NULL, POSIX and C99 only require flushing of "output
44 When stream is "an output stream or an update stream in which the most
48 When stream is, however, an input stream or an update stream in
50 and POSIX only specifies behavior if the stream is seekable.
53 (stream) is lost. We don't want to call the implementation's
56 We test ! freading (stream) here, rather than fwriting (stream), because
57 what we need to know is whether the stream holds a "read buffer", and on
59 if (stream == NULL || ! freading (stream))
60 return fflush (stream);
65 pos = ftello (stream);
72 /* To get here, we must be flushing a seekable input stream, so the
75 result = fpurge (stream);
85 int saved_flags = stream->_flags & (__SOPT | __SNPT);
86 stream->_flags = (stream->_flags & ~__SOPT) | __SNPT;
88 result = fseeko (stream, pos, SEEK_SET);
90 stream->_flags = (stream->_flags & ~(__SOPT | __SNPT)) | saved_flags;
96 pos = lseek (fileno (stream), pos, SEEK_SET);
100 in the stream. */
102 stream->_offset = pos;
103 stream->_flags |= __SOFF;