3 /* _PDCLIB_fillbuffer( struct _PDCLIB_file_t * stream )
5 This file is part of the Public Domain C Library (PDCLib).
6 Permission is granted to use, modify, and / or redistribute at will.
9 /* This is a stub version of _PDCLIB_fillbuffer
15 #include <_PDCLIB_glue.h>
19 void _PDCLIB_w32errno(void);
20 int _PDCLIB_fillbuffer( struct _PDCLIB_file_t * stream )
23 BOOL ok = ReadFile( stream->handle, stream->buffer, stream->bufsize,
27 if( nBytesRead == 0 ) {
28 stream->status |= _PDCLIB_EOFFLAG;
31 stream->pos.offset += nBytesRead;
32 stream->bufend = nBytesRead;
37 stream->status |= _PDCLIB_ERRORFLAG;
45 #include <_PDCLIB_test.h>
49 /* Testing covered by ftell.c */