Rev 6432 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6432 | Rev 6433 | ||
---|---|---|---|
Line 2... | Line 2... | ||
2 | // non standard realization - no support for virtually change char |
2 | // non standard realization - no support for virtually change char |
3 | int ungetc(int c,FILE* file) |
3 | int ungetc(int c,FILE* file) |
4 | { |
4 | { |
5 | dword res; |
5 | dword res; |
Line -... | Line 6... | ||
- | 6 | ||
- | 7 | if(!file) |
|
- | 8 | { |
|
- | 9 | errno = E_INVALIDPTR; |
|
- | 10 | return EOF; |
|
- | 11 | } |
|
6 | 12 | ||
- | 13 | if ((file->mode & 3!=FILE_OPEN_READ) && (file->mode & FILE_OPEN_PLUS==0)) |
|
- | 14 | { |
|
- | 15 | errno = E_ACCESS; |
|
- | 16 | return EOF; |
|
Line 7... | Line 17... | ||
7 | if ((file->mode & 3!=FILE_OPEN_READ) && (file->mode & FILE_OPEN_PLUS==0)) return EOF; |
17 | } |
8 | 18 | ||
- | 19 | if (file->filepos>file->filesize || file->filepos==0) |
|
9 | if (file->filepos>file->filesize || file->filepos==0) |
20 | { |
10 | { |
21 | errno = E_EOF; |
11 | return EOF; |
22 | return EOF; |
Line 12... | Line 23... | ||
12 | } |
23 | } |