cdbdbf5ebeb973386b5e50f98d01b3faca546ede
[reactos.git] / reactos / lib / crtdll / old cruft / io / eof.c
1 #include <precomp.h>
2 #include <msvcrt/io.h>
3
4 /*
5 * @implemented
6 */
7 int _eof( int _fd )
8 {
9 int cur_pos = _lseek(_fd, 0, SEEK_CUR);
10 int end_pos = _filelength( _fd );
11 if ( cur_pos == -1 || end_pos == -1)
12 return -1;
13
14 if ( cur_pos == end_pos )
15 return 1;
16
17 return 0;
18 }