SCCS-vsn: lib/libcurses/scroll.c 1.4
/*
* This routine scrolls the window up a line.
*
/*
* This routine scrolls the window up a line.
*
- * %G% (Berkeley) @(#)scroll.c 1.3
+ * %G% (Berkeley) @(#)scroll.c 1.4
*/
scroll(win)
reg WINDOW *win; {
*/
scroll(win)
reg WINDOW *win; {
for (sp = temp; sp < &temp[win->_maxx]; )
*sp++ = ' ';
win->_y[win->_maxy - 1] = temp;
for (sp = temp; sp < &temp[win->_maxx]; )
*sp++ = ' ';
win->_y[win->_maxy - 1] = temp;
if (win == curscr) {
putchar('\n');
if (!NONL)
win->_curx = 0;
# ifdef DEBUG
fprintf(outf, "SCROLL: win == curscr\n");
if (win == curscr) {
putchar('\n');
if (!NONL)
win->_curx = 0;
# ifdef DEBUG
fprintf(outf, "SCROLL: win == curscr\n");
+ } else {
+ if(win->_cury-- <= 0)
+ win->_cury = 0;
fprintf(outf, "SCROLL: win [0%o] != curscr [0%o]\n",win,curscr);
fprintf(outf, "SCROLL: win [0%o] != curscr [0%o]\n",win,curscr);
touchwin(win);
return OK;
}
touchwin(win);
return OK;
}