beginning of event loop

This commit is contained in:
Kartik K. Agaram 2022-02-15 17:09:20 -08:00
parent 60ddac472c
commit 28abec85ad
1 changed files with 11 additions and 5 deletions

16
ncal.c
View File

@ -565,12 +565,18 @@ main(int argc, char *argv[])
if (flag_easter) if (flag_easter)
printeaster(y, flag_julian_cal, flag_orthodox); printeaster(y, flag_julian_cal, flag_orthodox);
else { else {
int key;
initscr(); initscr();
if (flag_backward) noecho();
monthrangeb(y, m, flag_julian_day, before, after, highlightdate); do {
else clear();
monthranger(y, m, flag_julian_day, before, after, highlightdate); if (flag_backward)
getch(); monthrangeb(y, m, flag_julian_day, before, after, highlightdate);
else
monthranger(y, m, flag_julian_day, before, after, highlightdate);
key = getch();
} while (key != 'q');
endwin();
} }
return (0); return (0);
} }