5 This file is part of the Public Domain C Library (PDCLib).
6 Permission is granted to use, modify, and / or redistribute at will.
12 #include <_PDCLIB_io.h>
14 int fgetc_unlocked( FILE * stream )
16 if ( _PDCLIB_prepread( stream ) == EOF )
23 size_t n = _PDCLIB_getchars( &c, 1, EOF, stream );
25 return n == 0 ? EOF : (unsigned char) c;
28 int fgetc( FILE * stream )
31 int c = fgetc_unlocked( stream );
32 funlockfile( stream );
39 #include <_PDCLIB_test.h>
43 /* Testing covered by ftell.c */