version 1.28, 2006/08/01 22:16:03 |
version 1.29, 2008/06/11 00:03:49 |
|
|
void |
void |
ttinit(void) |
ttinit(void) |
{ |
{ |
char *tv_stype, *p; |
int errret; |
|
|
if ((tv_stype = getenv("TERM")) == NULL) |
if (setupterm(NULL, 1, &errret)) |
panic("Could not determine terminal type!"); |
panic("Terminal setup failed"); |
|
|
if (setupterm(tv_stype, 1, NULL)) { |
|
(void)asprintf(&p, "Unknown terminal type: %s", tv_stype); |
|
panic(p); |
|
} |
|
|
|
signal(SIGWINCH, winchhandler); |
signal(SIGWINCH, winchhandler); |
signal(SIGCONT, winchhandler); |
signal(SIGCONT, winchhandler); |