Source Code File 07-03_clearbot
07-03_clearbot.c
#include <ncurses.h>
int main()
{
int c,y,x,cmax;
initscr();
getmaxyx(stdscr,y,x);
cmax = (x * y) / 5;
for(c=0;c<cmax;c++)
addstr("blah ");
refresh();
getch();
move(5,20); /* Setup the cursor */
clrtobot(); /* Clear to bottom */
refresh();
getch();
endwin();
return 0;
}
Output Screenshot

(Click to view result.)
Notes
* This code is identical to 07-02_clearline.c, save for the clrtobot() statement at Line 17.
Copyright © 1997-2025 by QPBC.
All rights reserved
