MushOS
0.1
A UNIX-like OS prototype, written from scratch
Loading...
Searching...
No Matches
stdio.h
1
#ifndef MUSHLIB_STDIO_H
2
#define MUSHLIB_STDIO_H
3
4
#include "generic.h"
5
#include "string.h"
6
#include "syscall.h"
7
8
9
typedef
enum
{
10
BLACK = 0u,
11
LOW_BLUE = 1u,
12
LOW_GREEN = 2u,
13
LOW_CYAN = 3u,
14
LOW_RED = 4u,
15
LOW_MAGENTA = 5u,
16
BROWN = 6u,
17
LIGHT_GRAY = 7u,
18
DARK_GRAY = 8u,
19
HIGH_BLUE = 9u,
20
HIGH_GREEN = 10u,
21
HIGH_CYAN = 11u,
22
HIGH_RED = 12u,
23
HIGH_MAGENTA = 13u,
24
YELLOW = 14u,
25
WHITE = 15u
26
} console_color;
27
28
#define print_formatted(font, back, temp, args...) {\
29
mod_string formatted = format(temp, ## args);\
30
call_system(48, 5, 2, formatted, font, back, 0);\
31
unalloc(formatted);\
32
}
33
34
#define bad(temp, args...) print_formatted(HIGH_RED, BLACK, temp, ## args)
35
#define warn(temp, args...) print_formatted(YELLOW, BLACK, temp, ## args)
36
#define good(temp, args...) print_formatted(HIGH_GREEN, BLACK, temp, ## args)
37
#define info(temp, args...) print_formatted(HIGH_BLUE, BLACK, temp, ## args)
38
#define plain(temp, args...) print_formatted(LIGHT_GRAY, BLACK, temp, ## args)
39
40
#endif
// MUSHLIB_STDIO_H
lib
base
stdio.h
Generated on Sun Jan 29 2023 13:48:02 for MushOS by
1.9.5