summaryrefslogtreecommitdiffstats
path: root/gnu/lib/libreadline
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1995-07-19 17:01:18 +0000
committerache <ache@FreeBSD.org>1995-07-19 17:01:18 +0000
commit54df8688245949c31376f31a4c567947bc2750db (patch)
treecb1e44a2cf56dd5eddd134f6890be075716b2c26 /gnu/lib/libreadline
parent2b147931b649b399f42a208006110aa3d42b4bf6 (diff)
downloadFreeBSD-src-54df8688245949c31376f31a4c567947bc2750db.zip
FreeBSD-src-54df8688245949c31376f31a4c567947bc2750db.tar.gz
Sync with bash 1.4.5 version
Check some null pointers before action, cosmetique fixes Submitted by: Obtained from:
Diffstat (limited to 'gnu/lib/libreadline')
-rw-r--r--gnu/lib/libreadline/complete.c4
-rw-r--r--gnu/lib/libreadline/display.c2
-rw-r--r--gnu/lib/libreadline/readline.34
-rw-r--r--gnu/lib/libreadline/readline.c10
-rw-r--r--gnu/lib/libreadline/vi_mode.c18
5 files changed, 18 insertions, 20 deletions
diff --git a/gnu/lib/libreadline/complete.c b/gnu/lib/libreadline/complete.c
index 4726079..2ef001c 100644
--- a/gnu/lib/libreadline/complete.c
+++ b/gnu/lib/libreadline/complete.c
@@ -468,7 +468,7 @@ rl_complete_internal (what_to_do)
}
}
- if (rl_point == end)
+ if (rl_point == end && found_quote == 0)
{
int quoted = 0;
/* We didn't find an unclosed quoted substring upon which to do
@@ -668,7 +668,7 @@ rl_complete_internal (what_to_do)
not be checked, add !matches[1] to the if clause. */
should_quote = rl_strpbrk (matches[0], rl_completer_word_break_characters) != 0;
#if defined (SHELL)
- should_quote = should_quote || rl_strpbrk (matches[0], "#$`?*[") != 0;
+ should_quote = should_quote || rl_strpbrk (matches[0], "#$`?*[!") != 0;
#endif
if (should_quote)
diff --git a/gnu/lib/libreadline/display.c b/gnu/lib/libreadline/display.c
index fcc766c..762b505 100644
--- a/gnu/lib/libreadline/display.c
+++ b/gnu/lib/libreadline/display.c
@@ -185,7 +185,7 @@ expand_prompt (pmt, lp)
return r;
}
- l = strlen (pmt);
+ l = pmt ? strlen (pmt) : 0;
r = ret = xmalloc (l + 1);
for (rl = ignoring = 0, p = pmt; p && *p; p++)
diff --git a/gnu/lib/libreadline/readline.3 b/gnu/lib/libreadline/readline.3
index 1df2a18..bbe9d91 100644
--- a/gnu/lib/libreadline/readline.3
+++ b/gnu/lib/libreadline/readline.3
@@ -95,8 +95,6 @@ char *variable, *value;
.fi
.LP
.nf
-.LP
-.nf
.ft B
int rl_parse_and_bind (line)
char *line;
@@ -744,7 +742,7 @@ inserts the \fIn\fPth word from the end of the previous command.
yank\-last\-arg (M\-.\^, M\-_\^)
Insert the last argument to the previous command (the last word on
the previous line). With an argument,
-behave exactly like @code{yank-nth-arg}.
+behave exactly like \fByank-nth-arg\fP.
.PD
.SS Commands for Changing Text
.PP
diff --git a/gnu/lib/libreadline/readline.c b/gnu/lib/libreadline/readline.c
index 6d5dac5..577f536 100644
--- a/gnu/lib/libreadline/readline.c
+++ b/gnu/lib/libreadline/readline.c
@@ -3122,7 +3122,7 @@ rl_kill_line (direction, ignore)
return (rl_backward_kill_line (1));
else
{
- rl_end_of_line ();
+ rl_end_of_line (1, ignore);
if (orig_point != rl_point)
rl_kill_text (orig_point, rl_point);
rl_point = orig_point;
@@ -3145,7 +3145,7 @@ rl_backward_kill_line (direction, ignore)
ding ();
else
{
- rl_beg_of_line ();
+ rl_beg_of_line (1, ignore);
rl_kill_text (orig_point, rl_point);
}
}
@@ -3169,7 +3169,7 @@ rl_yank (count, ignore)
{
if (!rl_kill_ring)
{
- rl_abort ();
+ rl_abort (count, ignore);
return -1;
}
@@ -3190,7 +3190,7 @@ rl_yank_pop (count, key)
if (((rl_last_func != rl_yank_pop) && (rl_last_func != rl_yank)) ||
!rl_kill_ring)
{
- rl_abort ();
+ rl_abort (1, key);
return -1;
}
@@ -3209,7 +3209,7 @@ rl_yank_pop (count, key)
}
else
{
- rl_abort ();
+ rl_abort (1, key);
return -1;
}
}
diff --git a/gnu/lib/libreadline/vi_mode.c b/gnu/lib/libreadline/vi_mode.c
index b50c707..8ace892 100644
--- a/gnu/lib/libreadline/vi_mode.c
+++ b/gnu/lib/libreadline/vi_mode.c
@@ -275,7 +275,7 @@ rl_vi_complete (ignore, key)
if (key == '*' || key == '\\')
{
_rl_vi_set_last (key, 1, rl_arg_sign);
- rl_vi_insertion_mode ();
+ rl_vi_insertion_mode (1, key);
}
return (0);
}
@@ -286,7 +286,7 @@ rl_vi_tilde_expand (ignore, key)
{
rl_tilde_expand (0, key);
_rl_vi_set_last (key, 1, rl_arg_sign); /* XXX */
- rl_vi_insertion_mode ();
+ rl_vi_insertion_mode (1, key);
return (0);
}
@@ -507,8 +507,8 @@ rl_vi_eword (count)
rl_vi_insert_beg (count, key)
int count, key;
{
- rl_beg_of_line ();
- rl_vi_insertion_mode ();
+ rl_beg_of_line (1, key);
+ rl_vi_insertion_mode (1, key);
return (0);
}
@@ -517,15 +517,15 @@ rl_vi_append_mode (count, key)
{
if (rl_point < rl_end)
rl_point++;
- rl_vi_insertion_mode ();
+ rl_vi_insertion_mode (1, key);
return (0);
}
rl_vi_append_eol (count, key)
int count, key;
{
- rl_end_of_line ();
- rl_vi_append_mode ();
+ rl_end_of_line (1, key);
+ rl_vi_append_mode (1, key);
return (0);
}
@@ -836,7 +836,7 @@ rl_vi_change_to (count, key)
rl_begin_undo_group ();
_rl_vi_doing_insert = 1;
_rl_vi_set_last (key, count, rl_arg_sign);
- rl_vi_insertion_mode ();
+ rl_vi_insertion_mode (1, key);
return (0);
}
@@ -1157,7 +1157,7 @@ rl_vi_subst (count, key)
rl_begin_undo_group ();
_rl_vi_doing_insert = 1;
- rl_vi_insertion_mode ();
+ rl_vi_insertion_mode (1, key);
return (0);
}
OpenPOWER on IntegriCloud