summaryrefslogtreecommitdiff
path: root/.gitignore
diff options
context:
space:
mode:
authorZev Weiss <zev@bewilderbeest.net>2019-11-05 10:40:15 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2019-11-05 12:43:26 -0800
commitcaf60ca732288e12af82d50daebcd64a39cb0083 (patch)
tree25cdb586b517d689fbd8116f945f3a1bad6f8844 /.gitignore
parent268cae478d4d1126c69efd2dcd77e9bc94cf08ba (diff)
downloadgrep-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 '.gitignore')
0 files changed, 0 insertions, 0 deletions