1 /* _PDCLIB_fillbuffer( struct _PDCLIB_file_t * 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
12 int _PDCLIB_fillbuffer( struct _PDCLIB_file_t * stream )
\r
15 bool ok = stream->ops->read( stream->handle, stream->buffer, stream->bufsize,
\r
19 if( bytesRead == 0 ) {
\r
20 stream->status |= _PDCLIB_EOFFLAG;
\r
23 stream->pos.offset += bytesRead;
\r
24 stream->bufend = bytesRead;
\r
28 stream->status |= _PDCLIB_ERRORFLAG;
\r
36 #include <_PDCLIB_test.h>
\r
40 /* Testing covered by ftell.c */
\r
41 return TEST_RESULTS;
\r