putchar.c (246B)
1 #include <stdio.h> 2 3 #ifdef __is_libk 4 #include <kernel/tty.h> 5 #endif 6 7 int putchar(int ic) { 8 #ifdef __is_libk 9 char c = (char) ic; 10 term_write(&c, sizeof(c)); 11 #else 12 /* TODO: Implement write system call to do this part */ 13 #endif 14 15 return ic; 16 }