summaryrefslogtreecommitdiff
path: root/cmd-line-utils
diff options
context:
space:
mode:
authorunknown <msvensson@neptunus.(none)>2007-02-06 15:46:17 +0100
committerunknown <msvensson@neptunus.(none)>2007-02-06 15:46:17 +0100
commit8c6fe3587cc534bf084181d6c2308edfab913190 (patch)
treefc2a41854c7dea15d518e7c0aeaed54f30988795 /cmd-line-utils
parentaff6c2e72318b959899b5257cdc08b8f0d4f71bb (diff)
parentc52165de13ca62c2a596ea05c01e07807432d605 (diff)
downloadmariadb-git-8c6fe3587cc534bf084181d6c2308edfab913190.tar.gz
Merge neptunus.(none):/home/msvensson/mysql/mysql-5.1
into neptunus.(none):/home/msvensson/mysql/mysql-5.1-maint BitKeeper/etc/ignore: auto-union Makefile.am: Auto merged cmd-line-utils/readline/display.c: Auto merged configure.in: Auto merged extra/yassl/include/buffer.hpp: Auto merged extra/yassl/include/crypto_wrapper.hpp: Auto merged extra/yassl/include/yassl_imp.hpp: Auto merged extra/yassl/include/yassl_int.hpp: Auto merged extra/yassl/src/crypto_wrapper.cpp: Auto merged extra/yassl/taocrypt/include/algebra.hpp: Auto merged extra/yassl/taocrypt/include/des.hpp: Auto merged extra/yassl/taocrypt/include/hash.hpp: Auto merged extra/yassl/taocrypt/include/hmac.hpp: Auto merged extra/yassl/taocrypt/include/modarith.hpp: Auto merged extra/yassl/taocrypt/include/modes.hpp: Auto merged extra/yassl/taocrypt/include/rsa.hpp: Auto merged extra/yassl/taocrypt/include/type_traits.hpp: Auto merged extra/yassl/taocrypt/mySTL/list.hpp: Auto merged extra/yassl/taocrypt/src/aes.cpp: Auto merged extra/yassl/taocrypt/src/algebra.cpp: Auto merged extra/yassl/taocrypt/src/asn.cpp: Auto merged extra/yassl/testsuite/testsuite.cpp: Auto merged mysql-test/mysql-test-run.pl: Auto merged mysql-test/r/mysqltest.result: Auto merged mysql-test/t/mysqltest.test: Auto merged mysys/default.c: Auto merged sql/field.cc: Auto merged sql/item.cc: Auto merged sql/item_cmpfunc.cc: Auto merged sql/item_cmpfunc.h: Auto merged sql/item_sum.cc: Auto merged sql/mysql_priv.h: Auto merged sql/net_serv.cc: Auto merged sql/repl_failsafe.cc: Auto merged sql/set_var.cc: Auto merged sql/set_var.h: Auto merged sql/slave.cc: Auto merged sql/sql_parse.cc: Auto merged sql-common/client.c: Auto merged sql/sql_select.cc: Auto merged extra/yassl/taocrypt/test/test.cpp: Manual merge mysql-test/r/grant.result: Manual merge mysql-test/r/select.result: Manual merge mysql-test/t/grant.test: Manual merge mysql-test/t/select.test: Manual merge sql/field.h: Manual merge sql/mysqld.cc: Manual merge
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
-rw-r--r--cmd-line-utils/readline/display.c2
-rw-r--r--cmd-line-utils/readline/histexpand.c8
-rw-r--r--cmd-line-utils/readline/input.c8
-rw-r--r--cmd-line-utils/readline/text.c6
-rw-r--r--cmd-line-utils/readline/vi_mode.c8
7 files changed, 22 insertions, 23 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;
diff --git a/cmd-line-utils/readline/display.c b/cmd-line-utils/readline/display.c
index b8b7ac445e6..06cac3bfd32 100644
--- a/cmd-line-utils/readline/display.c
+++ b/cmd-line-utils/readline/display.c
@@ -426,7 +426,7 @@ rl_redisplay ()
#if defined (HANDLE_MULTIBYTE)
wchar_t wc;
size_t wc_bytes;
- int wc_width;
+ int wc_width= 0;
mbstate_t ps;
int _rl_wrapped_multicolumn = 0;
#endif
diff --git a/cmd-line-utils/readline/histexpand.c b/cmd-line-utils/readline/histexpand.c
index a09be00a859..0a45438990a 100644
--- a/cmd-line-utils/readline/histexpand.c
+++ b/cmd-line-utils/readline/histexpand.c
@@ -560,12 +560,12 @@ history_expand_internal (string, start, end_index_ptr, ret_string, current_line)
#if defined (HANDLE_MULTIBYTE)
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
{
- int c, l;
+ int chr, l;
l = _rl_find_prev_mbchar (string, i, MB_FIND_ANY);
- c = string[l];
+ chr = string[l];
/* XXX - original patch had i - 1 ??? If i == 0 it would fail. */
- if (i && (c == '\'' || c == '"'))
- quoted_search_delimiter = c;
+ if (i && (chr == '\'' || chr == '"'))
+ quoted_search_delimiter = chr;
}
else
#endif /* HANDLE_MULTIBYTE */
diff --git a/cmd-line-utils/readline/input.c b/cmd-line-utils/readline/input.c
index b2f8016050d..818f2e8763d 100644
--- a/cmd-line-utils/readline/input.c
+++ b/cmd-line-utils/readline/input.c
@@ -529,17 +529,17 @@ _rl_read_mbchar (mbchar, size)
may be FIRST. Used by the search functions, among others. Very similar
to _rl_read_mbchar. */
int
-_rl_read_mbstring (first, mb, mblen)
+_rl_read_mbstring (first, mb, mb_len)
int first;
char *mb;
- int mblen;
+ int mb_len;
{
int i, c;
mbstate_t ps;
c = first;
- memset (mb, 0, mblen);
- for (i = 0; i < mblen; i++)
+ memset (mb, 0, mb_len);
+ for (i = 0; i < mb_len; i++)
{
mb[i] = (char)c;
memset (&ps, 0, sizeof (mbstate_t));
diff --git a/cmd-line-utils/readline/text.c b/cmd-line-utils/readline/text.c
index 89457be37cd..cf9223df844 100644
--- a/cmd-line-utils/readline/text.c
+++ b/cmd-line-utils/readline/text.c
@@ -1002,12 +1002,12 @@ _rl_rubout_char (count, key)
}
else
{
- int orig_point;
+ int orig_point2;
- orig_point = rl_point;
+ orig_point2 = rl_point;
rl_point = _rl_find_prev_mbchar (rl_line_buffer, rl_point, MB_FIND_NONZERO);
c = rl_line_buffer[rl_point];
- rl_delete_text (rl_point, orig_point);
+ rl_delete_text (rl_point, orig_point2);
}
#endif /* HANDLE_MULTIBYTE */
diff --git a/cmd-line-utils/readline/vi_mode.c b/cmd-line-utils/readline/vi_mode.c
index 4d1cc56117d..a277fe2c237 100644
--- a/cmd-line-utils/readline/vi_mode.c
+++ b/cmd-line-utils/readline/vi_mode.c
@@ -672,7 +672,7 @@ _rl_vi_change_mbchar_case (count)
{
wchar_t wc;
char mb[MB_LEN_MAX+1];
- int mblen;
+ int local_mblen;
mbstate_t ps;
memset (&ps, 0, sizeof (mbstate_t));
@@ -695,9 +695,9 @@ _rl_vi_change_mbchar_case (count)
/* Vi is kind of strange here. */
if (wc)
{
- mblen = wcrtomb (mb, wc, &ps);
- if (mblen >= 0)
- mb[mblen] = '\0';
+ local_mblen = wcrtomb (mb, wc, &ps);
+ if (local_mblen >= 0)
+ mb[local_mblen] = '\0';
rl_begin_undo_group ();
rl_delete (1, 0);
rl_insert_text (mb);