Annotation of researchv10no/ncurses/screen/_ll_move.c, revision 1.1.1.1

1.1       root        1: /*     @(#) _ll_move.c: 1.1 10/15/83   (1.9    10/27/82)       */
                      2: 
                      3: #include "curses.ext"
                      4: 
                      5: extern struct  line    *_line_alloc();
                      6: 
                      7: /*
                      8:  * _ll_move positions the cursor at position (row,col)
                      9:  * in the virtual screen
                     10:  */
                     11: _ll_move (row, col)
                     12: register int row, col; 
                     13: {
                     14:        register struct line *p;
                     15:        register int l;
                     16:        register chtype *b1, *b2;
                     17:        register int rp1 = row+1;
                     18: 
                     19: #ifdef DEBUG
                     20:        if(outf) fprintf(outf, "_ll_move(%d, %d)\n", row, col);
                     21: #endif
                     22:        if (SP->virt_y >= 0 && (p=SP->std_body[SP->virt_y+1]) &&
                     23:                p->length < SP->virt_x)
                     24:                p->length = SP->virt_x >= columns ? columns : SP->virt_x;
                     25:        SP->virt_x = col;
                     26:        SP->virt_y = row;
                     27:        if (row < 0 || col < 0)
                     28:                return;
                     29:        if (!SP->std_body[rp1] || SP->std_body[rp1] == SP->cur_body[rp1]) {
                     30:                p = _line_alloc ();
                     31:                if (SP->cur_body[rp1]) {
                     32:                        p->length = l = SP->cur_body[rp1]->length;
                     33:                        b1 = &(p->body[0]);
                     34:                        b2 = &(SP->cur_body[rp1]->body[0]);
                     35:                        for ( ; l>0; l--)
                     36:                                *b1++ = *b2++;
                     37:                }
                     38:                SP->std_body[rp1] = p;
                     39:        }
                     40:        p = SP->std_body[rp1];
                     41:        p -> hash = 0;
                     42:        while (p -> length < col)
                     43:                p -> body[p -> length++] = ' ';
                     44:        SP->curptr = &(SP->std_body[rp1] -> body[col]);
                     45: }

unix.superglobalmegacorp.com

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