(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:
@@ -220,6 +220,7 @@ TTYinfo()
|
|||||||
char *term;
|
char *term;
|
||||||
char buff[2048];
|
char buff[2048];
|
||||||
char *bp;
|
char *bp;
|
||||||
|
char *tmp;
|
||||||
#if defined(TIOCGWINSZ)
|
#if defined(TIOCGWINSZ)
|
||||||
struct winsize W;
|
struct winsize W;
|
||||||
#endif /* defined(TIOCGWINSZ) */
|
#endif /* defined(TIOCGWINSZ) */
|
||||||
@@ -246,7 +247,11 @@ TTYinfo()
|
|||||||
TTYrows = SCREEN_ROWS;
|
TTYrows = SCREEN_ROWS;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
backspace = strdup(tgetstr("le", &bp));
|
tmp = tgetstr("le", &bp);
|
||||||
|
if (tmp != NULL)
|
||||||
|
backspace = strdup(tmp);
|
||||||
|
else
|
||||||
|
backspace = "\b";
|
||||||
TTYwidth = tgetnum("co");
|
TTYwidth = tgetnum("co");
|
||||||
TTYrows = tgetnum("li");
|
TTYrows = tgetnum("li");
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user