Fix: 64-bit compatibility
[AROS.git] / compiler / stdc / ferror.c
blobb587f40da263cabd9ead551e7f6fff709981b867
1 /*
2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 $Id$
5 C99 function ferror().
6 */
7 #include "__stdio.h"
9 /*****************************************************************************
11 NAME */
12 #include <stdio.h>
14 int ferror (
16 /* SYNOPSIS */
17 FILE * stream)
19 /* FUNCTION
20 Test the error flag of a stream. This flag is set automatically by
21 any function that detects an error. To clear it, call clearerr().
23 INPUTS
24 stream - The stream to be tested.
26 RESULT
27 != 0, if the stream had an error, 0 otherwise.
29 NOTES
31 EXAMPLE
33 BUGS
35 SEE ALSO
36 ferror(), clearerr()
38 INTERNALS
40 ******************************************************************************/
42 return (stream->flags & __STDCIO_STDIO_ERROR) != 0;
43 } /* ferror */