core: do aligned transfers in bcopy32
[syslinux.git] / com32 / lib / fgetc.c
blob5aa6f76df304018cb11e9c95208e16b65ece6ebe
1 /*
2 * fgetc.c
4 * Extremely slow fgetc implementation, using _fread(). If people
5 * actually need character-oriented input to be fast, we may actually
6 * have to implement buffering. Sigh.
7 */
9 #include <stdio.h>
10 #include <unistd.h>
11 #include <stdlib.h>
12 #include <errno.h>
14 int fgetc(FILE *f)
16 unsigned char ch;
18 return (_fread(&ch, 1, f) == 1) ? (int)ch : EOF;