* src/getargs.c (longopts): Clean up.

This commit is contained in:
Akim Demaille
2001-03-16 11:32:15 +00:00
parent 274d42cecb
commit 447992b9f1
2 changed files with 29 additions and 18 deletions

View File

@@ -1,3 +1,7 @@
2001-03-16 Akim Demaille <akim@epita.fr>
* src/getargs.c (longopts): Clean up.
2001-02-21 Akim Demaille <akim@epita.fr> 2001-02-21 Akim Demaille <akim@epita.fr>
* src/reader.c (gensym): `gensym_count' is your own. * src/reader.c (gensym): `gensym_count' is your own.

View File

@@ -36,26 +36,33 @@ int statistics_flag = 0;
int yacc_flag = 0; /* for -y */ int yacc_flag = 0; /* for -y */
extern char *program_name; extern char *program_name;
const char *shortopts = "yvdhrltknVo:b:p:";
static struct option longopts[] = static struct option longopts[] =
{ {
{"debug", 0, &debug_flag, 1}, /* Operation modes. */
{"defines", 0, &defines_flag, 1}, {"help", no_argument, 0, 'h'},
{"file-prefix", 1, 0, 'b'}, {"version", no_argument, 0, 'V'},
{"fixed-output-files", 0, &yacc_flag, 1}, {"yacc", no_argument, 0, 'y'},
{"help", 0, 0, 'h'}, {"fixed-output-files",no_argument, 0, 'y'},
{"name-prefix", 1, 0, 'p'}, /* was 'a'; apparently unused -wjh */
{"locations", 0, &locations_flag, 1}, /* Parser. */
{"no-lines", 0, &no_lines_flag, 1}, {"locations", no_argument, &locations_flag, 1},
{"no-parser", 0, &no_parser_flag, 1}, /* was 'a'; apparently unused -wjh */
{"output", 1, 0, 'o'}, {"name-prefix", required_argument, 0, 'p'},
{"output-file", 1, 0, 'o'}, {"no-lines", no_argument, 0, 'l'},
{"raw", 0, &raw_flag, 1}, {"no-parser", no_argument, 0, 'n'},
{"statistics", 0, &statistics_flag, 1}, {"raw", no_argument, 0, 'r'},
{"token-table", 0, &token_table_flag, 1}, {"token-table", no_argument, 0, 'k'},
{"verbose", 0, &verbose_flag, 1}, {"debug", no_argument, 0, 'd'},
{"version", 0, 0, 'V'},
{"yacc", 0, &yacc_flag, 1}, /* Output. */
{"defines", no_argument, 0, 'd'},
{"verbose", no_argument, 0, 'v'},
{"file-prefix", required_argument, 0, 'b'},
{"output-file", required_argument, 0, 'o'},
/* Hidden. */
{"statistics", no_argument, &statistics_flag, 1},
{0, 0, 0, 0} {0, 0, 0, 0}
}; };