|
|
1.1 ! root 1: /* @(#) _scrollf.c: 1.1 10/15/83 (1.21 2/11/83) */ ! 2: ! 3: #include "curses.ext" ! 4: ! 5: extern int _outch(); ! 6: ! 7: /* ! 8: * Scroll the terminal forward n lines, bringing up blank lines from bottom. ! 9: * This only affects the current scrolling region. ! 10: */ ! 11: _scrollf(n) ! 12: int n; ! 13: { ! 14: register int i; ! 15: ! 16: if( scroll_forward ) ! 17: { ! 18: _setwind(); ! 19: _pos( SP->des_bot_mgn, 0 ); ! 20: for( i=0; i<n; i++ ) ! 21: { ! 22: tputs(scroll_forward, 1, _outch); ! 23: } ! 24: SP->ml_above += n; ! 25: if( SP->ml_above + lines > lines_of_memory ) ! 26: { ! 27: SP->ml_above = lines_of_memory - lines; ! 28: } ! 29: } ! 30: else ! 31: { ! 32: /* If terminal can't do it, try delete line. */ ! 33: _pos(0, 0); ! 34: _dellines(n); ! 35: } ! 36: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.