Commit | Line | Data |
---|---|---|
8512671a LM |
1 | #ifndef __COLOR_H__ |
2 | #define __COLOR_H__ | |
3 | ||
4 | #include "stdio.h" | |
5 | ||
6 | typedef enum { | |
7 | FG_DEFAULT = 0x00, | |
8 | FG_BLACK = 0x01, | |
9 | FG_RED = 0x02, | |
10 | FG_GREEN = 0x03, | |
11 | FG_YELLOW = 0x04, | |
12 | FG_BLUE = 0x05, | |
13 | FG_MAGENTA = 0x06, | |
14 | FG_CYAN = 0x07, | |
15 | FG_WHITE = 0x08, | |
16 | FG_BRIGHT = 0x80, | |
17 | FG_MASK = 0x7F, | |
18 | ||
19 | BG_DEFAULT = 0x0000, | |
20 | BG_BLACK = 0x0100, | |
21 | BG_RED = 0x0200, | |
22 | BG_GREEN = 0x0300, | |
23 | BG_YELLOW = 0x0400, | |
24 | BG_BLUE = 0x0500, | |
25 | BG_MAGENTA = 0x0600, | |
26 | BG_CYAN = 0x0700, | |
27 | BG_WHITE = 0x0800, | |
28 | BG_BRIGHT = 0x8000, | |
29 | BG_MASK = 0x7F00, | |
30 | ||
31 | UNDERLINE = 0x10000, | |
32 | ||
33 | COLOR_DEFAULT = FG_DEFAULT | BG_DEFAULT | |
34 | } color_e; | |
35 | ||
36 | /* Set text color, COLOR_DEFAULT will revert to default setting */ | |
37 | void color_set (FILE *fid, color_e color); | |
38 | ||
39 | #endif /* __COLOR_H__ */ | |
40 | ||
41 | /* vim: set ts=4 sw=4 et: */ |