diff options
author | 2016-03-20 20:35:38 +0000 | |
---|---|---|
committer | 2016-03-20 20:35:38 +0000 | |
commit | b2589f0b3286bc81be0a2044650199e8c9df0b5c (patch) | |
tree | 7745d39c923c07ecd2096e0fd865f9eecb27392b | |
parent | Get rid of "#ifdef WIDECHAR" and one goto in read_char(), (diff) | |
download | wireguard-openbsd-b2589f0b3286bc81be0a2044650199e8c9df0b5c.tar.xz wireguard-openbsd-b2589f0b3286bc81be0a2044650199e8c9df0b5c.zip |
Delete the useless Int datatype and always use the standard wint_t
directly. This is not a problem because <wchar_t> is required all
over the place anyway, even when WIDECHAR is not defined.
No functional change except that it fixes a few printf(3)
format string issues, %c vs. %lc.
OK czarkoff@
-rw-r--r-- | lib/libedit/chared.c | 18 | ||||
-rw-r--r-- | lib/libedit/chared.h | 18 | ||||
-rw-r--r-- | lib/libedit/chartype.h | 4 | ||||
-rw-r--r-- | lib/libedit/common.c | 72 | ||||
-rw-r--r-- | lib/libedit/emacs.c | 42 | ||||
-rw-r--r-- | lib/libedit/keymacro.c | 6 | ||||
-rw-r--r-- | lib/libedit/makelist | 5 | ||||
-rw-r--r-- | lib/libedit/map.c | 10 | ||||
-rw-r--r-- | lib/libedit/parse.c | 4 | ||||
-rw-r--r-- | lib/libedit/refresh.c | 14 | ||||
-rw-r--r-- | lib/libedit/refresh.h | 4 | ||||
-rw-r--r-- | lib/libedit/search.c | 12 | ||||
-rw-r--r-- | lib/libedit/search.h | 6 | ||||
-rw-r--r-- | lib/libedit/terminal.c | 8 | ||||
-rw-r--r-- | lib/libedit/terminal.h | 6 | ||||
-rw-r--r-- | lib/libedit/tty.c | 10 | ||||
-rw-r--r-- | lib/libedit/vi.c | 106 |
17 files changed, 172 insertions, 173 deletions
diff --git a/lib/libedit/chared.c b/lib/libedit/chared.c index 1032410b67d..c4fdb64eae9 100644 --- a/lib/libedit/chared.c +++ b/lib/libedit/chared.c @@ -1,4 +1,4 @@ -/* $OpenBSD: chared.c,v 1.17 2016/03/01 16:43:39 schwarze Exp $ */ +/* $OpenBSD: chared.c,v 1.18 2016/03/20 20:35:38 schwarze Exp $ */ /* $NetBSD: chared.c,v 1.28 2009/12/30 22:37:40 christos Exp $ */ /*- @@ -193,7 +193,7 @@ c_delbefore1(EditLine *el) * Return if p is part of a word according to emacs */ protected int -ce__isword(Int p) +ce__isword(wint_t p) { return Isalnum(p) || Strchr(STR("*?_-.[]~="), p) != NULL; } @@ -203,7 +203,7 @@ ce__isword(Int p) * Return if p is part of a word according to vi */ protected int -cv__isword(Int p) +cv__isword(wint_t p) { if (Isalnum(p) || p == '_') return 1; @@ -217,7 +217,7 @@ cv__isword(Int p) * Return if p is part of a big word according to vi */ protected int -cv__isWord(Int p) +cv__isWord(wint_t p) { return !Isspace(p); } @@ -227,7 +227,7 @@ cv__isWord(Int p) * Find the previous word */ protected Char * -c__prev_word(Char *p, Char *low, int n, int (*wtest)(Int)) +c__prev_word(Char *p, Char *low, int n, int (*wtest)(wint_t)) { p--; @@ -251,7 +251,7 @@ c__prev_word(Char *p, Char *low, int n, int (*wtest)(Int)) * Find the next word */ protected Char * -c__next_word(Char *p, Char *high, int n, int (*wtest)(Int)) +c__next_word(Char *p, Char *high, int n, int (*wtest)(wint_t)) { while (n--) { while ((p < high) && !(*wtest)(*p)) @@ -269,7 +269,7 @@ c__next_word(Char *p, Char *high, int n, int (*wtest)(Int)) * Find the next word vi style */ protected Char * -cv_next_word(EditLine *el, Char *p, Char *high, int n, int (*wtest)(Int)) +cv_next_word(EditLine *el, Char *p, Char *high, int n, int (*wtest)(wint_t)) { int test; @@ -298,7 +298,7 @@ cv_next_word(EditLine *el, Char *p, Char *high, int n, int (*wtest)(Int)) * Find the previous word vi style */ protected Char * -cv_prev_word(Char *p, Char *low, int n, int (*wtest)(Int)) +cv_prev_word(Char *p, Char *low, int n, int (*wtest)(wint_t)) { int test; @@ -362,7 +362,7 @@ cv_delfini(EditLine *el) * Go to the end of this word according to vi */ protected Char * -cv__endword(Char *p, Char *high, int n, int (*wtest)(Int)) +cv__endword(Char *p, Char *high, int n, int (*wtest)(wint_t)) { int test; diff --git a/lib/libedit/chared.h b/lib/libedit/chared.h index ae475093064..1913ab55310 100644 --- a/lib/libedit/chared.h +++ b/lib/libedit/chared.h @@ -1,4 +1,4 @@ -/* $OpenBSD: chared.h,v 1.10 2011/07/07 05:40:42 okan Exp $ */ +/* $OpenBSD: chared.h,v 1.11 2016/03/20 20:35:38 schwarze Exp $ */ /* $NetBSD: chared.h,v 1.20 2010/04/15 00:57:33 christos Exp $ */ /*- @@ -144,17 +144,17 @@ typedef struct el_chared_t { #include "fcns.h" -protected int cv__isword(Int); -protected int cv__isWord(Int); +protected int cv__isword(wint_t); +protected int cv__isWord(wint_t); protected void cv_delfini(EditLine *); -protected Char *cv__endword(Char *, Char *, int, int (*)(Int)); -protected int ce__isword(Int); +protected Char *cv__endword(Char *, Char *, int, int (*)(wint_t)); +protected int ce__isword(wint_t); protected void cv_undo(EditLine *); protected void cv_yank(EditLine *, const Char *, int); -protected Char *cv_next_word(EditLine*, Char *, Char *, int, int (*)(Int)); -protected Char *cv_prev_word(Char *, Char *, int, int (*)(Int)); -protected Char *c__next_word(Char *, Char *, int, int (*)(Int)); -protected Char *c__prev_word(Char *, Char *, int, int (*)(Int)); +protected Char *cv_next_word(EditLine*, Char *, Char *, int, int (*)(wint_t)); +protected Char *cv_prev_word(Char *, Char *, int, int (*)(wint_t)); +protected Char *c__next_word(Char *, Char *, int, int (*)(wint_t)); +protected Char *c__prev_word(Char *, Char *, int, int (*)(wint_t)); protected void c_insert(EditLine *, int); protected void c_delbefore(EditLine *, int); protected void c_delbefore1(EditLine *); diff --git a/lib/libedit/chartype.h b/lib/libedit/chartype.h index 2e13426b625..d69330aecdd 100644 --- a/lib/libedit/chartype.h +++ b/lib/libedit/chartype.h @@ -1,4 +1,4 @@ -/* $OpenBSD: chartype.h,v 1.8 2016/03/20 20:16:09 schwarze Exp $ */ +/* $OpenBSD: chartype.h,v 1.9 2016/03/20 20:35:38 schwarze Exp $ */ /* $NetBSD: chartype.h,v 1.5 2010/04/15 00:55:57 christos Exp $ */ /*- @@ -69,7 +69,6 @@ #define ct_mbstowcs mbstowcs #define Char wchar_t -#define Int wint_t #define FUN(prefix,rest) prefix ## _w ## rest #define FUNW(type) type ## _w #define TYPE(type) type ## W @@ -118,7 +117,6 @@ size_t ct_mbrtowc(char *, const char *, size_t, void *); #define ct_mbstowcs(a, b, c) (strncpy(a, b, c), strlen(a)) #define Char char -#define Int int #define FUN(prefix,rest) prefix ## _ ## rest #define FUNW(type) type #define TYPE(type) type diff --git a/lib/libedit/common.c b/lib/libedit/common.c index 768bac4d27d..ca18f829872 100644 --- a/lib/libedit/common.c +++ b/lib/libedit/common.c @@ -1,4 +1,4 @@ -/* $OpenBSD: common.c,v 1.10 2016/01/30 12:22:20 schwarze Exp $ */ +/* $OpenBSD: common.c,v 1.11 2016/03/20 20:35:38 schwarze Exp $ */ /* $NetBSD: common.c,v 1.24 2009/12/30 22:37:40 christos Exp $ */ /*- @@ -46,7 +46,7 @@ */ protected el_action_t /*ARGSUSED*/ -ed_end_of_file(EditLine *el, Int c __attribute__((__unused__))) +ed_end_of_file(EditLine *el, wint_t c __attribute__((__unused__))) { re_goto_bottom(el); @@ -60,7 +60,7 @@ ed_end_of_file(EditLine *el, Int c __attribute__((__unused__))) * Insert a character [bound to all insert keys] */ protected el_action_t -ed_insert(EditLine *el, Int c) +ed_insert(EditLine *el, wint_t c) { int count = el->el_state.argument; @@ -103,7 +103,7 @@ ed_insert(EditLine *el, Int c) */ protected el_action_t /*ARGSUSED*/ -ed_delete_prev_word(EditLine *el, Int c __attribute__((__unused__))) +ed_delete_prev_word(EditLine *el, wint_t c __attribute__((__unused__))) { Char *cp, *p, *kp; @@ -131,7 +131,7 @@ ed_delete_prev_word(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -ed_delete_next_char(EditLine *el, Int c) +ed_delete_next_char(EditLine *el, wint_t c) { #ifdef notdef /* XXX */ #define EL el->el_line @@ -181,7 +181,7 @@ ed_delete_next_char(EditLine *el, Int c) */ protected el_action_t /*ARGSUSED*/ -ed_kill_line(EditLine *el, Int c __attribute__((__unused__))) +ed_kill_line(EditLine *el, wint_t c __attribute__((__unused__))) { Char *kp, *cp; @@ -202,7 +202,7 @@ ed_kill_line(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -ed_move_to_end(EditLine *el, Int c __attribute__((__unused__))) +ed_move_to_end(EditLine *el, wint_t c __attribute__((__unused__))) { el->el_line.cursor = el->el_line.lastchar; @@ -225,7 +225,7 @@ ed_move_to_end(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -ed_move_to_beg(EditLine *el, Int c __attribute__((__unused__))) +ed_move_to_beg(EditLine *el, wint_t c __attribute__((__unused__))) { el->el_line.cursor = el->el_line.buffer; @@ -248,7 +248,7 @@ ed_move_to_beg(EditLine *el, Int c __attribute__((__unused__))) * [^T] [^T] */ protected el_action_t -ed_transpose_chars(EditLine *el, Int c) +ed_transpose_chars(EditLine *el, wint_t c) { if (el->el_line.cursor < el->el_line.lastchar) { @@ -274,7 +274,7 @@ ed_transpose_chars(EditLine *el, Int c) */ protected el_action_t /*ARGSUSED*/ -ed_next_char(EditLine *el, Int c __attribute__((__unused__))) +ed_next_char(EditLine *el, wint_t c __attribute__((__unused__))) { Char *lim = el->el_line.lastchar; @@ -303,7 +303,7 @@ ed_next_char(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -ed_prev_word(EditLine *el, Int c __attribute__((__unused__))) +ed_prev_word(EditLine *el, wint_t c __attribute__((__unused__))) { if (el->el_line.cursor == el->el_line.buffer) @@ -329,7 +329,7 @@ ed_prev_word(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -ed_prev_char(EditLine *el, Int c __attribute__((__unused__))) +ed_prev_char(EditLine *el, wint_t c __attribute__((__unused__))) { if (el->el_line.cursor > el->el_line.buffer) { @@ -353,7 +353,7 @@ ed_prev_char(EditLine *el, Int c __attribute__((__unused__))) * [^V] [^V] */ protected el_action_t -ed_quoted_insert(EditLine *el, Int c) +ed_quoted_insert(EditLine *el, wint_t c) { int num; Char tc; @@ -373,7 +373,7 @@ ed_quoted_insert(EditLine *el, Int c) * Adds to argument or enters a digit */ protected el_action_t -ed_digit(EditLine *el, Int c) +ed_digit(EditLine *el, wint_t c) { if (!Isdigit(c)) @@ -401,7 +401,7 @@ ed_digit(EditLine *el, Int c) * For ESC-n */ protected el_action_t -ed_argument_digit(EditLine *el, Int c) +ed_argument_digit(EditLine *el, wint_t c) { if (!Isdigit(c)) @@ -426,7 +426,7 @@ ed_argument_digit(EditLine *el, Int c) */ protected el_action_t /*ARGSUSED*/ -ed_unassigned(EditLine *el, Int c __attribute__((__unused__))) +ed_unassigned(EditLine *el, wint_t c __attribute__((__unused__))) { return CC_ERROR; @@ -444,7 +444,7 @@ ed_unassigned(EditLine *el, Int c __attribute__((__unused__))) protected el_action_t /*ARGSUSED*/ ed_tty_sigint(EditLine *el __attribute__((__unused__)), - Int c __attribute__((__unused__))) + wint_t c __attribute__((__unused__))) { return CC_NORM; @@ -458,7 +458,7 @@ ed_tty_sigint(EditLine *el __attribute__((__unused__)), protected el_action_t /*ARGSUSED*/ ed_tty_dsusp(EditLine *el __attribute__((__unused__)), - Int c __attribute__((__unused__))) + wint_t c __attribute__((__unused__))) { return CC_NORM; @@ -472,7 +472,7 @@ ed_tty_dsusp(EditLine *el __attribute__((__unused__)), protected el_action_t /*ARGSUSED*/ ed_tty_flush_output(EditLine *el __attribute__((__unused__)), - Int c __attribute__((__unused__))) + wint_t c __attribute__((__unused__))) { return CC_NORM; @@ -486,7 +486,7 @@ ed_tty_flush_output(EditLine *el __attribute__((__unused__)), protected el_action_t /*ARGSUSED*/ ed_tty_sigquit(EditLine *el __attribute__((__unused__)), - Int c __attribute__((__unused__))) + wint_t c __attribute__((__unused__))) { return CC_NORM; @@ -500,7 +500,7 @@ ed_tty_sigquit(EditLine *el __attribute__((__unused__)), protected el_action_t /*ARGSUSED*/ ed_tty_sigtstp(EditLine *el __attribute__((__unused__)), - Int c __attribute__((__unused__))) + wint_t c __attribute__((__unused__))) { return CC_NORM; @@ -514,7 +514,7 @@ ed_tty_sigtstp(EditLine *el __attribute__((__unused__)), protected el_action_t /*ARGSUSED*/ ed_tty_stop_output(EditLine *el __attribute__((__unused__)), - Int c __attribute__((__unused__))) + wint_t c __attribute__((__unused__))) { return CC_NORM; @@ -528,7 +528,7 @@ ed_tty_stop_output(EditLine *el __attribute__((__unused__)), protected el_action_t /*ARGSUSED*/ ed_tty_start_output(EditLine *el __attribute__((__unused__)), - Int c __attribute__((__unused__))) + wint_t c __attribute__((__unused__))) { return CC_NORM; @@ -541,7 +541,7 @@ ed_tty_start_output(EditLine *el __attribute__((__unused__)), */ protected el_action_t /*ARGSUSED*/ -ed_newline(EditLine *el, Int c __attribute__((__unused__))) +ed_newline(EditLine *el, wint_t c __attribute__((__unused__))) { re_goto_bottom(el); @@ -557,7 +557,7 @@ ed_newline(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -ed_delete_prev_char(EditLine *el, Int c __attribute__((__unused__))) +ed_delete_prev_char(EditLine *el, wint_t c __attribute__((__unused__))) { if (el->el_line.cursor <= el->el_line.buffer) @@ -577,7 +577,7 @@ ed_delete_prev_char(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -ed_clear_screen(EditLine *el, Int c __attribute__((__unused__))) +ed_clear_screen(EditLine *el, wint_t c __attribute__((__unused__))) { terminal_clear_screen(el); /* clear the whole real screen */ @@ -593,7 +593,7 @@ ed_clear_screen(EditLine *el, Int c __attribute__((__unused__))) protected el_action_t /*ARGSUSED*/ ed_redisplay(EditLine *el __attribute__((__unused__)), - Int c __attribute__((__unused__))) + wint_t c __attribute__((__unused__))) { return CC_REDISPLAY; @@ -606,7 +606,7 @@ ed_redisplay(EditLine *el __attribute__((__unused__)), */ protected el_action_t /*ARGSUSED*/ -ed_start_over(EditLine *el, Int c __attribute__((__unused__))) +ed_start_over(EditLine *el, wint_t c __attribute__((__unused__))) { ch_reset(el, 0); @@ -621,7 +621,7 @@ ed_start_over(EditLine *el, Int c __attribute__((__unused__))) protected el_action_t /*ARGSUSED*/ ed_sequence_lead_in(EditLine *el __attribute__((__unused__)), - Int c __attribute__((__unused__))) + wint_t c __attribute__((__unused__))) { return CC_NORM; @@ -634,7 +634,7 @@ ed_sequence_lead_in(EditLine *el __attribute__((__unused__)), */ protected el_action_t /*ARGSUSED*/ -ed_prev_history(EditLine *el, Int c __attribute__((__unused__))) +ed_prev_history(EditLine *el, wint_t c __attribute__((__unused__))) { char beep = 0; int sv_event = el->el_history.eventno; @@ -672,7 +672,7 @@ ed_prev_history(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -ed_next_history(EditLine *el, Int c __attribute__((__unused__))) +ed_next_history(EditLine *el, wint_t c __attribute__((__unused__))) { el_action_t beep = CC_REFRESH, rval; @@ -699,7 +699,7 @@ ed_next_history(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -ed_search_prev_history(EditLine *el, Int c __attribute__((__unused__))) +ed_search_prev_history(EditLine *el, wint_t c __attribute__((__unused__))) { const Char *hp; int h; @@ -767,7 +767,7 @@ ed_search_prev_history(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -ed_search_next_history(EditLine *el, Int c __attribute__((__unused__))) +ed_search_next_history(EditLine *el, wint_t c __attribute__((__unused__))) { const Char *hp; int h; @@ -821,7 +821,7 @@ ed_search_next_history(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -ed_prev_line(EditLine *el, Int c __attribute__((__unused__))) +ed_prev_line(EditLine *el, wint_t c __attribute__((__unused__))) { Char *ptr; int nchars = c_hpos(el); @@ -864,7 +864,7 @@ ed_prev_line(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -ed_next_line(EditLine *el, Int c __attribute__((__unused__))) +ed_next_line(EditLine *el, wint_t c __attribute__((__unused__))) { Char *ptr; int nchars = c_hpos(el); @@ -898,7 +898,7 @@ ed_next_line(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -ed_command(EditLine *el, Int c __attribute__((__unused__))) +ed_command(EditLine *el, wint_t c __attribute__((__unused__))) { Char tmpbuf[EL_BUFSIZ]; int tmplen; diff --git a/lib/libedit/emacs.c b/lib/libedit/emacs.c index 52e5834fe3e..098041738c9 100644 --- a/lib/libedit/emacs.c +++ b/lib/libedit/emacs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: emacs.c,v 1.11 2016/01/30 12:22:20 schwarze Exp $ */ +/* $OpenBSD: emacs.c,v 1.12 2016/03/20 20:35:38 schwarze Exp $ */ /* $NetBSD: emacs.c,v 1.25 2011/07/29 15:16:33 christos Exp $ */ /*- @@ -46,7 +46,7 @@ */ protected el_action_t /*ARGSUSED*/ -em_delete_or_list(EditLine *el, Int c) +em_delete_or_list(EditLine *el, wint_t c) { if (el->el_line.cursor == el->el_line.lastchar) { @@ -82,7 +82,7 @@ em_delete_or_list(EditLine *el, Int c) */ protected el_action_t /*ARGSUSED*/ -em_delete_next_word(EditLine *el, Int c __attribute__((__unused__))) +em_delete_next_word(EditLine *el, wint_t c __attribute__((__unused__))) { Char *cp, *p, *kp; @@ -111,7 +111,7 @@ em_delete_next_word(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -em_yank(EditLine *el, Int c __attribute__((__unused__))) +em_yank(EditLine *el, wint_t c __attribute__((__unused__))) { Char *kp, *cp; @@ -147,7 +147,7 @@ em_yank(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -em_kill_line(EditLine *el, Int c __attribute__((__unused__))) +em_kill_line(EditLine *el, wint_t c __attribute__((__unused__))) { Char *kp, *cp; @@ -169,7 +169,7 @@ em_kill_line(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -em_kill_region(EditLine *el, Int c __attribute__((__unused__))) +em_kill_region(EditLine *el, wint_t c __attribute__((__unused__))) { Char *kp, *cp; @@ -202,7 +202,7 @@ em_kill_region(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -em_copy_region(EditLine *el, Int c __attribute__((__unused__))) +em_copy_region(EditLine *el, wint_t c __attribute__((__unused__))) { Char *kp, *cp; @@ -231,7 +231,7 @@ em_copy_region(EditLine *el, Int c __attribute__((__unused__))) * Gosling emacs transpose chars [^T] */ protected el_action_t -em_gosmacs_transpose(EditLine *el, Int c) +em_gosmacs_transpose(EditLine *el, wint_t c) { if (el->el_line.cursor > &el->el_line.buffer[1]) { @@ -251,7 +251,7 @@ em_gosmacs_transpose(EditLine *el, Int c) */ protected el_action_t /*ARGSUSED*/ -em_next_word(EditLine *el, Int c __attribute__((__unused__))) +em_next_word(EditLine *el, wint_t c __attribute__((__unused__))) { if (el->el_line.cursor == el->el_line.lastchar) return CC_ERROR; @@ -276,7 +276,7 @@ em_next_word(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -em_upper_case(EditLine *el, Int c __attribute__((__unused__))) +em_upper_case(EditLine *el, wint_t c __attribute__((__unused__))) { Char *cp, *ep; @@ -300,7 +300,7 @@ em_upper_case(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -em_capitol_case(EditLine *el, Int c __attribute__((__unused__))) +em_capitol_case(EditLine *el, wint_t c __attribute__((__unused__))) { Char *cp, *ep; @@ -332,7 +332,7 @@ em_capitol_case(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -em_lower_case(EditLine *el, Int c __attribute__((__unused__))) +em_lower_case(EditLine *el, wint_t c __attribute__((__unused__))) { Char *cp, *ep; @@ -356,7 +356,7 @@ em_lower_case(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -em_set_mark(EditLine *el, Int c __attribute__((__unused__))) +em_set_mark(EditLine *el, wint_t c __attribute__((__unused__))) { el->el_chared.c_kill.mark = el->el_line.cursor; @@ -370,7 +370,7 @@ em_set_mark(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -em_exchange_mark(EditLine *el, Int c __attribute__((__unused__))) +em_exchange_mark(EditLine *el, wint_t c __attribute__((__unused__))) { Char *cp; @@ -387,7 +387,7 @@ em_exchange_mark(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -em_universal_argument(EditLine *el, Int c __attribute__((__unused__))) +em_universal_argument(EditLine *el, wint_t c __attribute__((__unused__))) { /* multiply current argument by 4 */ if (el->el_state.argument > 1000000) @@ -404,7 +404,7 @@ em_universal_argument(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -em_meta_next(EditLine *el, Int c __attribute__((__unused__))) +em_meta_next(EditLine *el, wint_t c __attribute__((__unused__))) { el->el_state.metanext = 1; @@ -417,7 +417,7 @@ em_meta_next(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -em_toggle_overwrite(EditLine *el, Int c __attribute__((__unused__))) +em_toggle_overwrite(EditLine *el, wint_t c __attribute__((__unused__))) { el->el_state.inputmode = (el->el_state.inputmode == MODE_INSERT) ? @@ -431,7 +431,7 @@ em_toggle_overwrite(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -em_copy_prev_word(EditLine *el, Int c __attribute__((__unused__))) +em_copy_prev_word(EditLine *el, wint_t c __attribute__((__unused__))) { Char *cp, *oldc, *dp; @@ -458,7 +458,7 @@ em_copy_prev_word(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -em_inc_search_next(EditLine *el, Int c __attribute__((__unused__))) +em_inc_search_next(EditLine *el, wint_t c __attribute__((__unused__))) { el->el_search.patlen = 0; @@ -471,7 +471,7 @@ em_inc_search_next(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -em_inc_search_prev(EditLine *el, Int c __attribute__((__unused__))) +em_inc_search_prev(EditLine *el, wint_t c __attribute__((__unused__))) { el->el_search.patlen = 0; @@ -485,7 +485,7 @@ em_inc_search_prev(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -em_delete_prev_char(EditLine *el, Int c __attribute__((__unused__))) +em_delete_prev_char(EditLine *el, wint_t c __attribute__((__unused__))) { if (el->el_line.cursor <= el->el_line.buffer) diff --git a/lib/libedit/keymacro.c b/lib/libedit/keymacro.c index 64a52823386..17da167575c 100644 --- a/lib/libedit/keymacro.c +++ b/lib/libedit/keymacro.c @@ -1,4 +1,4 @@ -/* $OpenBSD: keymacro.c,v 1.5 2016/01/31 20:42:33 schwarze Exp $ */ +/* $OpenBSD: keymacro.c,v 1.6 2016/03/20 20:35:38 schwarze Exp $ */ /* $NetBSD: key.c,v 1.23 2009/12/30 22:37:40 christos Exp $ */ /*- @@ -79,7 +79,7 @@ private int node_trav(EditLine *, keymacro_node_t *, Char *, keymacro_value_t *); private int node__try(EditLine *, keymacro_node_t *, const Char *, keymacro_value_t *, int); -private keymacro_node_t *node__get(Int); +private keymacro_node_t *node__get(wint_t); private void node__free(keymacro_node_t *); private void node__put(EditLine *, keymacro_node_t *); private int node__delete(EditLine *, keymacro_node_t **, @@ -452,7 +452,7 @@ node__put(EditLine *el, keymacro_node_t *ptr) * Returns pointer to a keymacro_node_t for ch. */ private keymacro_node_t * -node__get(Int ch) +node__get(wint_t ch) { keymacro_node_t *ptr; diff --git a/lib/libedit/makelist b/lib/libedit/makelist index 98ca5318347..9ca44e592c5 100644 --- a/lib/libedit/makelist +++ b/lib/libedit/makelist @@ -77,7 +77,8 @@ _EOF # XXX: need a space between name and prototype so that -fc and -fh # parsing is much easier # - printf("protected el_action_t\t%s (EditLine *, Int);\n", name); + printf("protected el_action_t\t%s (EditLine *, wint_t);\n", + name); } } END { @@ -161,7 +162,7 @@ _EOF END { printf("#define\t%-30.30s\t%3d\n", "EL_NUM_FCNS", count); - printf("typedef el_action_t (*el_func_t)(EditLine *, Int);"); + printf("typedef el_action_t (*el_func_t)(EditLine *, wint_t);"); printf("\nprotected const el_func_t* func__get(void);\n"); printf("#endif /* _h_fcns_c */\n"); }' diff --git a/lib/libedit/map.c b/lib/libedit/map.c index 5630b63bc17..4ef0879c4f4 100644 --- a/lib/libedit/map.c +++ b/lib/libedit/map.c @@ -1,4 +1,4 @@ -/* $OpenBSD: map.c,v 1.16 2016/01/30 17:32:52 schwarze Exp $ */ +/* $OpenBSD: map.c,v 1.17 2016/03/20 20:35:38 schwarze Exp $ */ /* $NetBSD: map.c,v 1.25 2009/12/30 22:37:40 christos Exp $ */ /*- @@ -42,7 +42,7 @@ #include "el.h" private void map_print_key(EditLine *, el_action_t *, const Char *); -private void map_print_some_keys(EditLine *, el_action_t *, Int, Int); +private void map_print_some_keys(EditLine *, el_action_t *, wint_t, wint_t); private void map_print_all_keys(EditLine *); private void map_init_nls(EditLine *); private void map_init_meta(EditLine *); @@ -1137,7 +1137,7 @@ map_print_key(EditLine *el, el_action_t *map, const Char *in) * Print keys from first to last */ private void -map_print_some_keys(EditLine *el, el_action_t *map, Int first, Int last) +map_print_some_keys(EditLine *el, el_action_t *map, wint_t first, wint_t last) { el_bindings_t *bp, *ep; Char firstbuf[2], lastbuf[2]; @@ -1295,8 +1295,8 @@ map_bind(EditLine *el, int argc, const Char **argv) return 0; default: (void) fprintf(el->el_errfile, - "" FSTR ": Invalid switch `%c'.\n", - argv[0], p[1]); + "" FSTR ": Invalid switch `%lc'.\n", + argv[0], (wint_t)p[1]); } else break; diff --git a/lib/libedit/parse.c b/lib/libedit/parse.c index 4b6a88404f1..1ada67c92ca 100644 --- a/lib/libedit/parse.c +++ b/lib/libedit/parse.c @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.c,v 1.14 2016/01/30 12:22:20 schwarze Exp $ */ +/* $OpenBSD: parse.c,v 1.15 2016/03/20 20:35:38 schwarze Exp $ */ /* $NetBSD: parse.c,v 1.23 2009/12/30 22:37:40 christos Exp $ */ /*- @@ -133,7 +133,7 @@ protected int parse__escape(const Char **ptr) { const Char *p; - Int c; + wint_t c; p = *ptr; diff --git a/lib/libedit/refresh.c b/lib/libedit/refresh.c index 82f18528bc7..fbe4984d234 100644 --- a/lib/libedit/refresh.c +++ b/lib/libedit/refresh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: refresh.c,v 1.12 2016/01/30 00:06:39 schwarze Exp $ */ +/* $OpenBSD: refresh.c,v 1.13 2016/03/20 20:35:38 schwarze Exp $ */ /* $NetBSD: refresh.c,v 1.37 2011/07/29 23:44:45 christos Exp $ */ /*- @@ -46,11 +46,11 @@ #include "el.h" private void re_nextline(EditLine *); -private void re_addc(EditLine *, Int); +private void re_addc(EditLine *, wint_t); private void re_update_line(EditLine *, Char *, Char *, int); private void re_insert (EditLine *, Char *, int, int, Char *, int); private void re_delete(EditLine *, Char *, int, int, int); -private void re_fastputc(EditLine *, Int); +private void re_fastputc(EditLine *, wint_t); private void re_clear_eol(EditLine *, int, int, int); private void re__strncopy(Char *, Char *, size_t); private void re__copy_and_pad(Char *, const Char *, size_t); @@ -119,7 +119,7 @@ re_nextline(EditLine *el) * Draw c, expanding tabs, control chars etc. */ private void -re_addc(EditLine *el, Int c) +re_addc(EditLine *el, wint_t c) { switch (ct_chr_class((Char)c)) { case CHTYPE_TAB: /* expand the tab */ @@ -155,10 +155,10 @@ re_addc(EditLine *el, Int c) * Draw the character given */ protected void -re_putc(EditLine *el, Int c, int shift) +re_putc(EditLine *el, wint_t c, int shift) { int i, w = Width(c); - ELRE_DEBUG(1, (__F, "printing %5x '%c'\r\n", c, c)); + ELRE_DEBUG(1, (__F, "printing %5x '%lc'\r\n", c, c)); while (shift && (el->el_refresh.r_cursor.h + w > el->el_terminal.t_size.h)) re_putc(el, ' ', 1); @@ -1046,7 +1046,7 @@ re_refresh_cursor(EditLine *el) * Add a character fast. */ private void -re_fastputc(EditLine *el, Int c) +re_fastputc(EditLine *el, wint_t c) { int w = Width((Char)c); while (w > 1 && el->el_cursor.h + w > el->el_terminal.t_size.h) diff --git a/lib/libedit/refresh.h b/lib/libedit/refresh.h index 9992525b05f..c91f7ff4d78 100644 --- a/lib/libedit/refresh.h +++ b/lib/libedit/refresh.h @@ -1,4 +1,4 @@ -/* $OpenBSD: refresh.h,v 1.7 2010/06/30 00:05:35 nicm Exp $ */ +/* $OpenBSD: refresh.h,v 1.8 2016/03/20 20:35:38 schwarze Exp $ */ /* $NetBSD: refresh.h,v 1.6 2009/12/30 22:37:40 christos Exp $ */ /*- @@ -49,7 +49,7 @@ typedef struct { int r_newcv; } el_refresh_t; -protected void re_putc(EditLine *, Int, int); +protected void re_putc(EditLine *, wint_t, int); protected void re_clear_lines(EditLine *); protected void re_clear_display(EditLine *); protected void re_refresh(EditLine *); diff --git a/lib/libedit/search.c b/lib/libedit/search.c index d1fead9e9aa..067346db361 100644 --- a/lib/libedit/search.c +++ b/lib/libedit/search.c @@ -1,4 +1,4 @@ -/* $OpenBSD: search.c,v 1.16 2016/01/30 17:32:52 schwarze Exp $ */ +/* $OpenBSD: search.c,v 1.17 2016/03/20 20:35:38 schwarze Exp $ */ /* $NetBSD: search.c,v 1.24 2010/04/15 00:57:33 christos Exp $ */ /*- @@ -558,7 +558,7 @@ ce_search_line(EditLine *el, int dir) * Vi repeat search */ protected el_action_t -cv_repeat_srch(EditLine *el, Int c) +cv_repeat_srch(EditLine *el, wint_t c) { #ifdef SDEBUG @@ -584,14 +584,14 @@ cv_repeat_srch(EditLine *el, Int c) * Vi character search */ protected el_action_t -cv_csearch(EditLine *el, int direction, Int ch, int count, int tflag) +cv_csearch(EditLine *el, int direction, wint_t ch, int count, int tflag) { Char *cp; if (ch == 0) return CC_ERROR; - if (ch == -1) { + if (ch == (wint_t)-1) { Char c; if (FUN(el,getc)(el, &c) != 1) return ed_end_of_file(el, 0); @@ -605,14 +605,14 @@ cv_csearch(EditLine *el, int direction, Int ch, int count, int tflag) cp = el->el_line.cursor; while (count--) { - if (*cp == ch) + if ((wint_t)*cp == ch) cp += direction; for (;;cp += direction) { if (cp >= el->el_line.lastchar) return CC_ERROR; if (cp < el->el_line.buffer) return CC_ERROR; - if (*cp == ch) + if ((wint_t)*cp == ch) break; } } diff --git a/lib/libedit/search.h b/lib/libedit/search.h index 1f8d774c0b3..c2e719c8b47 100644 --- a/lib/libedit/search.h +++ b/lib/libedit/search.h @@ -1,4 +1,4 @@ -/* $OpenBSD: search.h,v 1.8 2010/06/30 00:05:35 nicm Exp $ */ +/* $OpenBSD: search.h,v 1.9 2016/03/20 20:35:38 schwarze Exp $ */ /* $NetBSD: search.h,v 1.9 2009/12/30 22:37:40 christos Exp $ */ /*- @@ -61,7 +61,7 @@ protected void c_setpat(EditLine *); protected el_action_t ce_inc_search(EditLine *, int); protected el_action_t cv_search(EditLine *, int); protected el_action_t ce_search_line(EditLine *, int); -protected el_action_t cv_repeat_srch(EditLine *, Int); -protected el_action_t cv_csearch(EditLine *, int, Int, int, int); +protected el_action_t cv_repeat_srch(EditLine *, wint_t); +protected el_action_t cv_csearch(EditLine *, int, wint_t, int, int); #endif /* _h_el_search */ diff --git a/lib/libedit/terminal.c b/lib/libedit/terminal.c index f1526f71817..1a3a72a6319 100644 --- a/lib/libedit/terminal.c +++ b/lib/libedit/terminal.c @@ -1,4 +1,4 @@ -/* $OpenBSD: terminal.c,v 1.6 2016/01/30 17:32:52 schwarze Exp $ */ +/* $OpenBSD: terminal.c,v 1.7 2016/03/20 20:35:38 schwarze Exp $ */ /* $NetBSD: term.c,v 1.57 2009/12/30 22:37:40 christos Exp $ */ /*- @@ -1236,11 +1236,11 @@ terminal_tputs(EditLine *el, const char *cap, int affcnt) * Add a character */ protected int -terminal__putc(EditLine *el, Int c) +terminal__putc(EditLine *el, wint_t c) { char buf[MB_LEN_MAX +1]; ssize_t i; - if (c == MB_FILL_CHAR) + if (c == (wint_t)MB_FILL_CHAR) return 0; i = ct_encode_char(buf, MB_LEN_MAX, c); if (i <= 0) @@ -1263,7 +1263,7 @@ terminal__flush(EditLine *el) * Write the given character out, in a human readable form */ protected void -terminal_writec(EditLine *el, Int c) +terminal_writec(EditLine *el, wint_t c) { Char visbuf[VISUAL_WIDTH_MAX +1]; ssize_t vcnt = ct_visual_char(visbuf, VISUAL_WIDTH_MAX, c); diff --git a/lib/libedit/terminal.h b/lib/libedit/terminal.h index fab7b103dd1..8836d0a5822 100644 --- a/lib/libedit/terminal.h +++ b/lib/libedit/terminal.h @@ -1,4 +1,4 @@ -/* $OpenBSD: terminal.h,v 1.3 2016/01/30 00:06:39 schwarze Exp $ */ +/* $OpenBSD: terminal.h,v 1.4 2016/03/20 20:35:38 schwarze Exp $ */ /* $NetBSD: term.h,v 1.21 2009/12/30 22:37:40 christos Exp $ */ /*- @@ -104,8 +104,8 @@ protected int terminal_settc(EditLine *, int, const Char **); protected int terminal_gettc(EditLine *, int, char **); protected int terminal_telltc(EditLine *, int, const Char **); protected int terminal_echotc(EditLine *, int, const Char **); -protected void terminal_writec(EditLine *, Int); -protected int terminal__putc(EditLine *, Int); +protected void terminal_writec(EditLine *, wint_t); +protected int terminal__putc(EditLine *, wint_t); protected void terminal__flush(EditLine *); /* diff --git a/lib/libedit/tty.c b/lib/libedit/tty.c index 7ddfa8ec597..3a9ce30e7f2 100644 --- a/lib/libedit/tty.c +++ b/lib/libedit/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.18 2016/01/30 12:22:20 schwarze Exp $ */ +/* $OpenBSD: tty.c,v 1.19 2016/03/20 20:35:38 schwarze Exp $ */ /* $NetBSD: tty.c,v 1.34 2011/01/27 23:11:40 christos Exp $ */ /*- @@ -52,7 +52,7 @@ typedef struct ttymodes_t { } ttymodes_t; typedef struct ttymap_t { - Int nch, och; /* Internal and termio rep of chars */ + wint_t nch, och; /* Internal and termio rep of chars */ el_action_t bind[3]; /* emacs, vi, and vi-cmd */ } ttymap_t; @@ -148,7 +148,7 @@ private const ttymap_t tty_map[] = { {C_LNEXT, VLNEXT, {ED_QUOTED_INSERT, ED_QUOTED_INSERT, ED_UNASSIGNED}}, #endif /* VLNEXT */ - {-1, -1, + {(wint_t)-1, (wint_t)-1, {ED_UNASSIGNED, ED_UNASSIGNED, ED_UNASSIGNED}} }; @@ -889,7 +889,7 @@ tty_bind_char(EditLine *el, int force) dalt = NULL; } - for (tp = tty_map; tp->nch != -1; tp++) { + for (tp = tty_map; tp->nch != (wint_t)-1; tp++) { new[0] = t_n[tp->nch]; old[0] = t_o[tp->och]; if (new[0] == old[0] && !force) @@ -1162,7 +1162,7 @@ tty_stty(EditLine *el, int argc __attribute__((__unused__)), const Char **argv) break; default: (void) fprintf(el->el_errfile, - "%s: Unknown switch `%c'.\n", + "%s: Unknown switch `%lc'.\n", name, argv[0][1]); return -1; } diff --git a/lib/libedit/vi.c b/lib/libedit/vi.c index 78474c29372..3b422ef4524 100644 --- a/lib/libedit/vi.c +++ b/lib/libedit/vi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vi.c,v 1.15 2016/01/30 17:32:52 schwarze Exp $ */ +/* $OpenBSD: vi.c,v 1.16 2016/03/20 20:35:38 schwarze Exp $ */ /* $NetBSD: vi.c,v 1.33 2011/02/17 16:44:48 joerg Exp $ */ /*- @@ -44,19 +44,19 @@ */ #include "el.h" -private el_action_t cv_action(EditLine *, Int); -private el_action_t cv_paste(EditLine *, Int); +private el_action_t cv_action(EditLine *, wint_t); +private el_action_t cv_paste(EditLine *, wint_t); /* cv_action(): * Handle vi actions. */ private el_action_t -cv_action(EditLine *el, Int c) +cv_action(EditLine *el, wint_t c) { if (el->el_chared.c_vcmd.action != NOP) { /* 'cc', 'dd' and (possibly) friends */ - if (c != el->el_chared.c_vcmd.action) + if (c != (wint_t)el->el_chared.c_vcmd.action) return CC_ERROR; if (!(c & YANK)) @@ -83,7 +83,7 @@ cv_action(EditLine *el, Int c) * Paste previous deletion before or after the cursor */ private el_action_t -cv_paste(EditLine *el, Int c) +cv_paste(EditLine *el, wint_t c) { c_kill_t *k = &el->el_chared.c_kill; size_t len = (size_t)(k->last - k->buf); @@ -115,7 +115,7 @@ cv_paste(EditLine *el, Int c) */ protected el_action_t /*ARGSUSED*/ -vi_paste_next(EditLine *el, Int c __attribute__((__unused__))) +vi_paste_next(EditLine *el, wint_t c __attribute__((__unused__))) { return cv_paste(el, 0); @@ -128,7 +128,7 @@ vi_paste_next(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -vi_paste_prev(EditLine *el, Int c __attribute__((__unused__))) +vi_paste_prev(EditLine *el, wint_t c __attribute__((__unused__))) { return cv_paste(el, 1); @@ -141,7 +141,7 @@ vi_paste_prev(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -vi_prev_big_word(EditLine *el, Int c __attribute__((__unused__))) +vi_prev_big_word(EditLine *el, wint_t c __attribute__((__unused__))) { if (el->el_line.cursor == el->el_line.buffer) @@ -166,7 +166,7 @@ vi_prev_big_word(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -vi_prev_word(EditLine *el, Int c __attribute__((__unused__))) +vi_prev_word(EditLine *el, wint_t c __attribute__((__unused__))) { if (el->el_line.cursor == el->el_line.buffer) @@ -191,7 +191,7 @@ vi_prev_word(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -vi_next_big_word(EditLine *el, Int c __attribute__((__unused__))) +vi_next_big_word(EditLine *el, wint_t c __attribute__((__unused__))) { if (el->el_line.cursor >= el->el_line.lastchar - 1) @@ -215,7 +215,7 @@ vi_next_big_word(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -vi_next_word(EditLine *el, Int c __attribute__((__unused__))) +vi_next_word(EditLine *el, wint_t c __attribute__((__unused__))) { if (el->el_line.cursor >= el->el_line.lastchar - 1) @@ -238,7 +238,7 @@ vi_next_word(EditLine *el, Int c __attribute__((__unused__))) * [~] */ protected el_action_t -vi_change_case(EditLine *el, Int c) +vi_change_case(EditLine *el, wint_t c) { int i; @@ -270,7 +270,7 @@ vi_change_case(EditLine *el, Int c) */ protected el_action_t /*ARGSUSED*/ -vi_change_meta(EditLine *el, Int c __attribute__((__unused__))) +vi_change_meta(EditLine *el, wint_t c __attribute__((__unused__))) { /* @@ -287,7 +287,7 @@ vi_change_meta(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -vi_insert_at_bol(EditLine *el, Int c __attribute__((__unused__))) +vi_insert_at_bol(EditLine *el, wint_t c __attribute__((__unused__))) { el->el_line.cursor = el->el_line.buffer; @@ -303,7 +303,7 @@ vi_insert_at_bol(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -vi_replace_char(EditLine *el, Int c __attribute__((__unused__))) +vi_replace_char(EditLine *el, wint_t c __attribute__((__unused__))) { if (el->el_line.cursor >= el->el_line.lastchar) @@ -322,7 +322,7 @@ vi_replace_char(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -vi_replace_mode(EditLine *el, Int c __attribute__((__unused__))) +vi_replace_mode(EditLine *el, wint_t c __attribute__((__unused__))) { el->el_map.current = el->el_map.key; @@ -338,7 +338,7 @@ vi_replace_mode(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -vi_substitute_char(EditLine *el, Int c __attribute__((__unused__))) +vi_substitute_char(EditLine *el, wint_t c __attribute__((__unused__))) { c_delafter(el, el->el_state.argument); @@ -353,7 +353,7 @@ vi_substitute_char(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -vi_substitute_line(EditLine *el, Int c __attribute__((__unused__))) +vi_substitute_line(EditLine *el, wint_t c __attribute__((__unused__))) { cv_undo(el); @@ -371,7 +371,7 @@ vi_substitute_line(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -vi_change_to_eol(EditLine *el, Int c __attribute__((__unused__))) +vi_change_to_eol(EditLine *el, wint_t c __attribute__((__unused__))) { cv_undo(el); @@ -389,7 +389,7 @@ vi_change_to_eol(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -vi_insert(EditLine *el, Int c __attribute__((__unused__))) +vi_insert(EditLine *el, wint_t c __attribute__((__unused__))) { el->el_map.current = el->el_map.key; @@ -404,7 +404,7 @@ vi_insert(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -vi_add(EditLine *el, Int c __attribute__((__unused__))) +vi_add(EditLine *el, wint_t c __attribute__((__unused__))) { int ret; @@ -429,7 +429,7 @@ vi_add(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -vi_add_at_eol(EditLine *el, Int c __attribute__((__unused__))) +vi_add_at_eol(EditLine *el, wint_t c __attribute__((__unused__))) { el->el_map.current = el->el_map.key; @@ -445,7 +445,7 @@ vi_add_at_eol(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -vi_delete_meta(EditLine *el, Int c __attribute__((__unused__))) +vi_delete_meta(EditLine *el, wint_t c __attribute__((__unused__))) { return cv_action(el, DELETE); @@ -458,7 +458,7 @@ vi_delete_meta(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -vi_end_big_word(EditLine *el, Int c) +vi_end_big_word(EditLine *el, wint_t c __attribute__((__unused__))) { if (el->el_line.cursor == el->el_line.lastchar) @@ -482,7 +482,7 @@ vi_end_big_word(EditLine *el, Int c) */ protected el_action_t /*ARGSUSED*/ -vi_end_word(EditLine *el, Int c __attribute__((__unused__))) +vi_end_word(EditLine *el, wint_t c __attribute__((__unused__))) { if (el->el_line.cursor == el->el_line.lastchar) @@ -506,7 +506,7 @@ vi_end_word(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -vi_undo(EditLine *el, Int c __attribute__((__unused__))) +vi_undo(EditLine *el, wint_t c __attribute__((__unused__))) { c_undo_t un = el->el_chared.c_undo; @@ -533,7 +533,7 @@ vi_undo(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -vi_command_mode(EditLine *el, Int c __attribute__((__unused__))) +vi_command_mode(EditLine *el, wint_t c __attribute__((__unused__))) { /* [Esc] cancels pending action */ @@ -557,7 +557,7 @@ vi_command_mode(EditLine *el, Int c __attribute__((__unused__))) * [0] */ protected el_action_t -vi_zero(EditLine *el, Int c) +vi_zero(EditLine *el, wint_t c) { if (el->el_state.doingarg) @@ -578,7 +578,7 @@ vi_zero(EditLine *el, Int c) */ protected el_action_t /*ARGSUSED*/ -vi_delete_prev_char(EditLine *el, Int c __attribute__((__unused__))) +vi_delete_prev_char(EditLine *el, wint_t c __attribute__((__unused__))) { if (el->el_line.cursor <= el->el_line.buffer) @@ -596,7 +596,7 @@ vi_delete_prev_char(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -vi_list_or_eof(EditLine *el, Int c) +vi_list_or_eof(EditLine *el, wint_t c) { if (el->el_line.cursor == el->el_line.lastchar) { @@ -633,7 +633,7 @@ vi_list_or_eof(EditLine *el, Int c) */ protected el_action_t /*ARGSUSED*/ -vi_kill_line_prev(EditLine *el, Int c __attribute__((__unused__))) +vi_kill_line_prev(EditLine *el, wint_t c __attribute__((__unused__))) { Char *kp, *cp; @@ -654,7 +654,7 @@ vi_kill_line_prev(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -vi_search_prev(EditLine *el, Int c __attribute__((__unused__))) +vi_search_prev(EditLine *el, wint_t c __attribute__((__unused__))) { return cv_search(el, ED_SEARCH_PREV_HISTORY); @@ -667,7 +667,7 @@ vi_search_prev(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -vi_search_next(EditLine *el, Int c __attribute__((__unused__))) +vi_search_next(EditLine *el, wint_t c __attribute__((__unused__))) { return cv_search(el, ED_SEARCH_NEXT_HISTORY); @@ -680,7 +680,7 @@ vi_search_next(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -vi_repeat_search_next(EditLine *el, Int c __attribute__((__unused__))) +vi_repeat_search_next(EditLine *el, wint_t c __attribute__((__unused__))) { if (el->el_search.patlen == 0) @@ -696,7 +696,7 @@ vi_repeat_search_next(EditLine *el, Int c __attribute__((__unused__))) */ /*ARGSUSED*/ protected el_action_t -vi_repeat_search_prev(EditLine *el, Int c __attribute__((__unused__))) +vi_repeat_search_prev(EditLine *el, wint_t c __attribute__((__unused__))) { if (el->el_search.patlen == 0) @@ -714,7 +714,7 @@ vi_repeat_search_prev(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -vi_next_char(EditLine *el, Int c __attribute__((__unused__))) +vi_next_char(EditLine *el, wint_t c __attribute__((__unused__))) { return cv_csearch(el, CHAR_FWD, -1, el->el_state.argument, 0); } @@ -726,7 +726,7 @@ vi_next_char(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -vi_prev_char(EditLine *el, Int c __attribute__((__unused__))) +vi_prev_char(EditLine *el, wint_t c __attribute__((__unused__))) { return cv_csearch(el, CHAR_BACK, -1, el->el_state.argument, 0); } @@ -738,7 +738,7 @@ vi_prev_char(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -vi_to_next_char(EditLine *el, Int c __attribute__((__unused__))) +vi_to_next_char(EditLine *el, wint_t c __attribute__((__unused__))) { return cv_csearch(el, CHAR_FWD, -1, el->el_state.argument, 1); } @@ -750,7 +750,7 @@ vi_to_next_char(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -vi_to_prev_char(EditLine *el, Int c __attribute__((__unused__))) +vi_to_prev_char(EditLine *el, wint_t c __attribute__((__unused__))) { return cv_csearch(el, CHAR_BACK, -1, el->el_state.argument, 1); } @@ -762,7 +762,7 @@ vi_to_prev_char(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -vi_repeat_next_char(EditLine *el, Int c __attribute__((__unused__))) +vi_repeat_next_char(EditLine *el, wint_t c __attribute__((__unused__))) { return cv_csearch(el, el->el_search.chadir, el->el_search.chacha, @@ -776,7 +776,7 @@ vi_repeat_next_char(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -vi_repeat_prev_char(EditLine *el, Int c __attribute__((__unused__))) +vi_repeat_prev_char(EditLine *el, wint_t c __attribute__((__unused__))) { el_action_t r; int dir = el->el_search.chadir; @@ -794,7 +794,7 @@ vi_repeat_prev_char(EditLine *el, Int c __attribute__((__unused__))) */ protected el_action_t /*ARGSUSED*/ -vi_match(EditLine *el, Int c) +vi_match(EditLine *el, wint_t c __attribute__((__unused__))) { const Char match_chars[] = STR("()[]{}"); Char *cp; @@ -841,7 +841,7 @@ vi_match(EditLine *el, Int c) */ protected el_action_t /*ARGSUSED*/ -vi_undo_line(EditLine *el, Int c) +vi_undo_line(EditLine *el, wint_t c __attribute__((__unused__))) { cv_undo(el); @@ -855,7 +855,7 @@ vi_undo_line(EditLine *el, Int c) */ protected el_action_t /*ARGSUSED*/ -vi_to_column(EditLine *el, Int c) +vi_to_column(EditLine *el, wint_t c __attribute__((__unused__))) { el->el_line.cursor = el->el_line.buffer; @@ -869,7 +869,7 @@ vi_to_column(EditLine *el, Int c) */ protected el_action_t /*ARGSUSED*/ -vi_yank_end(EditLine *el, Int c) +vi_yank_end(EditLine *el, wint_t c __attribute__((__unused__))) { cv_yank(el, el->el_line.cursor, @@ -883,7 +883,7 @@ vi_yank_end(EditLine *el, Int c) */ protected el_action_t /*ARGSUSED*/ -vi_yank(EditLine *el, Int c) +vi_yank(EditLine *el, wint_t c __attribute__((__unused__))) { return cv_action(el, YANK); @@ -895,7 +895,7 @@ vi_yank(EditLine *el, Int c) */ protected el_action_t /*ARGSUSED*/ -vi_comment_out(EditLine *el, Int c) +vi_comment_out(EditLine *el, wint_t c __attribute__((__unused__))) { el->el_line.cursor = el->el_line.buffer; @@ -917,7 +917,7 @@ __weakref_visible char *my_get_alias_text(const char *) #endif protected el_action_t /*ARGSUSED*/ -vi_alias(EditLine *el, Int c) +vi_alias(EditLine *el, wint_t c __attribute__((__unused__))) { #ifdef __weak_reference char alias_name[3]; @@ -947,7 +947,7 @@ vi_alias(EditLine *el, Int c) */ protected el_action_t /*ARGSUSED*/ -vi_to_history_line(EditLine *el, Int c) +vi_to_history_line(EditLine *el, wint_t c __attribute__((__unused__))) { int sv_event_no = el->el_history.eventno; el_action_t rval; @@ -992,7 +992,7 @@ vi_to_history_line(EditLine *el, Int c) */ protected el_action_t /*ARGSUSED*/ -vi_histedit(EditLine *el, Int c) +vi_histedit(EditLine *el, wint_t c __attribute__((__unused__))) { int fd; pid_t pid; @@ -1081,7 +1081,7 @@ vi_histedit(EditLine *el, Int c) */ protected el_action_t /*ARGSUSED*/ -vi_history_word(EditLine *el, Int c) +vi_history_word(EditLine *el, wint_t c __attribute__((__unused__))) { const Char *wp = HIST_FIRST(el); const Char *wep, *wsp; @@ -1131,7 +1131,7 @@ vi_history_word(EditLine *el, Int c) */ protected el_action_t /*ARGSUSED*/ -vi_redo(EditLine *el, Int c) +vi_redo(EditLine *el, wint_t c __attribute__((__unused__))) { c_redo_t *r = &el->el_chared.c_redo; |