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