summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Sauer <ensonic@users.sf.net>2013-05-29 10:30:16 +0200
committerStefan Sauer <ensonic@users.sf.net>2013-05-29 10:30:16 +0200
commit7951525fa5bcf8914cd1e1d314497ddd5a5c18ce (patch)
treec325f359ca37eb0ede39b9bc1c41de10a972c7a3
parent17ea4116edbb26a6a5dcfd1746e587a166a274cf (diff)
generate-*: cosmetic changes
Print the file name if we use the default. Consider the header_flag for the default name. Correct the help() desc for the --header flag (it takes no arg).
-rw-r--r--orc/generate-bytecode.c5
-rw-r--r--orc/generate-emulation.c5
2 files changed, 6 insertions, 4 deletions
diff --git a/orc/generate-bytecode.c b/orc/generate-bytecode.c
index db583d2..795a1e4 100644
--- a/orc/generate-bytecode.c
+++ b/orc/generate-bytecode.c
@@ -34,7 +34,7 @@ void help (void)
printf("\n");
printf("Application Options:\n");
printf(" -o, --output FILE Write output to FILE\n");
- printf(" --header FILE Write header to FILE\n");
+ printf(" --header Write header instead of .c file\n");
printf("\n");
exit (0);
@@ -78,7 +78,8 @@ main (int argc, char *argv[])
}
if (output_file == NULL) {
- output_file = "out.c";
+ output_file = output_header ? "out.h" : "out.c";
+ printf("Writing to file: %s\n", output_file);
}
output = fopen (output_file, "w");
diff --git a/orc/generate-emulation.c b/orc/generate-emulation.c
index 2a79990..09c2776 100644
--- a/orc/generate-emulation.c
+++ b/orc/generate-emulation.c
@@ -35,7 +35,7 @@ void help (void)
printf("\n");
printf("Application Options:\n");
printf(" -o, --output FILE Write output to FILE\n");
- printf(" --header FILE Write header to FILE\n");
+ printf(" --header Write header instead of .c file\n");
printf("\n");
exit (0);
@@ -79,7 +79,8 @@ main (int argc, char *argv[])
}
if (output_file == NULL) {
- output_file = "out.c";
+ output_file = output_header ? "out.h" : "out.c";
+ printf("Writing to file: %s\n", output_file);
}
output = fopen (output_file, "w");