aboutsummaryrefslogtreecommitdiff
path: root/lib/aec/aec.c
blob: 92a1f0838b0972c860e9e569bcd09ae0b777e491 (plain)
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
#include "aec.h"

#include "../io/io.h"

#define csi() wstd("\033[");

void sgr(const char *attrs)
{
	csi();
	wstd(attrs);
	wstd("m");
}


void foreground(const char *code)
{
	csi();
	wstd("3");
	wstd(code);
	wstd("m");
}


void background(const char *code)
{
	csi();
	wstd("4");
	wstd(code);
	wstd("m");
}

#ifdef AEC_UNIT_TEST

int main() {
	sgr(SGR_BOLD);
	wstd("Hallo");
	sgr(SGR_RESET);
	wstd("Welt\n");
}

#endif