You could pretty much just replace
with something like
ch = mvgetch(l, c);
BTW, I wouldn't call a variable l (lowercase L). It looks too much like 1 (numerical one).
ch = getch();
/* process ch -- the if(ch...) code */
/* update the screen, including the timer */
Also, the variable i seems to play the same role as the variable c, unless they start at different numbers.
As well, this
is the same as
mvprintw(l, c, " ");
not that it matters too much. But it might be easier to read for this code, for instance:
mvaddch(l, c, ' ');
mvprintw(l, c++, "%c", ch);
See the man page: http://developer.apple.com/documenta...vaddch.3x.html
mvaddch(l, c++, ch);
But work on the critical bugs first.