]> pd.if.org Git - pdclib/blob - functions/stdio/ferror.c
7ca531ed441bb00eec8b35e59370b6928f7aa798
[pdclib] / functions / stdio / ferror.c
1 /* $Id$ */
2
3 /* ferror( 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
13 int ferror( struct _PDCLIB_file_t * stream )
14 {
15     return stream->status & _PDCLIB_ERRORFLAG;
16 }
17
18 #endif
19
20 #ifdef TEST
21 #include <_PDCLIB_test.h>
22
23 int main( void )
24 {
25     /* Testing covered by clearerr(). */
26     return TEST_RESULTS;
27 }
28
29 #endif
30