summaryrefslogtreecommitdiffstats
path: root/source/term.h
diff options
context:
space:
mode:
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 */