1: /*
   2:  * Copyright (c) 1980 Regents of the University of California.
   3:  * All rights reserved.  The Berkeley software License Agreement
   4:  * specifies the terms and conditions for redistribution.
   5:  */
   6: 
   7: #ifndef lint
   8: static char sccsid[] = "@(#)box.c	5.1 (Berkeley) 6/7/85";
   9: #endif not lint
  10: 
  11: # include   "curses.ext"
  12: 
  13: /*
  14:  *	This routine draws a box around the given window with "vert"
  15:  * as the vertical delimiting char, and "hor", as the horizontal one.
  16:  *
  17:  */
  18: box(win, vert, hor)
  19: reg WINDOW  *win;
  20: char        vert, hor; {
  21: 
  22:     reg int     i;
  23:     reg int     endy, endx;
  24:     reg char    *fp, *lp;
  25: 
  26:     endx = win->_maxx;
  27:     endy = win->_maxy - 1;
  28:     fp = win->_y[0];
  29:     lp = win->_y[endy];
  30:     for (i = 0; i < endx; i++)
  31:         fp[i] = lp[i] = hor;
  32:     endx--;
  33:     for (i = 0; i <= endy; i++)
  34:         win->_y[i][0] = (win->_y[i][endx] = vert);
  35:     if (!win->_scroll && (win->_flags&_SCROLLWIN))
  36:         fp[0] = fp[endx] = lp[0] = lp[endx] = ' ';
  37:     touchwin(win);
  38: }

Defined functions

Defined variables

sccsid defined in line 8; never used
Last modified: 1985-06-07
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 727
Valid CSS Valid XHTML 1.0 Strict