mirror of
https://github.com/troglobit/editline.git
synced 2025-05-06 04:21:24 +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)
|
void rl_reset_terminal(const char *terminal_name)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_USE_TERMCAP
|
#ifdef CONFIG_USE_TERMCAP
|
||||||
char buff[2048];
|
char buf[1024];
|
||||||
char *bp;
|
char *bp;
|
||||||
#endif
|
#endif
|
||||||
#ifdef TIOCGWINSZ
|
#ifdef TIOCGWINSZ
|
||||||
@ -1082,8 +1082,8 @@ void rl_reset_terminal(const char *terminal_name)
|
|||||||
tty_cols = tty_rows = -1;
|
tty_cols = tty_rows = -1;
|
||||||
|
|
||||||
#ifdef CONFIG_USE_TERMCAP
|
#ifdef CONFIG_USE_TERMCAP
|
||||||
bp = buff;
|
bp = buf;
|
||||||
if (-1 != tgetent(buff, el_term)) {
|
if (-1 != tgetent(buf, el_term)) {
|
||||||
if ((backspace = tgetstr("le", &bp)) != NULL)
|
if ((backspace = tgetstr("le", &bp)) != NULL)
|
||||||
backspace = strdup(backspace);
|
backspace = strdup(backspace);
|
||||||
tty_cols = tgetnum("co");
|
tty_cols = tgetnum("co");
|
||||||
|
Loading…
Reference in New Issue
Block a user