|
|
1.1 ! root 1: /********************************************************************* ! 2: * COPYRIGHT NOTICE * ! 3: ********************************************************************** ! 4: * This software is copyright (C) 1982 by Pavel Curtis * ! 5: * * ! 6: * Permission is granted to reproduce and distribute * ! 7: * this file by any means so long as no fee is charged * ! 8: * above a nominal handling fee and so long as this * ! 9: * notice is always included in the copies. * ! 10: * * ! 11: * Other rights are reserved except as explicitly granted * ! 12: * by written permission of the author. * ! 13: * Pavel Curtis * ! 14: * Computer Science Dept. * ! 15: * 405 Upson Hall * ! 16: * Cornell University * ! 17: * Ithaca, NY 14853 * ! 18: * * ! 19: * Ph- (607) 256-4934 * ! 20: * * ! 21: * Pavel.Cornell@Udel-Relay (ARPAnet) * ! 22: * decvax!cornell!pavel (UUCPnet) * ! 23: *********************************************************************/ ! 24: ! 25: /* ! 26: ** lib_box.c ! 27: ** ! 28: ** The routine box(). ! 29: ** ! 30: ** $Log: lib_box.c,v $ ! 31: * Revision 1.11 93/04/12 14:13:22 bin ! 32: * Udo: third color update ! 33: * ! 34: * Revision 1.5 92/06/02 12:04:59 bin ! 35: * *** empty log message *** ! 36: * ! 37: * Revision 1.2 92/04/13 14:37:07 bin ! 38: * update by vlad ! 39: * ! 40: * Revision 2.2 91/04/20 18:02:49 munk ! 41: * Usage of register variables ! 42: * ! 43: * Revision 2.1 82/10/25 14:46:31 pavel ! 44: * Added Copyright Notice ! 45: * ! 46: * Revision 2.0 82/10/24 15:20:07 pavel ! 47: * Beta-one Test Release ! 48: * ! 49: ** ! 50: */ ! 51: ! 52: #ifdef RCSHDR ! 53: static char RCSid[] = ! 54: "$Header: /src386/usr/lib/ncurses/RCS/lib_box.c,v 1.11 93/04/12 14:13:22 bin Exp Locker: bin $"; ! 55: #endif ! 56: ! 57: #include "curses.h" ! 58: #include "curses.priv.h" ! 59: ! 60: ! 61: box(win, vert, hor) ! 62: register WINDOW *win; ! 63: char vert, hor; ! 64: { ! 65: register int i; ! 66: int endy, endx; ! 67: chtype *fp, *lp; ! 68: ! 69: #ifdef TRACE ! 70: if (_tracing) ! 71: _tracef("box(%o,%c,%c) called", win, vert, hor); ! 72: #endif ! 73: ! 74: endx = win->_maxx; ! 75: endy = win->_maxy; ! 76: ! 77: fp = win->_line[0]; ! 78: lp = win->_line[endy]; ! 79: ! 80: for (i = 0; i <= endx; i++) ! 81: fp[i] = lp[i] = hor; ! 82: ! 83: for (i = 0; i <= endy; i++) { ! 84: win->_line[i][0] = win->_line[i][endx] = vert; ! 85: win->_firstchar[i] = 0; ! 86: win->_lastchar[i] = endx; ! 87: win->_numchngd[i] += 2; ! 88: } ! 89: ! 90: win->_numchngd[0] = win->_numchngd[endy] = endx; ! 91: ! 92: if (! win->_scroll && (win->_flags & _SCROLLWIN)) ! 93: fp[0] = fp[endx] = lp[0] = lp[endx] = ' '; ! 94: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.