summaryrefslogtreecommitdiffstats
path: root/lib/libedit/emacs.c
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2016-04-09 20:15:26 +0000
committerschwarze <schwarze@openbsd.org>2016-04-09 20:15:26 +0000
commit565aa7e845bd05480ccceb0abafa956d0083e470 (patch)
tree4df95ff3b16dd3435140c916a69960d6f7d775d7 /lib/libedit/emacs.c
parentAlways compile with WIDECHAR on and delete that preprocessor switch. (diff)
downloadwireguard-openbsd-565aa7e845bd05480ccceb0abafa956d0083e470.tar.xz
wireguard-openbsd-565aa7e845bd05480ccceb0abafa956d0083e470.zip
Delete 26 wrapper macros and two wrapper functions that are no
longer needed now that we always compile with wide character support, reducing code obfuscation. OK czarkoff@ martijn@. Diff also proofread by Christian Heckendorf <mbie at ulmus dot me>.
Diffstat (limited to 'lib/libedit/emacs.c')
-rw-r--r--lib/libedit/emacs.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/libedit/emacs.c b/lib/libedit/emacs.c
index 567dcf4b277..693e5e2559c 100644
--- a/lib/libedit/emacs.c
+++ b/lib/libedit/emacs.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: emacs.c,v 1.14 2016/03/20 23:48:27 schwarze Exp $ */
-/* $NetBSD: emacs.c,v 1.32 2016/02/16 22:53:14 christos Exp $ */
+/* $OpenBSD: emacs.c,v 1.15 2016/04/09 20:15:26 schwarze Exp $ */
+/* $NetBSD: emacs.c,v 1.33 2016/04/09 18:43:17 christos Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -287,8 +287,8 @@ em_upper_case(EditLine *el, wint_t c __attribute__((__unused__)))
el->el_state.argument, ce__isword);
for (cp = el->el_line.cursor; cp < ep; cp++)
- if (Islower(*cp))
- *cp = Toupper(*cp);
+ if (iswlower(*cp))
+ *cp = towupper(*cp);
el->el_line.cursor = ep;
if (el->el_line.cursor > el->el_line.lastchar)
@@ -311,16 +311,16 @@ em_capitol_case(EditLine *el, wint_t c __attribute__((__unused__)))
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 (iswalpha(*cp)) {
+ if (iswlower(*cp))
+ *cp = towupper(*cp);
cp++;
break;
}
}
for (; cp < ep; cp++)
- if (Isupper(*cp))
- *cp = Tolower(*cp);
+ if (iswupper(*cp))
+ *cp = towlower(*cp);
el->el_line.cursor = ep;
if (el->el_line.cursor > el->el_line.lastchar)
@@ -343,8 +343,8 @@ em_lower_case(EditLine *el, wint_t c __attribute__((__unused__)))
el->el_state.argument, ce__isword);
for (cp = el->el_line.cursor; cp < ep; cp++)
- if (Isupper(*cp))
- *cp = Tolower(*cp);
+ if (iswupper(*cp))
+ *cp = towlower(*cp);
el->el_line.cursor = ep;
if (el->el_line.cursor > el->el_line.lastchar)