reorganising and screen clearing and whatnot

This commit is contained in:
2020-02-07 23:44:33 -08:00
parent ee653ade34
commit 7e837ca751
6 changed files with 116 additions and 36 deletions

View File

@@ -5,6 +5,9 @@
#include "util.h"
#define ESCSEQ "\x1b["
static struct termios entry_term;
@@ -68,3 +71,11 @@ setup_terminal()
atexit(disable_termraw);
enable_termraw();
}
void
display_clear()
{
write(STDOUT_FILENO, ESCSEQ "2J", 4);
write(STDOUT_FILENO, ESCSEQ "H", 3);
}