mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-21 10:13:03 +00:00
* src/options.c (create_long_option_table): Fix.
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
2001-10-14 Marc Autret <autret_m@epita.fr>
|
||||||
|
|
||||||
|
* src/options.c (create_long_option_table): Fix.
|
||||||
|
|
||||||
2001-10-10 Akim Demaille <akim@epita.fr>
|
2001-10-10 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
* src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
|
* src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
|
||||||
|
|||||||
@@ -142,7 +142,14 @@ create_long_option_table ()
|
|||||||
/* Copy the struct information in the longoptions. */
|
/* Copy the struct information in the longoptions. */
|
||||||
longopts[j].name = option_table[i].name;
|
longopts[j].name = option_table[i].name;
|
||||||
longopts[j].has_arg = option_table[i].has_arg;
|
longopts[j].has_arg = option_table[i].has_arg;
|
||||||
longopts[j].flag = option_table[i].set_flag;
|
/* When an options is declared having 'optional_argument' and
|
||||||
|
a flag is specified to be set, the option is skipped on
|
||||||
|
command line. So we never use a flag when a command line
|
||||||
|
option is declared 'optional_argument. */
|
||||||
|
if (longopts[j].has_arg == optional_argument)
|
||||||
|
longopts[j].flag = NULL;
|
||||||
|
else
|
||||||
|
longopts[j].flag = option_table[i].set_flag;
|
||||||
longopts[j++].val = option_table[i].val;
|
longopts[j++].val = option_table[i].val;
|
||||||
}
|
}
|
||||||
longopts[number_options].name = NULL;
|
longopts[number_options].name = NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user