1: # include "ciodec.c" 2: cflush (fn) 3: int fn; 4: { 5: struct fileps *fp; 6: if (nargs() != 1) 7: IEHzap("cflush"); 8: if (fn < 0 || fn >15) return; 9: fp = &IEH3fpts[fn]; 10: if (fp->nchars > 0 && fp->wrflag >= 2) 11: { 12: write (fn, fp->buff,fp->nchars); 13: fp->bptr = fp->buff; 14: fp -> nchars = fp->eoferr = 0; 15: } 16: if (fp->wrflag == 1) 17: seek(fn, -(fp->nchars),1); 18: return; 19: }