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

7
util.c
View File

@@ -5,6 +5,13 @@
void
die(const char *s)
{
/*
* NOTE(kyle): this is a duplication of the code in display.c
* but I would like to be able to import these files from there.
*/
write(STDOUT_FILENO, "\x1b[2J", 4);
write(STDOUT_FILENO, "\x1b[H", 3);
perror(s);
exit(1);
}