diff options
| author | 2016-03-20 20:35:38 +0000 | |
|---|---|---|
| committer | 2016-03-20 20:35:38 +0000 | |
| commit | b2589f0b3286bc81be0a2044650199e8c9df0b5c (patch) | |
| tree | 7745d39c923c07ecd2096e0fd865f9eecb27392b /lib/libedit/refresh.c | |
| 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@
Diffstat (limited to 'lib/libedit/refresh.c')
| -rw-r--r-- | lib/libedit/refresh.c | 14 |
1 files changed, 7 insertions, 7 deletions
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) |
