| 562 | } |
| 563 | |
| 564 | static void conf(struct menu *menu) |
| 565 | { |
| 566 | struct symbol *sym; |
| 567 | struct property *prop; |
| 568 | struct menu *child; |
| 569 | |
| 570 | if (!menu_is_visible(menu)) |
| 571 | return; |
| 572 | |
| 573 | sym = menu->sym; |
| 574 | prop = menu->prompt; |
| 575 | if (prop) { |
| 576 | const char *prompt; |
| 577 | |
| 578 | switch (prop->type) { |
| 579 | case P_MENU: |
| 580 | /* |
| 581 | * Except in oldaskconfig mode, we show only menus that |
| 582 | * contain new symbols. |
| 583 | */ |
| 584 | if (input_mode != oldaskconfig && rootEntry != menu) { |
| 585 | check_conf(menu); |
| 586 | return; |
| 587 | } |
| 588 | /* fall through */ |
| 589 | case P_COMMENT: |
| 590 | prompt = menu_get_prompt(menu); |
| 591 | if (prompt) |
| 592 | printf("%*c\n%*c %s\n%*c\n", |
| 593 | indent, '*', |
| 594 | indent, '*', prompt, |
| 595 | indent, '*'); |
| 596 | default: |
| 597 | ; |
| 598 | } |
| 599 | } |
| 600 | |
| 601 | if (!sym) |
| 602 | goto conf_childs; |
| 603 | |
| 604 | if (sym_is_choice(sym)) { |
| 605 | conf_choice(menu); |
| 606 | if (sym->curr.tri != mod) |
| 607 | return; |
| 608 | goto conf_childs; |
| 609 | } |
| 610 | |
| 611 | switch (sym->type) { |
| 612 | case S_INT: |
| 613 | case S_HEX: |
| 614 | case S_STRING: |
| 615 | conf_string(menu); |
| 616 | break; |
| 617 | default: |
| 618 | conf_sym(menu); |
| 619 | break; |
| 620 | } |
| 621 |
no test coverage detected