diff options
author | 2001-03-18 17:42:26 +0000 | |
---|---|---|
committer | 2001-03-18 17:42:26 +0000 | |
commit | 94bc1d69862d967191a734cf52efb58597d05e23 (patch) | |
tree | 772989638863db95f171c0176b99034cea4aaf72 /gnu/lib/libreadline/terminal.c | |
parent | Build gnu/lib/libreadline and use it instead of the one currently (diff) | |
download | wireguard-openbsd-94bc1d69862d967191a734cf52efb58597d05e23.tar.xz wireguard-openbsd-94bc1d69862d967191a734cf52efb58597d05e23.zip |
Local patches:
remove bogus savestring prototype that conflicts with gdb (and is not used)
fix a typo in sgtty code (not that we use it but...)
treat empty environment variables as unset
Diffstat (limited to 'gnu/lib/libreadline/terminal.c')
-rw-r--r-- | gnu/lib/libreadline/terminal.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gnu/lib/libreadline/terminal.c b/gnu/lib/libreadline/terminal.c index 20ad126ec37..71964b9a165 100644 --- a/gnu/lib/libreadline/terminal.c +++ b/gnu/lib/libreadline/terminal.c @@ -182,7 +182,7 @@ _rl_get_screen_size (tty, ignore_env) is unset. */ if (screenwidth <= 0) { - if (ignore_env == 0 && (ss = get_env_value ("COLUMNS"))) + if (ignore_env == 0 && (ss = get_env_value ("COLUMNS")) && *ss != '\0') screenwidth = atoi (ss); #if !defined (__DJGPP__) @@ -195,7 +195,7 @@ _rl_get_screen_size (tty, ignore_env) is unset. */ if (screenheight <= 0) { - if (ignore_env == 0 && (ss = get_env_value ("LINES"))) + if (ignore_env == 0 && (ss = get_env_value ("LINES")) && *ss != '\0') screenheight = atoi (ss); #if !defined (__DJGPP__) @@ -315,7 +315,7 @@ _rl_init_terminal_io (terminal_name) tty = rl_instream ? fileno (rl_instream) : 0; screenwidth = screenheight = 0; - if (term == 0) + if (term == 0 || *term == '\0') term = "dumb"; /* I've separated this out for later work on not calling tgetent at all |