blob: 94531fcf41e29b51de3ef7151f6b3990f184b8a0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#include <stdio.h>
#include "_assert.h"
#include "_stdio.h"
/** test for end-of-file **/
int feof(FILE *stream)
{
ASSERT_NONNULL(stream);
flockfile(stream);
if (stream->eof) {
return 1;
}
/* TODO */
/* system level test */
funlockfile(stream);
/*
RETURN(0, the end-of-file indicator is not set);
RETURN(NONZERO, the end-of-file indicator is set);
*/
return stream->eof;
}
/***
tests for the end-of-file indicator of ARGUMENT(stream).
***/
/*
STDC(1)
*/
|