5 This file is part of the Public Domain C Library (PDCLib).
6 Permission is granted to use, modify, and / or redistribute at will.
11 #include <_PDCLIB_glue.h>
15 int fgetc( struct _PDCLIB_file_t * stream )
17 if ( _PDCLIB_prepread( stream ) == EOF )
21 if ( stream->ungetidx > 0 )
23 return stream->ungetbuf[ --(stream->ungetidx) ];
25 return stream->buffer[stream->bufidx++];
31 #include <_PDCLIB_test.h>
35 /* Testing covered by ftell.c */