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)
printeaster(y, flag_julian_cal, flag_orthodox);
else {
int key;
initscr();
if (flag_backward)
monthrangeb(y, m, flag_julian_day, before, after, highlightdate);
else
monthranger(y, m, flag_julian_day, before, after, highlightdate);
getch();
noecho();
do {
clear();
if (flag_backward)
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);
}