aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>1997-11-06 00:50:44 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>1997-11-06 00:50:44 +0000
commitdc25b435e93ae4c7e516318b17d1941798de6905 (patch)
tree8759f19589cc8088ded731417ca8ffec0165d491 /contrib
parent9633be85d7e09416c902d0fbafeed16cfe974cd4 (diff)
parent7c3c5c1539ea95d2a1c5b0d3da5711bad397660d (diff)
downloadsrc-dc25b435e93ae4c7e516318b17d1941798de6905.tar.gz
src-dc25b435e93ae4c7e516318b17d1941798de6905.zip
This commit was generated by cvs2svn to compensate for changes in r30971,
which included commits to RCS files with non-trunk default branches.
Notes
Notes: svn path=/head/; revision=30972
Diffstat (limited to 'contrib')
-rw-r--r--contrib/libreadline/display.c7
-rw-r--r--contrib/libreadline/histfile.c4
-rw-r--r--contrib/libreadline/isearch.c2
-rw-r--r--contrib/libreadline/tilde.c2
4 files changed, 10 insertions, 5 deletions
diff --git a/contrib/libreadline/display.c b/contrib/libreadline/display.c
index c283f9a1bd95..609d827f4b4f 100644
--- a/contrib/libreadline/display.c
+++ b/contrib/libreadline/display.c
@@ -1482,7 +1482,7 @@ cr ()
void
_rl_redisplay_after_sigwinch ()
{
- char *t, *oldp;
+ char *t, *oldp, *oldl, *oldlprefix;
/* Clear the current line and put the cursor at column 0. Make sure
the right thing happens if we have wrapped to a new screen line. */
@@ -1508,9 +1508,14 @@ _rl_redisplay_after_sigwinch ()
if (t)
{
oldp = rl_display_prompt;
+ oldl = local_prompt;
+ oldlprefix = local_prompt_prefix;
rl_display_prompt = ++t;
+ local_prompt = local_prompt_prefix = (char *)NULL;
rl_forced_update_display ();
rl_display_prompt = oldp;
+ local_prompt = oldl;
+ local_prompt_prefix = oldlprefix;
}
else
rl_forced_update_display ();
diff --git a/contrib/libreadline/histfile.c b/contrib/libreadline/histfile.c
index c3de134a9694..9f96f1cdd7a0 100644
--- a/contrib/libreadline/histfile.c
+++ b/contrib/libreadline/histfile.c
@@ -246,7 +246,7 @@ history_truncate_file (fname, lines)
/* Write only if there are more lines in the file than we want to
truncate to. */
- if (i && ((file = open (filename, O_WRONLY|O_TRUNC|O_BINARY, 0666)) != -1))
+ if (i && ((file = open (filename, O_WRONLY|O_TRUNC|O_BINARY, 0600)) != -1))
{
write (file, buffer + i, finfo.st_size - i);
close (file);
@@ -275,7 +275,7 @@ history_do_write (filename, nelements, overwrite)
mode = overwrite ? O_WRONLY|O_CREAT|O_TRUNC|O_BINARY : O_WRONLY|O_APPEND|O_BINARY;
output = history_filename (filename);
- if ((file = open (output, mode, 0666)) == -1)
+ if ((file = open (output, mode, 0600)) == -1)
{
FREE (output);
return (errno);
diff --git a/contrib/libreadline/isearch.c b/contrib/libreadline/isearch.c
index 9639a63fd299..ce2e58ba9061 100644
--- a/contrib/libreadline/isearch.c
+++ b/contrib/libreadline/isearch.c
@@ -262,7 +262,7 @@ rl_search_history (direction, invoking_key)
break;
}
- if (c >= 0 && (CTRL_CHAR (c) || META_CHAR (c) || c == RUBOUT))
+ if (c >= 0 && (CTRL_CHAR (c) || META_CHAR (c) || c == RUBOUT) && c != CTRL ('g'))
{
rl_execute_next (c);
break;
diff --git a/contrib/libreadline/tilde.c b/contrib/libreadline/tilde.c
index 1d38d9d461f3..fe263a2605c7 100644
--- a/contrib/libreadline/tilde.c
+++ b/contrib/libreadline/tilde.c
@@ -189,7 +189,7 @@ tilde_expand (string)
if (result = strchr (string, '~'))
result = xmalloc (result_size = (strlen (string) + 16));
else
- result = xmalloc (result_size = strlen (string));
+ result = xmalloc (result_size = (strlen (string) + 1));
/* Scan through STRING expanding tildes as we come to them. */
while (1)