summaryrefslogtreecommitdiffabout
path: root/src/main.c
authorSergey Poznyakoff <gray@gnu.org.ua>2005-07-09 16:37:40 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2005-07-09 16:37:40 (GMT)
commit5bf8d77137969334af78d2ccf5b48ecbbb0fc017 (patch) (side-by-side diff)
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') (more/less context) (ignore whitespace changes)
-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)
if (argp_parse (&argp, argc, argv, ARGP_IN_ORDER, &index, NULL))
exit (1);
- if (!arglist)
- error(1, 0, _("no input files"));
-
if (print_option == 0)
print_option = PRINT_TREE;
@@ -665,10 +662,15 @@ main(int argc, char **argv)
argc -= index;
argv += index;
+
while (argc--) {
if (source(*argv++) == 0)
yyparse();
}
+
+ if (input_file_count == 0)
+ error(1, 0, _("no input files"));
+
cleanup();
output();

Return to:

Send suggestions and report system problems to the System administrator.