diff options
author | Zev Weiss <zev@bewilderbeest.net> | 2019-11-05 10:40:15 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2019-11-05 12:43:26 -0800 |
commit | caf60ca732288e12af82d50daebcd64a39cb0083 (patch) | |
tree | 25cdb586b517d689fbd8116f945f3a1bad6f8844 /THANKS.in | |
parent | 268cae478d4d1126c69efd2dcd77e9bc94cf08ba (diff) | |
download | grep-caf60ca732288e12af82d50daebcd64a39cb0083.tar.gz |
grep: simplify out_file handling
* src/grep.c (print_filenames): New tristate enum (-H, -h, or
neither); supplants with_filenames and no_filenames.
(single_command_line_arg): New variable indicating if grep was run
with a single command-line argument.
(no_filenames): Remove variable.
(grepdirent): Don't twiddle out_file back and forth during recursion.
(grepdesc): Turn off out_file on 'grep -r foo nondirectory'.
(main): Replace with_filenames and no_filenames with print_filenames.
Enable out_file when both -r/-R and multiple arguments are given.
Diffstat (limited to 'THANKS.in')
0 files changed, 0 insertions, 0 deletions