Files
photon/libc/stdio/fputc.c

14 lines
184 B
C
Raw Normal View History

2020-04-03 19:21:22 +01:00
#include <stdio.h>
#include <__fio.h>
2020-07-07 18:53:54 +01:00
int fputc(int c, FILE *fp)
2020-04-03 19:21:22 +01:00
{
2020-07-08 15:18:16 +01:00
char ch = c;
__fio_write(fp, &ch, 1);
2020-04-03 19:21:22 +01:00
if (__fio_error(fp)) {
return EOF;
}
return c;
}