This repository has been archived on 2024-06-25. You can view files and clone it, but cannot push or open issues or pull requests.
rockOS/libc/stdio/putchar.c

16 lines
265 B
C
Raw Normal View History

2022-07-18 09:59:04 +03:00
#include <stdio.h>
#if defined(__is_libk)
2022-07-20 02:23:23 +03:00
#include <rockos/tty.h>
2022-07-18 09:59:04 +03:00
#endif
int putchar(int ic) {
#if defined(__is_libk)
char c = (char) ic;
terminal_write(&c, sizeof(c));
#else
// TODO: Implement stdio and the write system call.
#endif
return ic;
}