diff options
author | June McEnroe <june@causal.agency> | 2019-08-27 23:10:09 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2019-08-27 23:10:09 -0400 |
commit | 85423674ad6fec0609726ab4d0e22674e9c1c6c1 (patch) | |
tree | 8343acbea9b735d7eacbe38b77fd0293b5dc9537 /bin/shotty.c | |
parent | Remove host thursday (diff) | |
download | src-85423674ad6fec0609726ab4d0e22674e9c1c6c1.tar.gz src-85423674ad6fec0609726ab4d0e22674e9c1c6c1.zip |
Cast %lc parameter to wint_t
I hadn't realized that's what type %lc takes and suddenly started seeing warnings about it for some reason.
Diffstat (limited to 'bin/shotty.c')
-rw-r--r-- | bin/shotty.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bin/shotty.c b/bin/shotty.c index 41cb4e97..c458f5d2 100644 --- a/bin/shotty.c +++ b/bin/shotty.c @@ -98,7 +98,7 @@ static void span(const struct Style *prev, const struct Cell *cell) { break; case '&': printf("&"); break; case '<': printf("<"); break; case '>': printf(">"); - break; default: printf("%lc", cell->ch); + break; default: printf("%lc", (wint_t)cell->ch); } } @@ -150,7 +150,7 @@ static char updateNUL(wchar_t ch) { return NUL; } if (x + width > cols) { - warnx("cannot fit '%lc'", ch); + warnx("cannot fit '%lc'", (wint_t)ch); return NUL; } @@ -218,7 +218,7 @@ static char updateESC(wchar_t ch) { case '>': return NUL; case CSI: return CSI; case OSC: return OSC; - default: warnx("unhandled ESC %lc", ch); return NUL; + default: warnx("unhandled ESC %lc", (wint_t)ch); return NUL; } } @@ -350,7 +350,7 @@ static char updateCSI(wchar_t ch) { } break; case 't': // ignore - break; default: warnx("unhandled CSI %lc", ch); + break; default: warnx("unhandled CSI %lc", (wint_t)ch); } if (opts.debug) { @@ -361,7 +361,7 @@ static char updateCSI(wchar_t ch) { if (ch < 128 && Name[ch]) { printf("%s\n", Name[ch]); } else { - printf("%lc\n", ch); + printf("%lc\n", (wint_t)ch); } html(); } |