#include <stdio.h>

/* Mark that a char has been un-gotten by setting the cnt field to
0, and storing a non-EOF char.   Designed from scratch 3/3/90 DB */

ungetc(c, fp)
int c;
FILE *fp;
{
	if (fp->_unget != EOF)
		return(EOF);

	fp->_unget = c & 0377;
	fp->_uncnt = fp->_cnt;
	fp->_cnt = 0;
}
