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_io.h>
12 int _PDCLIB_fgetc_unlocked( FILE * stream )
14 if ( _PDCLIB_prepread( stream ) == EOF )
21 size_t n = _PDCLIB_getchars( &c, 1, EOF, stream );
23 return n == 0 ? EOF : (unsigned char) c;
26 int fgetc( FILE * stream )
28 _PDCLIB_flockfile( stream );
29 int c = _PDCLIB_fgetc_unlocked( stream );
30 _PDCLIB_funlockfile( stream );
37 #include <_PDCLIB_test.h>
41 /* Testing covered by ftell.c */