home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
GEMini Atari
/
GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso
/
zip
/
mint
/
mntlib16.lzh
/
MNTLIB16
/
FUNGETC.C
< prev
next >
Wrap
C/C++ Source or Header
|
1993-08-03
|
335b
|
16 lines
/* from dlibs */
#include <stdio.h>
#include <stdlib.h>
int fungetc(c, fp)
int c;
register FILE *fp;
{
if((fp->_flag & (_IOERR | _IOEOF)) /* error or eof */
|| (fp->_ptr <= fp->_base) /* or too many ungets */
|| (c < 0)) /* or trying to unget EOF */
return(EOF);
++(fp->_cnt);
return(*--(fp->_ptr) = c);
}