1
0

__overflow.c 241 B

12345678910
  1. #include "stdio_impl.h"
  2. int __overflow(FILE *f, int _c)
  3. {
  4. unsigned char c = _c;
  5. if (!f->wend && __towrite(f)) return EOF;
  6. if (f->wpos != f->wend && c != f->lbf) return *f->wpos++ = c;
  7. if (f->write(f, &c, 1)!=1) return EOF;
  8. return c;
  9. }