Author: kjs
Date: Thu Apr 12 03:50:52 2007
New Revision: 18162
Modified:
trunk/compilers/pirc/src/pirmain.c
Log:
compilers/pirc:
* add message for ignoring output file if no output type is specified.
Modified: trunk/compilers/pirc/src/pirmain.c
==============================================================================
--- trunk/compilers/pirc/src/pirmain.c (original)
+++ trunk/compilers/pirc/src/pirmain.c Thu Apr 12 03:50:52 2007
@@ -84,7 +84,7 @@
while (argc-- > 0) {
char opt;
- if (argv[0][0] != '-') break; /* stop if there's only a '-' */
+ if (argv[0][0] != '-') break; /* stop if there's not a '-' */
else opt = argv[0][1]; /* get the option letter */
switch (opt) {
@@ -146,6 +146,10 @@
case OUTPUT_NONE:
/* just create an empty vtable, the default implementation does
nothing */
vtable = new_pirvtable();
+
+ if (outputfile != NULL) /* if the user did specify an output file,
this doesn't make sense */
+ fprintf(stderr, "No output specified: output file will be
ignored\n");
+
break;
case OUTPUT_PIR:
vtable = init_pir_vtable(outputfile);
@@ -182,8 +186,6 @@
fprintf(stderr, "\nparsed successfully.\n");
}
- if (outputfile != NULL) printf("outputfile written to: '%s'\n",
outputfile);
-
/* clean up and exit */
exit_parser(p);
return 0;