From 747e296ff656813340c9355d98b0a13cba8473bc Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Tue, 4 Dec 2018 21:29:51 -0600 Subject: Add FLAG(x) macro, expanding to (toys.optflags & FLAG_##x) --- toys/posix/wc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'toys/posix/wc.c') diff --git a/toys/posix/wc.c b/toys/posix/wc.c index 5d362e7d..910e4690 100644 --- a/toys/posix/wc.c +++ b/toys/posix/wc.c @@ -42,7 +42,7 @@ static void show_lengths(unsigned long *lengths, char *name) // And, yes, folks have test scripts that rely on all this nonsense :-( // Note: sufficiently modern versions of coreutils wc will use the smallest // column width necessary to have all columns be equal width rather than 0. - if (!(toys.optc==0 && (toys.optflags & (toys.optflags-1))==0) && toys.optc!=1) + if (!(!toys.optc && !(toys.optflags & (toys.optflags-1))) && toys.optc!=1) space = 7; for (i = 0; i<4; i++) { @@ -82,7 +82,7 @@ static void do_wc(int fd, char *name) for (pos = 0; pos