diff options
Diffstat (limited to '')
-rw-r--r-- | kernel/src/print.c (renamed from kernel/src/print/print.c) | 47 |
1 files changed, 1 insertions, 46 deletions
diff --git a/kernel/src/print/print.c b/kernel/src/print.c index 46ec047..12f45de 100644 --- a/kernel/src/print/print.c +++ b/kernel/src/print.c @@ -1,10 +1,9 @@ -#include "tty/color.h" -#include "tty/term.h" #include <stdbool.h> #include <stdint.h> #include <stdlib.h> #include <string.h> #include <print.h> +#include <term.h> void printk(const char *restrict format, ...) { va_list args; @@ -82,47 +81,3 @@ void vprintk(const char *restrict format, va_list args) { void puts(const char *s) { for(; *s; s++) putchar(*s); } - -void printl(enum VGAColor color, const char* msg) { - term_setbg(VGA_BLACK); - term_setfg(VGA_WHITE); - putchar('['); - term_setfg(color); - printk("%s", msg); - term_setfg(VGA_WHITE); - putchar(']'); - putchar(' '); -} - -void _debugk_impl(char *format, ...) { - uint16_t color = term_save_col(); - printl(VGA_LIGHT_CYAN, "LOG"); - va_list args; - va_start(args, format); - vprintk(format, args); - va_end(args); - if (!term_newline()) putchar('\n'); - term_load_col(color); -} - -void _succek_impl(char *format, ...) { - uint16_t color = term_save_col(); - printl(VGA_LIGHT_GREEN, "OK"); - va_list args; - va_start(args, format); - vprintk(format, args); - va_end(args); - if (!term_newline()) putchar('\n'); - term_load_col(color); -} - -void _errork_impl(char *format, ...) { - uint16_t color = term_save_col(); - printl(VGA_LIGHT_RED, "ERR"); - va_list args; - va_start(args, format); - vprintk(format, args); - va_end(args); - if (!term_newline()) putchar('\n'); - term_load_col(color); -} |