File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -28,9 +28,7 @@ static void zconf_error(const char *err, ...);
28
28
static bool zconf_endtoken (const char *tokenname,
29
29
const char *expected_tokenname);
30
30
31
- struct menu *current_menu, *current_entry;
32
-
33
- static bool inside_choice = false ;
31
+ struct menu *current_menu, *current_entry, *current_choice;
34
32
35
33
%}
36
34
@@ -147,7 +145,7 @@ config_entry_start: T_CONFIG nonconst_symbol T_EOL
147
145
148
146
config_stmt : config_entry_start config_option_list
149
147
{
150
- if (inside_choice ) {
148
+ if (current_choice ) {
151
149
if (!current_entry->prompt) {
152
150
fprintf (stderr, " %s:%d: error: choice member must have a prompt\n " ,
153
151
current_entry->filename, current_entry->lineno);
@@ -256,12 +254,12 @@ choice_entry: choice choice_option_list
256
254
257
255
$$ = menu_add_menu();
258
256
259
- inside_choice = true ;
257
+ current_choice = current_entry ;
260
258
};
261
259
262
260
choice_end : end
263
261
{
264
- inside_choice = false ;
262
+ current_choice = NULL ;
265
263
266
264
if (zconf_endtoken($1 , " choice" )) {
267
265
menu_end_menu ();
You can’t perform that action at this time.
0 commit comments