| 79 | static char tty_standout_on[16], tty_standout_off[16]; |
| 80 | |
| 81 | void |
| 82 | term_startup(int *wid, int *hgt) |
| 83 | { |
| 84 | #ifdef TERMLIB |
| 85 | const char *term; |
| 86 | char *tptr; |
| 87 | char *tbufptr, *pc; |
| 88 | int i; |
| 89 | |
| 90 | #ifdef VMS |
| 91 | term = verify_termcap(); |
| 92 | if (!term) |
| 93 | #endif |
| 94 | term = getenv("TERM"); |
| 95 | |
| 96 | #if defined(TOS) && defined(__GNUC__) |
| 97 | if (!term) |
| 98 | term = "builtin"; /* library has a default */ |
| 99 | #endif |
| 100 | if (!term) |
| 101 | #endif /* TERMLIB */ |
| 102 | #ifndef ANSI_DEFAULT |
| 103 | error("Can't get TERM."); |
| 104 | #else |
| 105 | #ifdef TOS |
| 106 | { |
| 107 | CO = 80; |
| 108 | LI = 25; |
| 109 | TI = VS = VE = TE = nullstr; |
| 110 | /* |
| 111 | * FIXME: These variables ought to be declared 'const' (instead |
| 112 | * of using nhStr() to cast away const) to avoid '-Wwrite-sttings' |
| 113 | * warnings about assigning string literals to them. |
| 114 | */ |
| 115 | HO = nhStr("\033H"); |
| 116 | CE = nhStr("\033K"); /* the VT52 termcap */ |
| 117 | UP = nhStr("\033A"); |
| 118 | nh_CM = nhStr("\033Y%c%c"); /* used with function tgoto() */ |
| 119 | nh_ND = nhStr("\033C"); |
| 120 | XD = nhStr("\033B"); |
| 121 | BC = nhStr("\033D"); |
| 122 | SO = nhStr("\033p"); |
| 123 | SE = nhStr("\033q"); |
| 124 | /* HI and HE will be updated in init_hilite if we're using color */ |
| 125 | nh_HI = nhStr("\033p"); |
| 126 | nh_HE = nhStr("\033q"); |
| 127 | *wid = CO; |
| 128 | *hgt = LI; |
| 129 | CL = nhStr("\033E"); /* last thing set */ |
| 130 | return; |
| 131 | } |
| 132 | #else /* TOS */ |
| 133 | { |
| 134 | #ifdef MICRO |
| 135 | get_scr_size(); |
| 136 | #ifdef CLIPPING |
| 137 | if (CO < COLNO || LI < ROWNO + 3) |
| 138 | setclipped(); |
no test coverage detected