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 | b7e363d56ec656930c3732794ca6127ed3aae8e8 (patch) | |
tree | 5bb905d9e47c395c12f1d8e7f63dd7b997a8664e /bin/shotty.c | |
parent | Remove host thursday (diff) | |
download | src-b7e363d56ec656930c3732794ca6127ed3aae8e8.tar.gz src-b7e363d56ec656930c3732794ca6127ed3aae8e8.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 '')
-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 7cdf2d4a..1fde095f 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(); } |