update for HEAD-2003091401
[reactos.git] / lib / crtdll / io / eof.c
1 #include <windows.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 }