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