(TTYinfo): add fallback if we fail to find "le" in termcap.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7666 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1999-12-23 21:27:00 +00:00
parent cc6c6a730b
commit 085be0bfda

View File

@@ -220,6 +220,7 @@ TTYinfo()
char *term;
char buff[2048];
char *bp;
char *tmp;
#if defined(TIOCGWINSZ)
struct winsize W;
#endif /* defined(TIOCGWINSZ) */
@@ -246,7 +247,11 @@ TTYinfo()
TTYrows = SCREEN_ROWS;
return;
}
backspace = strdup(tgetstr("le", &bp));
tmp = tgetstr("le", &bp);
if (tmp != NULL)
backspace = strdup(tmp);
else
backspace = "\b";
TTYwidth = tgetnum("co");
TTYrows = tgetnum("li");