From fa40f30b4253b1e05c46cc5e0c111176825b7623 Mon Sep 17 00:00:00 2001 From: Mystery Man Date: Wed, 29 Oct 2003 16:07:11 +0000 Subject: This commit was manufactured by cvs2svn to create tag 'Corpo_2_1_1'. --- mdk-stage1/dietlibc/libstdio/fgetc.c | 40 ------------------------------------ 1 file changed, 40 deletions(-) delete mode 100644 mdk-stage1/dietlibc/libstdio/fgetc.c (limited to 'mdk-stage1/dietlibc/libstdio/fgetc.c') diff --git a/mdk-stage1/dietlibc/libstdio/fgetc.c b/mdk-stage1/dietlibc/libstdio/fgetc.c deleted file mode 100644 index 90d83961a..000000000 --- a/mdk-stage1/dietlibc/libstdio/fgetc.c +++ /dev/null @@ -1,40 +0,0 @@ -#include "dietstdio.h" -#include - -extern int feof(FILE *stream); - -int fgetc(FILE *stream) { - unsigned char c; -#ifdef WANT_UNGETC - if (stream->ungotten) { - stream->ungotten=0; - return stream->ungetbuf; - } -#endif - if (feof(stream)) - return EOF; -#ifdef WANT_BUFFERED_STDIO - if (__fflush4(stream,BUFINPUT)) return EOF; - if (stream->bm>=stream->bs) { - int len=read(stream->fd,stream->buf,BUFSIZE); - if (len==0) { - stream->flags|=EOFINDICATOR; - return EOF; - } else if (len<0) { - stream->flags|=ERRORINDICATOR; - return EOF; - } - stream->bm=0; - stream->bs=len; - } - c=stream->buf[stream->bm]; - ++stream->bm; - return c; -#else - if (read(stream->fd,&c,1)!=1) { - stream->flags|=ERRORINDICATOR; - return EOF; - } - return c; -#endif -} -- cgit v1.2.1