summaryrefslogtreecommitdiff
path: root/cmd-line-utils
diff options
context:
space:
mode:
authorbar@bar.myoffice.izhnet.ru <>2008-03-07 14:58:12 +0400
committerbar@bar.myoffice.izhnet.ru <>2008-03-07 14:58:12 +0400
commitd079c2c49dd932dc22d2021fdcc0c591020166a3 (patch)
tree678567cdb83de7166ab0af035fd43bd96f78807b /cmd-line-utils
parentf83cc8e6db90c96db1eb336f690b8a2af3d49e94 (diff)
parent640a4d59fdf13349e05bd14a78672fe12c8eac46 (diff)
downloadmariadb-git-d079c2c49dd932dc22d2021fdcc0c591020166a3.tar.gz
Merge mysql.com:/home/bar/mysql-work/mysql-5.0-engines
into mysql.com:/home/bar/mysql-work/mysql-5.1-engines
Diffstat (limited to 'cmd-line-utils')
-rw-r--r--cmd-line-utils/libedit/el.h2
-rw-r--r--cmd-line-utils/libedit/key.c4
-rw-r--r--cmd-line-utils/libedit/map.c2
-rw-r--r--cmd-line-utils/libedit/read.c2
-rw-r--r--cmd-line-utils/libedit/refresh.c6
5 files changed, 9 insertions, 7 deletions
diff --git a/cmd-line-utils/libedit/el.h b/cmd-line-utils/libedit/el.h
index c4b6cff2186..d9379d7c8aa 100644
--- a/cmd-line-utils/libedit/el.h
+++ b/cmd-line-utils/libedit/el.h
@@ -136,6 +136,8 @@ struct editline {
protected int el_editmode(EditLine *, int, const char **);
+#define el_isprint(x) ((unsigned char) (x) < 0x80 ? isprint(x) : 1)
+
#ifdef DEBUG
#define EL_ABORT(a) do { \
fprintf(el->el_errfile, "%s, %d: ", \
diff --git a/cmd-line-utils/libedit/key.c b/cmd-line-utils/libedit/key.c
index 090a2684e92..35fcf0651b2 100644
--- a/cmd-line-utils/libedit/key.c
+++ b/cmd-line-utils/libedit/key.c
@@ -618,7 +618,7 @@ key__decode_char(char *buf, int cnt, int ch)
} else if (ch == '\\') {
buf[cnt++] = '\\';
buf[cnt] = '\\';
- } else if (ch == ' ' || (isprint(ch) && !isspace(ch))) {
+ } else if (ch == ' ' || (el_isprint(ch) && !isspace(ch))) {
buf[cnt] = ch;
} else {
buf[cnt++] = '\\';
@@ -660,7 +660,7 @@ key__decode_str(const char *str, char *buf, const char *sep)
} else if (*p == '^' || *p == '\\') {
*b++ = '\\';
*b++ = *p;
- } else if (*p == ' ' || (isprint((unsigned char) *p) &&
+ } else if (*p == ' ' || (el_isprint((unsigned char) *p) &&
!isspace((unsigned char) *p))) {
*b++ = *p;
} else {
diff --git a/cmd-line-utils/libedit/map.c b/cmd-line-utils/libedit/map.c
index d99c36ff665..6be9279b5e5 100644
--- a/cmd-line-utils/libedit/map.c
+++ b/cmd-line-utils/libedit/map.c
@@ -961,7 +961,7 @@ map_init_nls(EditLine *el)
el_action_t *map = el->el_map.key;
for (i = 0200; i <= 0377; i++)
- if (isprint(i))
+ if (el_isprint(i))
map[i] = ED_INSERT;
}
diff --git a/cmd-line-utils/libedit/read.c b/cmd-line-utils/libedit/read.c
index 051f3e8e42e..51848c2038e 100644
--- a/cmd-line-utils/libedit/read.c
+++ b/cmd-line-utils/libedit/read.c
@@ -508,7 +508,7 @@ el_gets(EditLine *el, int *nread)
el->el_chared.c_redo.pos < el->el_chared.c_redo.lim) {
if (cmdnum == VI_DELETE_PREV_CHAR &&
el->el_chared.c_redo.pos != el->el_chared.c_redo.buf
- && isprint((unsigned char)el->el_chared.c_redo.pos[-1]))
+ && el_isprint((unsigned char)el->el_chared.c_redo.pos[-1]))
el->el_chared.c_redo.pos--;
else
*el->el_chared.c_redo.pos++ = ch;
diff --git a/cmd-line-utils/libedit/refresh.c b/cmd-line-utils/libedit/refresh.c
index b2833d215c5..46aca15ef08 100644
--- a/cmd-line-utils/libedit/refresh.c
+++ b/cmd-line-utils/libedit/refresh.c
@@ -88,7 +88,7 @@ private void
re_addc(EditLine *el, int c)
{
- if (isprint(c)) {
+ if (el_isprint(c)) {
re_putc(el, c, 1);
return;
}
@@ -964,7 +964,7 @@ re_refresh_cursor(EditLine *el)
h = 1;
v++;
}
- } else if (!isprint((unsigned char) c)) {
+ } else if (!el_isprint((unsigned char) c)) {
h += 3;
if (h > th) { /* if overflow, compensate */
h = h - th;
@@ -1057,7 +1057,7 @@ re_fastaddc(EditLine *el)
char mc = (c == '\177') ? '?' : (c | 0100);
re_fastputc(el, '^');
re_fastputc(el, mc);
- } else if (isprint((unsigned char) c)) { /* normal char */
+ } else if (el_isprint((unsigned char) c)) { /* normal char */
re_fastputc(el, c);
} else {
re_fastputc(el, '\\');