Annotation of 43BSD/usr.lib/libcurses/scroll.c, revision 1.1

1.1     ! root        1: /*
        !             2:  * Copyright (c) 1980 Regents of the University of California.
        !             3:  * All rights reserved.  The Berkeley software License Agreement
        !             4:  * specifies the terms and conditions for redistribution.
        !             5:  */
        !             6: 
        !             7: #ifndef lint
        !             8: static char sccsid[] = "@(#)scroll.c   5.1 (Berkeley) 6/7/85";
        !             9: #endif not lint
        !            10: 
        !            11: # include      "curses.ext"
        !            12: 
        !            13: /*
        !            14:  *     This routine scrolls the window up a line.
        !            15:  *
        !            16:  */
        !            17: scroll(win)
        !            18: register  WINDOW       *win;
        !            19: {
        !            20:        register int    oy, ox;
        !            21: 
        !            22: # ifdef DEBUG
        !            23:        fprintf(outf, "SCROLL(%0.2o)\n", win);
        !            24: # endif
        !            25: 
        !            26:        if (!win->_scroll)
        !            27:                return ERR;
        !            28: 
        !            29:        getyx(win, oy, ox);
        !            30:        wmove(win, 0, 0);
        !            31:        wdeleteln(win);
        !            32:        wmove(win, oy, ox);
        !            33: 
        !            34:        if (win == curscr) {
        !            35:                _putchar('\n');
        !            36:                if (!NONL)
        !            37:                        win->_curx = 0;
        !            38: # ifdef DEBUG
        !            39:                fprintf(outf, "SCROLL: win == curscr\n");
        !            40: # endif
        !            41:        }
        !            42: }

unix.superglobalmegacorp.com

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