aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2005-07-09 16:37:40 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2005-07-09 16:37:40 +0000
commit5bf8d77137969334af78d2ccf5b48ecbbb0fc017 (patch)
treef554aff26edf2281721a746d486d6fa68d6dd0c4 /src/main.c
parente79e398d70fce001a4d05da2705bb6660acf0a46 (diff)
downloadcflow-5bf8d77137969334af78d2ccf5b48ecbbb0fc017.tar.gz
cflow-5bf8d77137969334af78d2ccf5b48ecbbb0fc017.tar.bz2
(main): Use input_file_count to decide whether to print "no input files" diagnostics.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index c2d96b7..a806bd5 100644
--- a/src/main.c
+++ b/src/main.c
@@ -646,9 +646,6 @@ main(int argc, char **argv)
646 if (argp_parse (&argp, argc, argv, ARGP_IN_ORDER, &index, NULL)) 646 if (argp_parse (&argp, argc, argv, ARGP_IN_ORDER, &index, NULL))
647 exit (1); 647 exit (1);
648 648
649 if (!arglist)
650 error(1, 0, _("no input files"));
651
652 if (print_option == 0) 649 if (print_option == 0)
653 print_option = PRINT_TREE; 650 print_option = PRINT_TREE;
654 651
@@ -665,10 +662,15 @@ main(int argc, char **argv)
665 662
666 argc -= index; 663 argc -= index;
667 argv += index; 664 argv += index;
665
668 while (argc--) { 666 while (argc--) {
669 if (source(*argv++) == 0) 667 if (source(*argv++) == 0)
670 yyparse(); 668 yyparse();
671 } 669 }
670
671 if (input_file_count == 0)
672 error(1, 0, _("no input files"));
673
672 cleanup(); 674 cleanup();
673 675
674 output(); 676 output();

Return to:

Send suggestions and report system problems to the System administrator.