ungetc.c - vx32 - Local 9vx git repository for patches.
(HTM) git clone git://r-36.net/vx32
(DIR) Log
(DIR) Files
(DIR) Refs
---
ungetc.c (213B)
---
1 #include "ioprivate.h"
2
3 int ungetc(int c, FILE *f)
4 {
5 if (c == EOF)
6 return -1;
7 if (f->ipos == 0)
8 return -1;
9 if (f->isstring) {
10 --f->ipos;
11 return c & 0xFF;
12 }
13 f->ibuf[--f->ipos] = c;
14 return c & 0xFF;
15 }