/************************************************************* * File: lib/ungetc.c * Purpose: Part of C runtime library * Author: Phil Bunce (pjb@carmel.com) * Revision History: * 970304 Start of revision history */ #include /************************************************************* * ungetc(c,fp) unget a char */ ungetc(c,fp) int c; FILE *fp; { if (c == EOF) return(EOF); fp->ptr--; *fp->ptr = c; fp->cnt++; return(c); }