summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjca <jca@openbsd.org>2017-08-29 23:04:50 +0000
committerjca <jca@openbsd.org>2017-08-29 23:04:50 +0000
commit11bd29e4efcb3f3386e5f26c17654572cc5e144e (patch)
tree91a1aa34a0c52b54a075b18d1a731317dcaca126
parentquarterly rescan of the tree: remove unneccessary sys/param.h, and (diff)
downloadwireguard-openbsd-11bd29e4efcb3f3386e5f26c17654572cc5e144e.tar.xz
wireguard-openbsd-11bd29e4efcb3f3386e5f26c17654572cc5e144e.zip
Kill a useless setlocale() query
Pointless since the removal of the setlocale() call in main.c:rev1.82, the emacs-usemeta flag isn't used in the code since 2012. This kills a chunk of code in a statically linked ksh. ok millert@
-rw-r--r--bin/ksh/emacs.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/bin/ksh/emacs.c b/bin/ksh/emacs.c
index ae0a9fd6cd9..ee62f25bd1e 100644
--- a/bin/ksh/emacs.c
+++ b/bin/ksh/emacs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: emacs.c,v 1.70 2017/06/25 17:28:39 anton Exp $ */
+/* $OpenBSD: emacs.c,v 1.71 2017/08/29 23:04:50 jca Exp $ */
/*
* Emacs-like command line editing and history
@@ -18,7 +18,6 @@
#include <sys/stat.h>
#include <ctype.h>
-#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -1449,19 +1448,12 @@ x_bind(const char *a1, const char *a2,
void
x_init_emacs(void)
{
- char *locale;
-
x_tty = 1;
ainit(AEDIT);
x_nextcmd = -1;
- /* Determine if we can translate meta key or use 8-bit AscII
- * XXX - It would be nice if there was a locale attribute to
- * determine if the locale is 7-bit or not.
- */
- locale = setlocale(LC_CTYPE, NULL);
- if (locale == NULL || !strcmp(locale, "C") || !strcmp(locale, "POSIX"))
- Flag(FEMACSUSEMETA) = 1;
+ /* XXX unused */
+ Flag(FEMACSUSEMETA) = 1;
/* new keybinding stuff */
TAILQ_INIT(&kblist);