summaryrefslogtreecommitdiff
path: root/userland/libc/stdio/fputc.c
diff options
context:
space:
mode:
Diffstat (limited to 'userland/libc/stdio/fputc.c')
-rw-r--r--userland/libc/stdio/fputc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/userland/libc/stdio/fputc.c b/userland/libc/stdio/fputc.c
new file mode 100644
index 0000000..7c8fa7c
--- /dev/null
+++ b/userland/libc/stdio/fputc.c
@@ -0,0 +1,7 @@
+#include <stdio.h>
+
+int fputc(int c, FILE *stream) {
+ if (fwrite(&c, 1, 1, stream) > 0)
+ return c;
+ return EOF;
+}