summaryrefslogtreecommitdiffstats
path: root/lib/libedit/emacs.c
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1996-08-11 19:20:30 +0000
committerache <ache@FreeBSD.org>1996-08-11 19:20:30 +0000
commit3c7673013285ac763e247767e237240275819280 (patch)
tree9a2a7c594f9c5a81136b03380da55a891b29c1aa /lib/libedit/emacs.c
parent8aa8a81b2a0e28709d18a8cb2d85b80f6329e2c1 (diff)
downloadFreeBSD-src-3c7673013285ac763e247767e237240275819280.zip
FreeBSD-src-3c7673013285ac763e247767e237240275819280.tar.gz
8bit cleaness (ctype) fixes
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 a3a1975..d84c360 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)
OpenPOWER on IntegriCloud