Add fallback backspace in case tgetstr("le") fails.

This commit is contained in:
Joachim Nilsson 2010-07-24 02:02:14 +02:00
parent 98b846c8b1
commit ceb1995733

View File

@ -240,6 +240,8 @@ static void tty_info(void)
if (-1 != tgetent(buff, term)) {
if ((backspace = tgetstr("le", &bp)) != NULL)
backspace = strdup(backspace);
else
backspace = "\b";
tty_cols = tgetnum("co");
tty_rows = tgetnum("li");
}