1: # include "ciodec.c" 2: ungetc (c, fn) 3: { 4: struct fileps *fp; 5: if (nargs() != 2) 6: IEHzap("ungetc"); 7: /* push back onto input */ 8: fp = &IEH3fpts[fn]; 9: if (fp->wrflag == 0) 10: IEH3mbuf(fn,0); 11: if (fp->bptr <= fp->buff - 100) 12: IEH3err("ungetc/unprintf: buffer full file %d",fn); 13: *--fp->bptr = c; 14: fp->nchars++; 15: }