diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2020-12-30 16:21:49 -0800 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2020-12-30 16:21:49 -0800 |
| commit | eeec0acd0a92bf2e94b3168642faba92ba649178 (patch) | |
| tree | 7882e4b80e599efa2709438a7a486f9f743e89a5 /bpeg.c | |
| parent | a07da1989d7ec515d4bb08051ea6940960577446 (diff) | |
Don't print line numbers when dealing with piped-in input
Diffstat (limited to 'bpeg.c')
| -rw-r--r-- | bpeg.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -112,7 +112,8 @@ static int run_match(grammar_t *g, const char *filename, vm_op_t *pattern, unsig else printf("%s:\n", filename); } - print_match(stdout, f, m, print_options); + print_match(stdout, f, m, + filename ? print_options : print_options & (print_options_t)~PRINT_LINE_NUMBERS); } destroy_file(&f); return 0; |
