Rev 647 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 647 | Rev 6433 | ||
---|---|---|---|
1 | #include |
1 | #include |
2 | int fsetpos(FILE* file,const fpos_t * pos) |
2 | int fsetpos(FILE* file,const fpos_t * pos) |
3 | { |
3 | { |
- | 4 | if(!file || !pos) |
|
- | 5 | { |
|
- | 6 | errno = E_INVALIDPTR; |
|
- | 7 | return errno; |
|
- | 8 | } |
|
- | 9 | ||
4 | if (*pos>=0) |
10 | if (*pos>=0) |
5 | { |
11 | { |
6 | file->filepos=*pos; |
12 | file->filepos=*pos; |
7 | return 0; |
13 | return 0; |
8 | } |
14 | } |
9 | else |
15 | else |
10 | return EOF; |
16 | return EOF; |
11 | } |
17 | } |