editor/src/main.c
2025-01-14 21:33:23 -05:00

28 lines
381 B
C

#include <unistd.h>
#include "draw.h"
#include "term.h"
editor_t editor;
screen_buffer_t screen_buffer;
int main(void)
{
char c;
setup_terminal();
refresh_screen(); // want to draw first since we're going to be waiting on the read
while (1) {
read(STDIN_FILENO, &c, 1);
if (c == '\004')
break;
refresh_screen();
}
kill_application();
return EXIT_SUCCESS;
}