mirror of
https://github.com/troglobit/editline.git
synced 2025-05-06 12:31:45 +08:00
Reduce tgetent() buffer size from 2048 to 1024.
This commit is contained in:
parent
850e36f9db
commit
4f134f1025
@ -1065,7 +1065,7 @@ static char *read_redirected(void)
|
||||
void rl_reset_terminal(const char *terminal_name)
|
||||
{
|
||||
#ifdef CONFIG_USE_TERMCAP
|
||||
char buff[2048];
|
||||
char buf[1024];
|
||||
char *bp;
|
||||
#endif
|
||||
#ifdef TIOCGWINSZ
|
||||
@ -1082,8 +1082,8 @@ void rl_reset_terminal(const char *terminal_name)
|
||||
tty_cols = tty_rows = -1;
|
||||
|
||||
#ifdef CONFIG_USE_TERMCAP
|
||||
bp = buff;
|
||||
if (-1 != tgetent(buff, el_term)) {
|
||||
bp = buf;
|
||||
if (-1 != tgetent(buf, el_term)) {
|
||||
if ((backspace = tgetstr("le", &bp)) != NULL)
|
||||
backspace = strdup(backspace);
|
||||
tty_cols = tgetnum("co");
|
||||
|
Loading…
Reference in New Issue
Block a user