summaryrefslogtreecommitdiffstats
path: root/source/term.h
diff options
context:
space:
mode:
authorLibravatar bigfoot547 <[email protected]>2026-06-27 22:53:26 -0500
committerLibravatar bigfoot547 <[email protected]>2026-06-27 22:53:26 -0500
commit40724faccacf055cd9f9bba4615b9f930be9b76b (patch)
tree8df1806ef766f14a935e98ad1a04e47714f5f858 /source/term.h
initial commit
Diffstat (limited to 'source/term.h')
-rw-r--r--source/term.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/term.h b/source/term.h
new file mode 100644
index 0000000..cc65615
--- /dev/null
+++ b/source/term.h
@@ -0,0 +1,13 @@
+#ifndef EXITEST_TERM_H_INCLUDED
+#define EXITEST_TERM_H_INCLUDED
+
+#include "macros.h"
+
+#define TERM_ESC "\x1b"
+#define TERM_CSI(_s) TERM_ESC "[" _s
+#define TERM_CLEAR TERM_CSI("2J")
+#define TERM_CLEARLINE TERM_CSI("2K")
+#define TERM_CUR_POS(_row, _col) TERM_CSI(STR(_row) ";" STR(_col) "f")
+#define TERM_CUR_UP(_rows) TERM_CSI(STR(_rows) "A")
+
+#endif /* include guard */