autfilt: print match count even on parse errors
* bin/autfilt.cc: If -c is used, print the match_count even in present of parse errors. * tests/core/readsave.test: Adjust. * NEWS: Mention the bug.
This commit is contained in:
parent
a032abf0c5
commit
29037c1f55
3 changed files with 17 additions and 11 deletions
|
|
@ -1763,15 +1763,17 @@ main(int argc, char** argv)
|
|||
post.set_level(level);
|
||||
|
||||
autfilt_processor processor(post, o.dict);
|
||||
if (processor.run())
|
||||
return 2;
|
||||
|
||||
// Diagnose unused -x options
|
||||
extra_options.report_unused_options();
|
||||
int err = processor.run();
|
||||
|
||||
if (automaton_format == Count)
|
||||
std::cout << match_count << std::endl;
|
||||
|
||||
// Diagnose unused -x options
|
||||
if (!err)
|
||||
extra_options.report_unused_options();
|
||||
else
|
||||
return 2;
|
||||
|
||||
check_cout();
|
||||
return match_count ? 0 : 1;
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue