repo.or.cz
/
syslinux.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
hdt: Removing builting sleep support in say
[syslinux.git]
/
com32
/
lib
/
fgetc.c
blob
b48e147b19cbf6bf29cfb093c4a14c9565c8bb0d
1
/*
2
* fgetc.c
3
*
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
*/
8
9
#include <stdio.h>
10
#include <unistd.h>
11
#include <stdlib.h>
12
#include <errno.h>
13
14
int
fgetc
(
FILE
*
f
)
15
{
16
unsigned char
ch
;
17
18
return
(
_fread
(&
ch
,
1
,
f
) ==
1
) ? (
int
)
ch
:
EOF
;
19
}