From 790097310085ddc7184d6d3185e4deb9e528e091 Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Fri, 10 May 2019 10:47:43 -0400 Subject: turning on chars turns off bytes; always use "%ju" --- wc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wc.c b/wc.c index 4f7584b..511bd82 100644 --- a/wc.c +++ b/wc.c @@ -51,7 +51,7 @@ void flagprint(uintmax_t n, uintmax_t w, uintmax_t c, char *f, int flags) } if (flags & CHARS || flags & BYTES) { - printf("%lu", c); + printf("%ju", c); } if (f != NULL) { @@ -152,6 +152,7 @@ int main(int argc, char *argv[]) case 'm': flags |= CHARS; + flags &= ~BYTES; break; case 'l': -- cgit v1.2.1