diff options
author | Tom Tromey <tom@tromey.com> | 2018-10-07 12:52:13 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2019-08-12 10:57:56 -0600 |
commit | 775e241e9c5f2b2ff2b59972ab70e5f20763fae6 (patch) | |
tree | 597ab643dce69ee6e98e46ecac00ee85f447bb4b /readline/tilde.c | |
parent | 08132bdd876fa1825810f90ecc25390dd4ded457 (diff) | |
download | gdb-775e241e9c5f2b2ff2b59972ab70e5f20763fae6.zip gdb-775e241e9c5f2b2ff2b59972ab70e5f20763fae6.tar.gz gdb-775e241e9c5f2b2ff2b59972ab70e5f20763fae6.tar.bz2 |
Import readline 7.0 (patch 5)
This imports readline 7.0 (up to patch 5) while preserving all
gdb-local changes.
This was done by checking out the readline git repository, making a
branch based on the gdb baseline revision, applying the gdb changes to
that branch, and then merging from readline 7.
readline/ChangeLog.gdb
2019-08-12 Tom Tromey <tom@tromey.com>
* Imported readline 7.0 patch 5.
Diffstat (limited to 'readline/tilde.c')
-rw-r--r-- | readline/tilde.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/readline/tilde.c b/readline/tilde.c index d4c1da9..95bc421 100644 --- a/readline/tilde.c +++ b/readline/tilde.c @@ -236,7 +236,11 @@ tilde_expand (string) string += end; expansion = tilde_expand_word (tilde_word); - xfree (tilde_word); + + if (expansion == 0) + expansion = tilde_word; + else + xfree (tilde_word); len = strlen (expansion); #ifdef __CYGWIN__ @@ -360,8 +364,8 @@ tilde_expand_word (filename) { /* Prefix $HOME to the rest of the string. */ expansion = sh_get_env_value ("HOME"); -#ifdef _WIN32 - if (!expansion) +#if defined (_WIN32) + if (expansion == 0) expansion = sh_get_env_value ("APPDATA"); #endif |