|
|
1.1 ! root 1: /* @(#) _setwind.c: 1.1 10/15/83 (1.21 2/11/83) */ ! 2: ! 3: #include "curses.ext" ! 4: ! 5: char *tparm(); ! 6: ! 7: extern int _outch(); ! 8: ! 9: /* Force the window to be as desired */ ! 10: _setwind() ! 11: { ! 12: if ( SP->phys_top_mgn == SP->des_top_mgn && ! 13: SP->phys_bot_mgn == SP->des_bot_mgn) { ! 14: #ifdef DEBUG ! 15: if(outf) fprintf(outf, "_setwind, same values %d & %d, do nothing\n", ! 16: SP->phys_top_mgn, SP->phys_bot_mgn); ! 17: #endif ! 18: return; ! 19: } ! 20: if (set_window) ! 21: tputs(tparm(set_window, SP->des_top_mgn, ! 22: SP->des_bot_mgn, 0, columns-1), 1, _outch); ! 23: else if (change_scroll_region) { ! 24: /* Save & Restore SP->curptr since it becomes undefined */ ! 25: tputs(save_cursor, 1, _outch); ! 26: tputs(tparm(change_scroll_region, ! 27: SP->des_top_mgn, SP->des_bot_mgn), 1, _outch); ! 28: tputs(restore_cursor, 1, _outch); /* put SP->curptr back */ ! 29: } ! 30: #ifdef DEBUG ! 31: if(outf) fprintf(outf, "set phys window from (%d,%d) to (%d,%d)\n", ! 32: SP->phys_top_mgn, SP->phys_bot_mgn, SP->des_top_mgn, SP->des_bot_mgn); ! 33: #endif ! 34: SP->phys_top_mgn = SP->des_top_mgn; ! 35: SP->phys_bot_mgn = SP->des_bot_mgn; ! 36: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.