Rev 4509 | Rev 4512 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4509 | Rev 4511 | ||
---|---|---|---|
Line 345... | Line 345... | ||
345 | } |
345 | } |
346 | 346 | ||
347 | int fgetc(FILE *stream) |
347 | int fgetc(FILE *stream) |
348 | { |
348 | { |
349 | char c; |
349 | char c; |
- | 350 | ||
- | 351 | /* This could be made faster by only flushing when needed. */ |
|
- | 352 | if (stdout) fflush(stdout); |
|
- | 353 | if (stderr) fflush(stderr); |
|
350 | 354 | ||
351 | if (fread(&c, sizeof(char), 1, stream) < sizeof(char)) |
355 | if (fread(&c, sizeof(char), 1, stream) < sizeof(char)) |
352 | return EOF; |
356 | return EOF; |
353 | 357 | ||
354 | return (int) c; |
358 | return (int) c; |
355 | } |
359 | } |