5 This file is part of the Public Domain C Library (PDCLib).
6 Permission is granted to use, modify, and / or redistribute at will.
13 #include <_PDCLIB_glue.h>
15 int fgetc_unlocked( struct _PDCLIB_file_t * stream )
17 if ( _PDCLIB_prepread( stream ) == EOF )
24 size_t n = _PDCLIB_getchars( &c, 1, EOF, stream );
26 return n == 0 ? EOF : (unsigned char) c;
29 int fgetc( struct _PDCLIB_file_t * stream )
32 int c = fgetc_unlocked( stream );
33 funlockfile( stream );
40 #include <_PDCLIB_test.h>
44 /* Testing covered by ftell.c */