-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvt100.h
69 lines (55 loc) · 1.89 KB
/
vt100.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#pragma once
#include <sdkddkver.h>
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN10)
#define VT100_ESC "\x1b["
// #define VT100_ESCAPE "\x1b["
#define VT100_CLS VT100_ESC "2J"
#define VT100_RESET VT100_ESC "0m"
#define VT100_BOLD_FG VT100_ESC "1m"
#define VT100_ULINE VT100_ESC "4m"
#define VT100_ULINE_OFF VT100_ESC "24m"
#define VT100_COLOR_SWAP VT100_ESC "7m"
#define VT100_FG_RED VT100_ESC "31m"
#define VT100_FG_GREEN VT100_ESC "32m"
#define VT100_FG_YELLOW VT100_ESC "33m"
#define VT100_FG_BLUE VT100_ESC "34m"
#define VT100_FG_CYAN VT100_ESC "36m"
#define VT100_FG_WHITE VT100_ESC "37m"
#define VT100_FG_RED_BOLD VT100_BOLD_FG VT100_FG_RED
#define VT100_FG_GREEN_BOLD VT100_BOLD_FG VT100_FG_GREEN
#define VT100_FG_YELLOW_BOLD VT100_BOLD_FG VT100_FG_YELLOW
#define VT100_FG_BLUE_BOLD VT100_BOLD_FG VT100_FG_BLUE
#define VT100_FG_CYAN_BOLD VT100_BOLD_FG VT100_FG_CYAN
#define VT100_FG_WHITE_BOLD VT100_BOLD_FG VT100_FG_WHITE
#define VT100_BG_BLACK VT100_ESC "40m"
#define VT100_BG_RED VT100_ESC "41m"
#define VT100_BG_GREEN VT100_ESC "42m"
#define VT100_BG_YELLOW VT100_ESC "43m"
#define VT100_BG_BLUE VT100_ESC "44m"
#else // ! (_WIN32_WINNT >= _WIN32_WINNT_WIN10)
#define VT100_ESC ""
// #define VT100_ESCAPE "\x1b["
#define VT100_CLS ""
#define VT100_RESET ""
#define VT100_BOLD_FG ""
#define VT100_ULINE ""
#define VT100_ULINE_OFF ""
#define VT100_COLOR_SWAP ""
#define VT100_FG_RED ""
#define VT100_FG_GREEN ""
#define VT100_FG_YELLOW ""
#define VT100_FG_BLUE ""
#define VT100_FG_CYAN ""
#define VT100_FG_WHITE ""
#define VT100_FG_RED_BOLD ""
#define VT100_FG_GREEN_BOLD ""
#define VT100_FG_YELLOW_BOLD ""
#define VT100_FG_BLUE_BOLD ""
#define VT100_FG_CYAN_BOLD ""
#define VT100_FG_WHITE_BOLD ""
#define VT100_BG_BLACK ""
#define VT100_BG_RED ""
#define VT100_BG_GREEN ""
#define VT100_BG_YELLOW ""
#define VT100_BG_BLUE ""
#endif // ! (_WIN32_WINNT >= _WIN32_WINNT_WIN10)