version 1.4, 1998/02/04 11:09:10 |
version 1.5, 2003/08/06 13:36:54 |
|
|
if ((term = getenv("TERM")) == NULL) |
if ((term = getenv("TERM")) == NULL) |
term = "unknown"; |
term = "unknown"; |
if (tgetent(termbuf, term) <= 0) |
if (tgetent(termbuf, term) <= 0) |
(void)strcpy(termbuf, "dumb:co#80:hc:"); |
(void)strlcpy(termbuf, "dumb:co#80:hc:", sizeof(termbuf)); |
|
|
/* |
/* |
* Get size of the screen. |
* Get size of the screen. |
|
|
* No "home" string, |
* No "home" string, |
* but we can use "move(0,0)". |
* but we can use "move(0,0)". |
*/ |
*/ |
(void)strcpy(sp, tgoto(sc_move, 0, 0)); |
(void)strlcpy(sp, tgoto(sc_move, 0, 0), |
|
sizeof(sbuf) - (sp - sbuf)); |
sc_home = sp; |
sc_home = sp; |
sp += strlen(sp) + 1; |
sp += strlen(sp) + 1; |
} |
} |
|
|
* No "lower-left" string, |
* No "lower-left" string, |
* but we can use "move(0,last-line)". |
* but we can use "move(0,last-line)". |
*/ |
*/ |
(void)strcpy(sp, tgoto(sc_move, 0, sc_height-1)); |
(void)strlcpy(sp, tgoto(sc_move, 0, sc_height-1), |
|
sizeof(sbuf) - (sp - sbuf)); |
sc_lower_left = sp; |
sc_lower_left = sp; |
sp += strlen(sp) + 1; |
sp += strlen(sp) + 1; |
} |
} |