]> pd.if.org Git - pdclib/blob - functions/stdio/feof.c
PDCLib includes with quotes, not <>.
[pdclib] / functions / stdio / feof.c
1 /* feof( FILE * )
2
3    This file is part of the Public Domain C Library (PDCLib).
4    Permission is granted to use, modify, and / or redistribute at will.
5 */
6
7 #include <stdio.h>
8
9 #ifndef REGTEST
10 #include "_PDCLIB_io.h"
11
12 int _PDCLIB_feof_unlocked( FILE * stream )
13 {
14     return stream->status & _PDCLIB_EOFFLAG;
15 }
16
17 int feof( FILE * stream )
18 {
19     _PDCLIB_flockfile( stream );
20     int eof = _PDCLIB_feof_unlocked( stream );
21     _PDCLIB_funlockfile( stream );
22     return eof;
23 }
24
25 #endif
26
27 #ifdef TEST
28 #include "_PDCLIB_test.h"
29
30 int main( void )
31 {
32     /* Testing covered by clearerr(). */
33     return TEST_RESULTS;
34 }
35
36 #endif
37