/* * Terminal initialization routines. * * 5/15/81 (Berkeley) @(#)cr_tty.c 1.3 */ # undef DEBUG # include "curses.ext" static int destcol, destline; char *tgoto(); static int memmod; /* * This routine does terminal type initialization routines, and * calculation of flags at entry. It is almost entirely stolen from * Bill Joy's ex version 2.6. */ /* * Converted to RT11 11-Oct-85 DK */ setterm() { # ifdef DEBUG fprintf(outf, "SETTERM: LINES = %d, COLS = %d\n", LINES, COLS); # endif /* New RT11 - TSX-PLUS Initialisation */ extern int $$tsx; if($$tsx) _tssin(); /* TSX */ memmod = *((int*) 044) & 010000; *((int*) 044) |= 010000; /* singlechar & noecho */ _rco(); /* */ if (!SO && US) { SO = US; SE = UE; } if (tgoto(CM, destcol, destline)[0] == 'O') CA = FALSE, CM = 0; else CA = TRUE; return OK; } resettty() /* RT11 special */ { if(!memmod) *((int*) 044) &= ~010000; _rco(); }