summaryrefslogtreecommitdiffstats
path: root/lib/libedit/tty.c
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2016-04-11 20:43:33 +0000
committerschwarze <schwarze@openbsd.org>2016-04-11 20:43:33 +0000
commite3191321e10061607f650c80a8b76fe9f4de6d52 (patch)
tree93beb16f16a09a9e5906e96b726fef5c9612c45c /lib/libedit/tty.c
parentMove wrapper macros to the two files actually needing them: (diff)
downloadwireguard-openbsd-e3191321e10061607f650c80a8b76fe9f4de6d52.tar.xz
wireguard-openbsd-e3191321e10061607f650c80a8b76fe9f4de6d52.zip
get rid of the non-standard data type "Char" in almost all files;
ok martijn@
Diffstat (limited to 'lib/libedit/tty.c')
-rw-r--r--lib/libedit/tty.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/libedit/tty.c b/lib/libedit/tty.c
index 452b0cfb934..c7134e3a135 100644
--- a/lib/libedit/tty.c
+++ b/lib/libedit/tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.c,v 1.24 2016/04/11 19:54:54 schwarze Exp $ */
+/* $OpenBSD: tty.c,v 1.25 2016/04/11 20:43:33 schwarze Exp $ */
/* $NetBSD: tty.c,v 1.34 2011/01/27 23:11:40 christos Exp $ */
/*-
@@ -891,7 +891,7 @@ tty_bind_char(EditLine *el, int force)
unsigned char *t_n = el->el_tty.t_c[ED_IO];
unsigned char *t_o = el->el_tty.t_ed.c_cc;
- Char new[2], old[2];
+ wchar_t new[2], old[2];
const ttymap_t *tp;
el_action_t *map, *alt;
const el_action_t *dmap, *dalt;
@@ -908,8 +908,8 @@ tty_bind_char(EditLine *el, int force)
}
for (tp = tty_map; tp->nch != (wint_t)-1; tp++) {
- new[0] = t_n[tp->nch];
- old[0] = t_o[tp->och];
+ new[0] = (wchar_t)t_n[tp->nch];
+ old[0] = (wchar_t)t_o[tp->och];
if (new[0] == old[0] && !force)
continue;
/* Put the old default binding back, and set the new binding */
@@ -1144,12 +1144,13 @@ tty_noquotemode(EditLine *el)
*/
protected int
/*ARGSUSED*/
-tty_stty(EditLine *el, int argc __attribute__((__unused__)), const Char **argv)
+tty_stty(EditLine *el, int argc __attribute__((__unused__)),
+ const wchar_t **argv)
{
const ttymodes_t *m;
char x;
int aflag = 0;
- const Char *s, *d;
+ const wchar_t *s, *d;
char name[EL_BUFSIZ];
struct termios *tios = &el->el_tty.t_ex;
int z = EX_IO;
@@ -1232,7 +1233,7 @@ tty_stty(EditLine *el, int argc __attribute__((__unused__)), const Char **argv)
return 0;
}
while (argv && (s = *argv++)) {
- const Char *p;
+ const wchar_t *p;
switch (*s) {
case '+':
case '-':