2020-02-08 04:46:43 +00:00
|
|
|
#include <ctype.h>
|
2020-02-08 07:07:59 +00:00
|
|
|
#include <errno.h>
|
2020-02-08 04:46:43 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <termios.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
|
2020-02-08 07:44:33 +00:00
|
|
|
#include "display.h"
|
|
|
|
#include "keys.h"
|
2020-02-08 07:07:59 +00:00
|
|
|
#include "terminal.h"
|
|
|
|
#include "util.h"
|
2020-02-08 04:46:43 +00:00
|
|
|
|
|
|
|
|
2020-02-08 07:07:59 +00:00
|
|
|
void
|
|
|
|
loop()
|
2020-02-08 04:46:43 +00:00
|
|
|
{
|
2020-02-08 07:07:59 +00:00
|
|
|
while (1) {
|
2020-02-08 07:44:33 +00:00
|
|
|
process_keypress();
|
2020-02-08 07:07:59 +00:00
|
|
|
}
|
2020-02-08 04:46:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
main()
|
|
|
|
{
|
2020-02-08 07:07:59 +00:00
|
|
|
setup_terminal();
|
2020-02-08 07:44:33 +00:00
|
|
|
|
|
|
|
display_clear();
|
2020-02-08 07:07:59 +00:00
|
|
|
loop();
|
2020-02-08 04:46:43 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|