1: # include   "curses.ext"
   2: 
   3: /*
   4:  *	This routine draws a box around the given window with "vert"
   5:  * as the vertical delimiting char, and "hor", as the horizontal one.
   6:  *
   7:  * 2/16/82 (Berkeley) @(#)box.c	1.2
   8:  */
   9: box(win, vert, hor)
  10: reg WINDOW  *win;
  11: char        vert, hor; {
  12: 
  13:     reg int     i;
  14:     reg int     endy, endx;
  15:     reg char    *fp, *lp;
  16: 
  17:     endx = win->_maxx;
  18:     endy = win->_maxy - 1;
  19:     fp = win->_y[0];
  20:     lp = win->_y[endy];
  21:     for (i = 0; i < endx; i++)
  22:         fp[i] = lp[i] = hor;
  23:     endx--;
  24:     for (i = 0; i <= endy; i++)
  25:         win->_y[i][0] = (win->_y[i][endx] = vert);
  26:     if (!win->_scroll && (win->_flags&_SCROLLWIN))
  27:         fp[0] = fp[endx] = lp[0] = lp[endx] = ' ';
  28:     touchwin(win);
  29: }

Defined functions

box defined in line 9; never used
Last modified: 1983-05-18
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 555
Valid CSS Valid XHTML 1.0 Strict