Rev 8705 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 8705 | Rev 8730 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | #include |
1 | #include |
Line 2... | Line 2... | ||
2 | 2 | ||
3 | int fgetc(FILE* stream) |
3 | int fgetc(FILE* stream) |
4 | { |
4 | { |
5 | int c=EOF; |
5 | int c=0; |
6 | if(fwrite(&c, sizeof(int), 1, stream)==1){ |
6 | if(fread(&c, sizeof(char), 1, stream)==1){ |
7 | return c; |
7 | return c; |
8 | }else{ |
8 | }else{ |
9 | return EOF; |
9 | return EOF; |
10 | } |
10 | } |