Subversion Repositories Kolibri OS

Rev

Rev 6412 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
647 andrew_pro 1
#include 
2
int fseek(FILE* file,long offset,int origin)
3
{
6412 siemargl 4
    fpos_t pos;
6433 siemargl 5
    if(!file)
6
    {
7
        errno = E_INVALIDPTR;
8
        return errno;
9
    }
10
 
647 andrew_pro 11
	if (origin==SEEK_CUR)
12
		offset+=file->filepos;
13
	else if (origin==SEEK_END)
14
		offset+=file->filesize;
15
	else if (origin!=SEEK_SET)
16
		return EOF;
6412 siemargl 17
	pos = offset;
6433 siemargl 18
	return fsetpos(file, &pos);
19
}