source:
trunk/sys/dietlibc/ungetc.c
@
170
Last change on this file since 170 was 1, checked in by , 8 years ago | |
---|---|
File size: 326 bytes |
Rev | Line | |
---|---|---|
[1] | 1 | #include "dietstdio.h" |
2 | ||
3 | int ungetc_unlocked(int c, FILE *stream) { | |
4 | if (stream->ungotten || c<0 || c>255) | |
5 | return EOF; | |
6 | stream->ungotten=1; | |
7 | stream->ungetbuf=(unsigned char)c; | |
8 | stream->flags&=~(ERRORINDICATOR|EOFINDICATOR); | |
9 | return c; | |
10 | } | |
11 | ||
12 | int ungetc(int c, FILE *stream) __attribute__((weak,alias("ungetc_unlocked"))); |
Note: See TracBrowser
for help on using the repository browser.