* src/getargs.c (longopts): Declare --defines and --graph as options

with optional arguments.
* src/files.h: Add extern declarations.
* src/files.c (spec_graph_file, spec_defines_file): New.
(output_files): Update.
Remove CPP-outed code.
This commit is contained in:
Marc Autret
2001-09-17 23:00:01 +00:00
parent 817e461c23
commit 6526f6dbf7
4 changed files with 33 additions and 12 deletions

View File

@@ -60,11 +60,11 @@ static struct option longopts[] =
{"token-table", no_argument, 0, 'k'},
/* Output. */
{"defines", no_argument, 0, 'd'},
{"defines", optional_argument, 0, 'd'},
{"verbose", no_argument, 0, 'v'},
{"file-prefix", required_argument, 0, 'b'},
{"output-file", required_argument, 0, 'o'},
{"graph", no_argument, 0, 'g'},
{"graph", optional_argument, 0, 'g'},
/* Hidden. */
{"statistics", no_argument, &statistics_flag, 1},
@@ -183,7 +183,9 @@ getargs (int argc, char *argv[])
exit (0);
case 'g':
/* Here, the -g and --graph=FILE options are differentiated. */
graph_flag = 1;
spec_graph_file = optarg;
break;
case 'v':
@@ -195,7 +197,9 @@ getargs (int argc, char *argv[])
break;
case 'd':
/* Here, the -d and --defines options are differentiated. */
defines_flag = 1;
spec_defines_file = optarg;
break;
case 'l':