Annotation of researchv10dc/ncurses/screen/insertln.c, revision 1.1.1.1

1.1       root        1: # include      "curses.ext"
                      2: /*     @(#) insertln.c: 1.1 10/15/83   (1.4    11/18/82)       */
                      3: 
                      4: /*
                      5:  *     This routine performs an insert-line on the _window, leaving
                      6:  * (_cury,_curx) unchanged.
                      7:  *
                      8:  * 4/17/81 (Berkeley) @(#)insertln.c   1.4
                      9:  */
                     10: winsertln(win)
                     11: reg WINDOW     *win; {
                     12: 
                     13:        reg chtype      *temp;
                     14:        reg int         y;
                     15:        reg chtype      *end;
                     16: 
                     17:        temp = win->_y[win->_maxy-1];
                     18:        win->_firstch[win->_cury] = 0;
                     19:        win->_lastch[win->_cury] = win->_maxx - 1;
                     20:        for (y = win->_maxy - 1; y > win->_cury; --y) {
                     21:                win->_y[y] = win->_y[y-1];
                     22:                win->_firstch[y] = 0;
                     23:                win->_lastch[y] = win->_maxx - 1;
                     24:        }
                     25:        for (end = &temp[win->_maxx]; temp < end; )
                     26:                *temp++ = ' ';
                     27:        win->_y[win->_cury] = temp - win->_maxx;
                     28:        if (win->_cury == LINES - 1 && win->_y[LINES-1][COLS-1] != ' ')
                     29:                if (win->_scroll && !(win->_flags&_ISPAD)) {
                     30:                        wrefresh(win);
                     31:                        scroll(win);
                     32:                        win->_cury--;
                     33:                }
                     34:                else
                     35:                        return ERR;
                     36:        return OK;
                     37: }

unix.superglobalmegacorp.com

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