diff options
| author | Nathan Reiner <nathan@nathanreiner.xyz> | 2022-12-18 23:52:23 +0100 |
|---|---|---|
| committer | Nathan Reiner <nathan@nathanreiner.xyz> | 2022-12-18 23:52:23 +0100 |
| commit | 85139c4208063a911d9ac8c871dc1052d2712c17 (patch) | |
| tree | 4de20c39435a94c24f08d7a777707377c0295a27 /lib/aec/aec.c | |
| parent | e0ec3f0a536fabe0c8c47dd64da77855c0824adc (diff) | |
first idea of ansi escape codes support
Diffstat (limited to 'lib/aec/aec.c')
| -rw-r--r-- | lib/aec/aec.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/aec/aec.c b/lib/aec/aec.c new file mode 100644 index 0000000..d38e8d1 --- /dev/null +++ b/lib/aec/aec.c @@ -0,0 +1,24 @@ +#include "aec.h" + +#include "../io/io.h" + +#define csi() wstd("\033["); + +void sgr(const char *attrs) +{ + csi(); + wstd(attrs); + wstd("m"); +} + + +#ifdef AEC_UNIT_TEST + +int main() { + sgr(SGR_BOLD); + wstd("Hallo"); + sgr(SGR_RESET); + wstd("Welt\n"); +} + +#endif |