2020-02-08 07:07:59 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
die(const char *s)
|
|
|
|
{
|
2020-02-08 07:44:33 +00:00
|
|
|
/*
|
|
|
|
* 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);
|
|
|
|
|
2020-02-08 07:07:59 +00:00
|
|
|
perror(s);
|
|
|
|
exit(1);
|
|
|
|
}
|