|
|
1.1 ! root 1: # include "curses.h" ! 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: * 1/26/81 (Berkeley) @(#)box.c 1.1 ! 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: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.