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