redrawing on ncurses
- by John C
I'm trying to redraw the content of a simple loop. So far it prints out to the stdscr 100 lines, and then by using scrl to scroll n lines I get n blank rows.
What I want is to keep with the sequence. However, I'm not sure how to redraw the stdscr with the n extra lines. Any ideas will be appreciate it!
#include <ncurses.h>
int main(void)
{
initscr();
int maxy,maxx,y;
getmaxyx(stdscr,maxy,maxx);
scrollok(stdscr,TRUE);
for(y=0;y<=100;y++)
mvprintw(y,0,"This is some text written to line %d.",y);
refresh();
getch();
scrl(5);
refresh();
getch();
endwin();
return(0);
}