1 /* Copyright (c) 1979 Regents of the University of California */ 2 3 static char sccsid[] = "@(#)UNSYNC.c 1.1 10/30/80"; 4 5 #include "h00vars.h" 6 #include "h01errs.h" 7 8 /* 9 * push back last char read to prepare for formatted read 10 */ 11 UNSYNC(curfile) 12 13 register struct iorec *curfile; 14 { 15 if (curfile->funit & FWRITE) { 16 ERROR(EREADIT, curfile->pfname); 17 return; 18 } 19 if ((curfile->funit & SYNC) == 0) { 20 ungetc(*curfile->fileptr, curfile->fbuf); 21 } 22 } 23