summaryrefslogtreecommitdiff
path: root/lib/libedit/emacs.c
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>1996-08-11 19:20:30 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>1996-08-11 19:20:30 +0000
commit6f99f89bbea765ba537f8ddc39794da313fe259b (patch)
tree9a2a7c594f9c5a81136b03380da55a891b29c1aa /lib/libedit/emacs.c
parentb7c6d4477a4852a5b013214774cbe16007c6b0f4 (diff)
Notes
Diffstat (limited to 'lib/libedit/emacs.c')
-rw-r--r--lib/libedit/emacs.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/libedit/emacs.c b/lib/libedit/emacs.c
index a3a19759f00c..d84c36022317 100644
--- a/lib/libedit/emacs.c
+++ b/lib/libedit/emacs.c
@@ -298,8 +298,8 @@ em_upper_case(el, c)
el->el_state.argument, ce__isword);
for (cp = el->el_line.cursor; cp < ep; cp++)
- if (islower(*cp))
- *cp = toupper(*cp);
+ if (islower((unsigned char)*cp))
+ *cp = toupper((unsigned char)*cp);
el->el_line.cursor = ep;
if (el->el_line.cursor > el->el_line.lastchar)
@@ -324,16 +324,16 @@ em_capitol_case(el, c)
el->el_state.argument, ce__isword);
for (cp = el->el_line.cursor; cp < ep; cp++) {
- if (isalpha(*cp)) {
- if (islower(*cp))
- *cp = toupper(*cp);
+ if (isalpha((unsigned char)*cp)) {
+ if (islower((unsigned char)*cp))
+ *cp = toupper((unsigned char)*cp);
cp++;
break;
}
}
for (; cp < ep; cp++)
- if (isupper(*cp))
- *cp = tolower(*cp);
+ if (isupper((unsigned char)*cp))
+ *cp = tolower((unsigned char)*cp);
el->el_line.cursor = ep;
if (el->el_line.cursor > el->el_line.lastchar)
@@ -357,8 +357,8 @@ em_lower_case(el, c)
el->el_state.argument, ce__isword);
for (cp = el->el_line.cursor; cp < ep; cp++)
- if (isupper(*cp))
- *cp = tolower(*cp);
+ if (isupper((unsigned char)*cp))
+ *cp = tolower((unsigned char)*cp);
el->el_line.cursor = ep;
if (el->el_line.cursor > el->el_line.lastchar)