Annotation of 41BSD/lib/libcurses/box.c, revision 1.1.1.1

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: box(win, vert, hor)
                      8: reg WINDOW     *win;
                      9: char           vert, hor; {
                     10: 
                     11:        reg int         i;
                     12:        reg int         endy, endx;
                     13:        reg char        *fp, *lp;
                     14: 
                     15:        endx = win->_maxx;
                     16:        endy = win->_maxy - 1;
                     17:        fp = win->_y[0];
                     18:        lp = win->_y[endy];
                     19:        for (i = 0; i < endx; i++)
                     20:                fp[i] = lp[i] = hor;
                     21:        endx--;
                     22:        for (i = 0; i <= endy; i++)
                     23:                win->_y[i][0] = (win->_y[i][endx] = vert);
                     24:        if (!win->_scroll && (win->_flags&_SCROLLWIN))
                     25:                fp[0] = fp[endx] = lp[0] = lp[endx] = ' ';
                     26:        touchwin(win);
                     27: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.