summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2001-03-18 17:42:28 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2001-03-18 17:42:28 +0000
commit8db88a679997418f39984af821ddb2a7f9538c9c (patch)
treec24b4ca3a9898d4de965e8e3a796f0f8e7da7d7d /gnu
parentc5208e263e5c2cbb0bdf5b552fae16589f570167 (diff)
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')
-rw-r--r--gnu/lib/libreadline/bind.c2
-rw-r--r--gnu/lib/libreadline/histfile.c2
-rw-r--r--gnu/lib/libreadline/nls.c6
-rw-r--r--gnu/lib/libreadline/readline.h4
-rw-r--r--gnu/lib/libreadline/rltty.c2
-rw-r--r--gnu/lib/libreadline/terminal.c6
-rw-r--r--gnu/lib/libreadline/tilde.c2
7 files changed, 10 insertions, 14 deletions
diff --git a/gnu/lib/libreadline/bind.c b/gnu/lib/libreadline/bind.c
index 6a6424e9e02..fc6fe284116 100644
--- a/gnu/lib/libreadline/bind.c
+++ b/gnu/lib/libreadline/bind.c
@@ -681,7 +681,7 @@ rl_read_init_file (filename)
filename = last_readline_init_file;
if (filename == 0)
filename = get_env_value ("INPUTRC");
- if (filename == 0)
+ if (filename == 0 || *filename == '\0')
filename = DEFAULT_INPUTRC;
}
diff --git a/gnu/lib/libreadline/histfile.c b/gnu/lib/libreadline/histfile.c
index b908e2261f8..c5f33ad9127 100644
--- a/gnu/lib/libreadline/histfile.c
+++ b/gnu/lib/libreadline/histfile.c
@@ -96,7 +96,7 @@ history_filename (filename)
home = get_env_value ("HOME");
- if (home == 0)
+ if (home == 0 || *home == '\0')
{
home = ".";
home_len = 1;
diff --git a/gnu/lib/libreadline/nls.c b/gnu/lib/libreadline/nls.c
index 67bed8a6fa4..81de0f2ec82 100644
--- a/gnu/lib/libreadline/nls.c
+++ b/gnu/lib/libreadline/nls.c
@@ -106,9 +106,9 @@ _rl_init_eightbit ()
appropriate variables and set eight-bit mode if they have the right
values. */
lspec = get_env_value ("LC_ALL");
- if (lspec == 0) lspec = get_env_value ("LC_CTYPE");
- if (lspec == 0) lspec = get_env_value ("LANG");
- if (lspec == 0 || (t = normalize_codeset (lspec)) == 0)
+ if (lspec == 0 || *lspec == '\0') lspec = get_env_value ("LC_CTYPE");
+ if (lspec == 0 || *lspec == '\0') lspec = get_env_value ("LANG");
+ if (lspec == 0 || *lspec == '\0' || (t = normalize_codeset (lspec)) == 0)
return (0);
for (i = 0; t && legal_lang_values[i]; i++)
if (STREQ (t, legal_lang_values[i]))
diff --git a/gnu/lib/libreadline/readline.h b/gnu/lib/libreadline/readline.h
index 97c62fd1534..1531b8f7753 100644
--- a/gnu/lib/libreadline/readline.h
+++ b/gnu/lib/libreadline/readline.h
@@ -623,10 +623,6 @@ extern int rl_inhibit_completion;
#define SINGLE_MATCH 1
#define MULT_MATCH 2
-#if !defined (savestring)
-extern char *savestring __P((char *)); /* XXX backwards compatibility */
-#endif
-
#ifdef __cplusplus
}
#endif
diff --git a/gnu/lib/libreadline/rltty.c b/gnu/lib/libreadline/rltty.c
index b868b6970c2..bacd2fbfd0b 100644
--- a/gnu/lib/libreadline/rltty.c
+++ b/gnu/lib/libreadline/rltty.c
@@ -190,7 +190,7 @@ save_tty_chars (tiop)
_rl_tty_chars.t_intr = tiop->tchars.t_intrc;
_rl_tty_chars.t_quit = tiop->tchars.t_quitc;
_rl_tty_chars.t_start = tiop->tchars.t_startc;
- _rl_tty_chars.t_stop = tiop->tchars.t_stopc
+ _rl_tty_chars.t_stop = tiop->tchars.t_stopc;
_rl_tty_chars.t_eof = tiop->tchars.t_eofc;
_rl_tty_chars.t_eol = '\n';
_rl_tty_chars.t_eol2 = tiop->tchars.t_brkc;
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
diff --git a/gnu/lib/libreadline/tilde.c b/gnu/lib/libreadline/tilde.c
index 777b6559223..009c6992396 100644
--- a/gnu/lib/libreadline/tilde.c
+++ b/gnu/lib/libreadline/tilde.c
@@ -325,7 +325,7 @@ tilde_expand_word (filename)
/* If there is no HOME variable, look up the directory in
the password database. */
- if (expansion == 0)
+ if (expansion == 0 || *expansion == '\0')
expansion = get_home_dir ();
return (glue_prefix_and_suffix (expansion, filename, 1));