Permalink
Browse files

ticket 29119

  • Loading branch information...
1 parent 944a337 commit 0277c687cae311a1037ff72afcc5920f4498841a @mskala committed Aug 19, 2012
Showing with 8 additions and 3 deletions.
  1. +7 −3 idsgrep/idsgrep.c
  2. +1 −0 idsgrep/test/messages
View
@@ -229,9 +229,13 @@ int main(int argc,char **argv) {
while (optind<argc)
process_file(match_pattern,argv[optind++],num_files>1?0:-1);
- /* read stdin if no other choices */
- if ((num_files==0) && (dictname==NULL))
- process_file(match_pattern,"-",-1);
+ /* read stdin or complain */
+ if (num_files==0) {
+ if (dictname==NULL)
+ process_file(match_pattern,"-",-1);
+ else
+ puts("(no dictionaries were searched)");
+ }
exit(0);
}
View
@@ -10,4 +10,5 @@ rm -f nofile.$$
./idsgrep '?' nofile.$$
./idsgrep -d
./idsgrep -d '?' > /dev/null
+./idsgrep -dxyzzy '?' > /dev/null
./idsgrep '-d?' '?' > /dev/null

0 comments on commit 0277c68

Please sign in to comment.