git://git.jankratochvil.net
/
reactos.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
33e488f5d5999e311d9b0c546064b39d55fa4249
[reactos.git]
/
lib
/
msvcrt
/
io
/
eof.c
1
//#include <windows.h>
2
#include <msvcrt/io.h>
3
4
/*
5
* @implemented
6
*/
7
int _eof(int _fd)
8
{
9
__int64 cur_pos = _lseeki64(_fd, 0, SEEK_CUR);
10
__int64 end_pos = _lseeki64(_fd, 0, SEEK_END);
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
}