1: # include   "curses.ext"
   2: 
   3: /*
   4:  *	This routine erases everything on the window.
   5:  *
   6:  * 1/26/81 (Berkeley) @(#)clrtobot.c	1.1
   7:  */
   8: wclrtobot(win)
   9: reg WINDOW  *win; {
  10: 
  11:     reg int     y;
  12:     reg char    *sp, *end, *maxx;
  13:     reg int     startx, minx;
  14: 
  15:     startx = win->_curx;
  16:     for (y = win->_cury; y < win->_maxy; y++) {
  17:         minx = _NOCHANGE;
  18:         end = &win->_y[y][win->_maxx];
  19:         for (sp = &win->_y[y][startx]; sp < end; sp++)
  20:             if (*sp != ' ') {
  21:                 maxx = sp;
  22:                 if (minx == _NOCHANGE)
  23:                     minx = sp - win->_y[y];
  24:                 *sp = ' ';
  25:             }
  26:         if (minx != _NOCHANGE) {
  27:             if (win->_firstch[y] > minx
  28:                  || win->_firstch[y] == _NOCHANGE)
  29:                 win->_firstch[y] = minx;
  30:             if (win->_lastch[y] < maxx - win->_y[y])
  31:                 win->_lastch[y] = maxx - win->_y[y];
  32:         }
  33:         startx = 0;
  34:     }
  35:     win->_curx = win->_cury = 0;
  36: }

Defined functions

wclrtobot defined in line 8; used 2 times
Last modified: 1983-05-18
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 607
Valid CSS Valid XHTML 1.0 Strict