diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2016-03-20 20:35:39 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2016-03-20 20:35:39 +0000 |
commit | 1a6015f11d99d7331192eabb204acd6d822841c8 (patch) | |
tree | 8b6b590beeee11f91e9cb9926341ba53ede1f1e6 /lib/libedit/common.c | |
parent | 3cf2531c4a31cce7e0684ec6aa285fc264eebd76 (diff) |
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@
Diffstat (limited to 'lib/libedit/common.c')
-rw-r--r-- | lib/libedit/common.c | 72 |
1 files changed, 36 insertions, 36 deletions
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; |