From: Akim Demaille Date: Fri, 16 Mar 2001 11:32:15 +0000 (+0000) Subject: * src/getargs.c (longopts): Clean up. X-Git-Tag: BISON-1_28b~29 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/447992b9f11a4f55c687530f1bd0f2a965ac4fec?ds=inline * src/getargs.c (longopts): Clean up. --- diff --git a/ChangeLog b/ChangeLog index 09c55061..ffa4a5ab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2001-03-16 Akim Demaille + + * src/getargs.c (longopts): Clean up. + 2001-02-21 Akim Demaille * src/reader.c (gensym): `gensym_count' is your own. diff --git a/src/getargs.c b/src/getargs.c index c45f11eb..9882af91 100644 --- a/src/getargs.c +++ b/src/getargs.c @@ -36,26 +36,33 @@ int statistics_flag = 0; int yacc_flag = 0; /* for -y */ extern char *program_name; - +const char *shortopts = "yvdhrltknVo:b:p:"; static struct option longopts[] = { - {"debug", 0, &debug_flag, 1}, - {"defines", 0, &defines_flag, 1}, - {"file-prefix", 1, 0, 'b'}, - {"fixed-output-files", 0, &yacc_flag, 1}, - {"help", 0, 0, 'h'}, - {"name-prefix", 1, 0, 'p'}, /* was 'a'; apparently unused -wjh */ - {"locations", 0, &locations_flag, 1}, - {"no-lines", 0, &no_lines_flag, 1}, - {"no-parser", 0, &no_parser_flag, 1}, - {"output", 1, 0, 'o'}, - {"output-file", 1, 0, 'o'}, - {"raw", 0, &raw_flag, 1}, - {"statistics", 0, &statistics_flag, 1}, - {"token-table", 0, &token_table_flag, 1}, - {"verbose", 0, &verbose_flag, 1}, - {"version", 0, 0, 'V'}, - {"yacc", 0, &yacc_flag, 1}, + /* Operation modes. */ + {"help", no_argument, 0, 'h'}, + {"version", no_argument, 0, 'V'}, + {"yacc", no_argument, 0, 'y'}, + {"fixed-output-files",no_argument, 0, 'y'}, + + /* Parser. */ + {"locations", no_argument, &locations_flag, 1}, + /* was 'a'; apparently unused -wjh */ + {"name-prefix", required_argument, 0, 'p'}, + {"no-lines", no_argument, 0, 'l'}, + {"no-parser", no_argument, 0, 'n'}, + {"raw", no_argument, 0, 'r'}, + {"token-table", no_argument, 0, 'k'}, + {"debug", no_argument, 0, 'd'}, + + /* 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} };