meta: move photon/libc to root
This commit is contained in:
13
libc/stdio/fgetc.c
Normal file
13
libc/stdio/fgetc.c
Normal file
@@ -0,0 +1,13 @@
|
||||
#include <stdio.h>
|
||||
#include <__fio.h>
|
||||
|
||||
int fgetc(FILE *fp)
|
||||
{
|
||||
char ch = 0;
|
||||
unsigned int r = __fio_read(fp, &ch, 1);
|
||||
if (r == 0 || __fio_error(fp) || __fio_eof(fp)) {
|
||||
return EOF;
|
||||
}
|
||||
|
||||
return ch;
|
||||
}
|
||||
Reference in New Issue
Block a user