|
|
1.1 ! root 1: # include "curses.ext" ! 2: ! 3: /* ! 4: * This routine scrolls the window up a line. ! 5: */ ! 6: scroll(win) ! 7: reg WINDOW *win; { ! 8: ! 9: reg char *sp; ! 10: reg int i; ! 11: reg char *temp; ! 12: ! 13: if (!win->_scroll) ! 14: return ERR; ! 15: temp = win->_y[0]; ! 16: for (i = 0; i < win->_maxy - 1; i++) ! 17: win->_y[i] = win->_y[i+1]; ! 18: for (sp = temp; sp - temp < win->_maxx; ) ! 19: *sp++ = ' '; ! 20: win->_y[win->_maxy - 1] = temp; ! 21: win->_cury--; ! 22: if (win == curscr) { ! 23: putchar('\n'); ! 24: if (!NONL) ! 25: win->_curx = 0; ! 26: # ifdef DEBUG ! 27: fprintf(outf, "SCROLL: win == curscr\n"); ! 28: # endif ! 29: } ! 30: # ifdef DEBUG ! 31: else ! 32: fprintf(outf, "SCROLL: win [0%o] != curscr [0%o]\n",win,curscr); ! 33: # endif ! 34: return OK; ! 35: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.