blob: 133e9282099620a2adb5309777484bcc3c5a9e92 (
plain)
1
2
3
4
5
6
7
8
9
10
|
#include "dietstdio.h"
int ungetc(int c, FILE *stream) {
if (stream->ungotten || c<0 || c>255)
return EOF;
stream->ungotten=1;
stream->ungetbuf=(unsigned char)c;
stream->flags&=~(ERRORINDICATOR|EOFINDICATOR);
return c;
}
|