summaryrefslogtreecommitdiff
path: root/src/stdio/ferror.c
blob: 1d2fcc8d096dca41a9b8b50b077acadea7f4f994 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <stdio.h>
#include "_stdio.h"

/** tests the file stream error indicator **/

int ferror(FILE *stream)
{
	SIGNAL_SAFE(0);
	ASSERT_STREAM(stream, 0, 0);
	/*
	RETURN(0, the error indicator is not set);
	RETURN(NONZERO, the error indicator is set);
	*/
	return stream->err;
}

/***
tests the error indicator of ARGUMENT(stream).
***/

/*
STDC(1)
*/