1 /* _PDCLIB_fillbuffer( FILE * stream )
\r
3 This file is part of the Public Domain C Library (PDCLib).
\r
4 Permission is granted to use, modify, and / or redistribute at will.
\r
10 #include <_PDCLIB_glue.h>
\r
11 #include <_PDCLIB_io.h>
\r
13 int _PDCLIB_fillbuffer( FILE * stream )
\r
16 bool ok = stream->ops->read( stream->handle, stream->buffer, stream->bufsize,
\r
20 if( bytesRead == 0 ) {
\r
21 stream->status |= _PDCLIB_EOFFLAG;
\r
24 stream->pos.offset += bytesRead;
\r
25 stream->bufend = bytesRead;
\r
29 stream->status |= _PDCLIB_ERRORFLAG;
\r
37 #include <_PDCLIB_test.h>
\r
41 /* Testing covered by ftell.c */
\r
42 return TEST_RESULTS;
\r