home *** CD-ROM | disk | FTP | other *** search
- #include <stdio.h>
- #include <errno.h>
-
- #include <proto/dos.h>
-
- /************************************************************************/
-
- int fgetc(FILE *Stream)
-
- {
- long c;
-
- c=FGetC(Stream->Filehandle);
- if (c==-1)
- {
- long Error;
-
- if ((Error=IoErr()))
- {
- errno=Error;
- Stream->Flags.Error=1;
- }
- else
- {
- Stream->Flags.Eof=1;
- }
- }
- return (int)c;
- }
-