summaryrefslogtreecommitdiff
path: root/cmd-line-utils
diff options
context:
space:
mode:
authorjoerg@trift2. <>2007-01-31 18:20:23 +0100
committerjoerg@trift2. <>2007-01-31 18:20:23 +0100
commit852321c7f8461263ed139d845f228961bca94be7 (patch)
tree23dd0a54e3f9792fe9aa1f07f8db07995e44270c /cmd-line-utils
parentf8c66fe926f8297016c709d2d7e32d423482e0ca (diff)
parentf1289aa1d95a2b6576caa6c2c0c02aabde9e3fbf (diff)
downloadmariadb-git-852321c7f8461263ed139d845f228961bca94be7.tar.gz
Merge trift2.:/MySQL/M50/push-5.0
into trift2.:/MySQL/M51/push-5.1
Diffstat (limited to 'cmd-line-utils')
-rw-r--r--cmd-line-utils/libedit/readline.c11
-rw-r--r--cmd-line-utils/libedit/readline/readline.h2
2 files changed, 6 insertions, 7 deletions
diff --git a/cmd-line-utils/libedit/readline.c b/cmd-line-utils/libedit/readline.c
index 8c09a6f39d5..004fcf7d183 100644
--- a/cmd-line-utils/libedit/readline.c
+++ b/cmd-line-utils/libedit/readline.c
@@ -112,7 +112,7 @@ int rl_attempted_completion_over = 0;
char *rl_basic_word_break_characters = break_chars;
char *rl_completer_word_break_characters = NULL;
char *rl_completer_quote_characters = NULL;
-Function *rl_completion_entry_function = NULL;
+CPFunction *rl_completion_entry_function = NULL;
CPPFunction *rl_attempted_completion_function = NULL;
Function *rl_pre_input_hook = NULL;
Function *rl_startup1_hook = NULL;
@@ -1724,7 +1724,7 @@ rl_display_match_list (matches, len, max)
static int
_rl_complete_internal(int what_to_do)
{
- Function *complet_func;
+ CPFunction *complet_func;
const LineInfo *li;
char *temp, **matches;
const char *ctemp;
@@ -1737,7 +1737,7 @@ _rl_complete_internal(int what_to_do)
complet_func = rl_completion_entry_function;
if (!complet_func)
- complet_func = (Function *)(void *)filename_completion_function;
+ complet_func = filename_completion_function;
/* We now look backwards for the start of a filename/variable word */
li = el_line(e);
@@ -1764,7 +1764,7 @@ _rl_complete_internal(int what_to_do)
} else
matches = 0;
if (!rl_attempted_completion_function || !matches)
- matches = completion_matches(temp, (CPFunction *)complet_func);
+ matches = completion_matches(temp, complet_func);
if (matches) {
int i, retval = CC_REFRESH;
@@ -1789,8 +1789,7 @@ _rl_complete_internal(int what_to_do)
* object is a directory.
*/
size_t alen = strlen(matches[0]);
- if ((complet_func !=
- (Function *)filename_completion_function
+ if ((complet_func != filename_completion_function
|| (alen > 0 && (matches[0])[alen - 1] != '/'))
&& rl_completion_append_character) {
char buf[2];
diff --git a/cmd-line-utils/libedit/readline/readline.h b/cmd-line-utils/libedit/readline/readline.h
index c43f71fb51d..6b1fa186512 100644
--- a/cmd-line-utils/libedit/readline/readline.h
+++ b/cmd-line-utils/libedit/readline/readline.h
@@ -102,7 +102,7 @@ extern int max_input_history;
extern char *rl_basic_word_break_characters;
extern char *rl_completer_word_break_characters;
extern char *rl_completer_quote_characters;
-extern Function *rl_completion_entry_function;
+extern CPFunction *rl_completion_entry_function;
extern CPPFunction *rl_attempted_completion_function;
extern int rl_completion_type;
extern int rl_completion_query_items;