source: trunk/sys/dietlibc/ungetc.c @ 226

Last change on this file since 226 was 1, checked in by alain, 8 years ago

First import

File size: 326 bytes
Line 
1#include "dietstdio.h"
2
3int 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
12int ungetc(int c, FILE *stream) __attribute__((weak,alias("ungetc_unlocked")));
Note: See TracBrowser for help on using the repository browser.