diff options
author | Rob Landley <rob@landley.net> | 2018-12-04 21:29:51 -0600 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2018-12-04 21:29:51 -0600 |
commit | 747e296ff656813340c9355d98b0a13cba8473bc (patch) | |
tree | e7ef2b20be56e2e5a2062168aa822fd6c6139b7d /toys/posix/strings.c | |
parent | 141a075c0e192dc9910e777270114b1864270bfd (diff) | |
download | toybox-747e296ff656813340c9355d98b0a13cba8473bc.tar.gz |
Add FLAG(x) macro, expanding to (toys.optflags & FLAG_##x)
Diffstat (limited to 'toys/posix/strings.c')
-rw-r--r-- | toys/posix/strings.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/toys/posix/strings.c b/toys/posix/strings.c index e33ae960..816280b0 100644 --- a/toys/posix/strings.c +++ b/toys/posix/strings.c @@ -66,9 +66,8 @@ static void do_strings(int fd, char *filename) else { string[count++] = toybuf[i]; if (count == wlen) { - if (toys.optflags & FLAG_f) printf("%s: ", filename); - if (toys.optflags & (FLAG_o|FLAG_t)) - printf(pattern, (long long)(offset - wlen)); + if (FLAG(f)) printf("%s: ", filename); + if (FLAG(o) || FLAG(t)) printf(pattern, (long long)(offset - wlen)); printf("%s", string); } } |