4 * (C) Copyright 1998, 2002 Ullrich von Bassewitz (uz@cc65.org)
17 /*****************************************************************************/
19 /*****************************************************************************/
23 int __fastcall__ fgetc (register FILE* f)
27 /* Check if the file is open or if there is an error condition */
28 if ((f->f_flags & _FOPEN) == 0 || (f->f_flags & (_FERROR | _FEOF)) != 0) {
32 /* If we have a pushed back character, return it */
33 if (f->f_flags & _FPUSHBACK) {
34 f->f_flags &= ~_FPUSHBACK;
39 switch (read (f->f_fd, &c, 1)) {
43 f->f_flags |= _FERROR;