1 # include "curses.ext" 2 3 /* 4 * This routine scrolls the window up a line. 5 * 6 * @(#)scroll.c 1.6 (Berkeley) 05/23/85 7 */ 8 scroll(win) 9 register WINDOW *win; 10 { 11 register int oy, ox; 12 13 # ifdef DEBUG 14 fprintf(outf, "SCROLL(%0.2o)\n", win); 15 # endif 16 17 if (!win->_scroll) 18 return ERR; 19 20 getyx(win, oy, ox); 21 wmove(win, 0, 0); 22 wdeleteln(win); 23 wmove(win, oy, ox); 24 25 if (win == curscr) { 26 _putchar('\n'); 27 if (!NONL) 28 win->_curx = 0; 29 # ifdef DEBUG 30 fprintf(outf, "SCROLL: win == curscr\n"); 31 # endif 32 } 33 } 34