summaryrefslogtreecommitdiff
path: root/cmd-line-utils
diff options
context:
space:
mode:
authorGeorgi Kodinov <joro@sun.com>2009-06-05 19:40:36 +0300
committerGeorgi Kodinov <joro@sun.com>2009-06-05 19:40:36 +0300
commit845f9683696a6c401ea16b714adcdcac27085198 (patch)
treea8101c72718bb27cae961415d300d416daa27836 /cmd-line-utils
parentd972da238ca06756049e09c2b390af9eba54f53d (diff)
parentb311cb83f20d6ba0d4e695dabe9f537fd90c2d89 (diff)
downloadmariadb-git-845f9683696a6c401ea16b714adcdcac27085198.tar.gz
merged 5.0-bugteam -> 5.1-bugteam
Diffstat (limited to 'cmd-line-utils')
-rw-r--r--cmd-line-utils/readline/bind.c6
-rw-r--r--cmd-line-utils/readline/chardefs.h3
-rw-r--r--cmd-line-utils/readline/display.c2
3 files changed, 5 insertions, 6 deletions
diff --git a/cmd-line-utils/readline/bind.c b/cmd-line-utils/readline/bind.c
index 9d0a803cc6c..fc7bebfd813 100644
--- a/cmd-line-utils/readline/bind.c
+++ b/cmd-line-utils/readline/bind.c
@@ -699,11 +699,9 @@ rl_function_of_keyseq (keyseq, map, type)
for (i = 0; keyseq && keyseq[i]; i++)
{
- unsigned char uc = keyseq[i];
- int ic;
+ unsigned char ic = keyseq[i];
- ic= uc;
- if (META_CHAR (ic) && _rl_convert_meta_chars_to_ascii)
+ if (META_BYTE (ic) && _rl_convert_meta_chars_to_ascii)
{
if (map[ESC].type == ISKMAP)
{
diff --git a/cmd-line-utils/readline/chardefs.h b/cmd-line-utils/readline/chardefs.h
index def3a111bd3..36fe7fdd7ac 100644
--- a/cmd-line-utils/readline/chardefs.h
+++ b/cmd-line-utils/readline/chardefs.h
@@ -59,7 +59,8 @@
#define largest_char 255 /* Largest character value. */
#define CTRL_CHAR(c) ((c) < control_character_threshold && (((c) & 0x80) == 0))
-#define META_CHAR(c) ((c) > meta_character_threshold && (c) <= largest_char)
+#define META_BYTE(c) ((c) > meta_character_threshold)
+#define META_CHAR(c) (META_BYTE(c) && (c) <= largest_char)
#define CTRL(c) ((c) & control_character_mask)
#define META(c) ((c) | meta_character_bit)
diff --git a/cmd-line-utils/readline/display.c b/cmd-line-utils/readline/display.c
index 54c56954f43..842a586b76b 100644
--- a/cmd-line-utils/readline/display.c
+++ b/cmd-line-utils/readline/display.c
@@ -1888,7 +1888,7 @@ rl_character_len (c, pos)
uc = (unsigned char)c;
- if (META_CHAR (c))
+ if (META_BYTE (uc))
return ((_rl_output_meta_chars == 0) ? 4 : 1);
if (uc == '\t')