Back to index

tetex-bin  3.0
Functions
lib_clrbot.c File Reference
#include <curses.priv.h>

Go to the source code of this file.

Functions

 wclrtobot (WINDOW *win)

Function Documentation

wclrtobot ( WINDOW win)

Definition at line 46 of file lib_clrbot.c.

{
    int code = ERR;

    T((T_CALLED("wclrtobot(%p)"), win));

    if (win) {
       NCURSES_SIZE_T y;
       NCURSES_SIZE_T startx = win->_curx;
       NCURSES_CH_T blank = win->_nc_bkgd;

       T(("clearing from y = %d to y = %d with maxx =  %d",
          win->_cury, win->_maxy, win->_maxx));

       for (y = win->_cury; y <= win->_maxy; y++) {
           struct ldat *line = &(win->_line[y]);
           NCURSES_CH_T *ptr = &(line->text[startx]);
           NCURSES_CH_T *end = &(line->text[win->_maxx]);

           CHANGED_TO_EOL(line, startx, win->_maxx);

           while (ptr <= end)
              *ptr++ = blank;

           startx = 0;
       }
       _nc_synchook(win);
       code = OK;
    }
    returnCode(code);
}

Here is the call graph for this function: