| 505 | } |
| 506 | |
| 507 | static void build_conf(struct menu *menu) |
| 508 | { |
| 509 | struct symbol *sym; |
| 510 | struct property *prop; |
| 511 | struct menu *child; |
| 512 | int type, tmp, doint = 2; |
| 513 | tristate val; |
| 514 | char ch; |
| 515 | bool visible; |
| 516 | |
| 517 | /* |
| 518 | * note: menu_is_visible() has side effect that it will |
| 519 | * recalc the value of the symbol. |
| 520 | */ |
| 521 | visible = menu_is_visible(menu); |
| 522 | if (show_all_options && !menu_has_prompt(menu)) |
| 523 | return; |
| 524 | else if (!show_all_options && !visible) |
| 525 | return; |
| 526 | |
| 527 | sym = menu->sym; |
| 528 | prop = menu->prompt; |
| 529 | if (!sym) { |
| 530 | if (prop && menu != current_menu) { |
| 531 | const char *prompt = menu_get_prompt(menu); |
| 532 | switch (prop->type) { |
| 533 | case P_MENU: |
| 534 | child_count++; |
| 535 | if (single_menu_mode) { |
| 536 | item_make("%s%*c%s", |
| 537 | menu->data ? "-->" : "++>", |
| 538 | indent + 1, ' ', prompt); |
| 539 | } else |
| 540 | item_make(" %*c%s %s", |
| 541 | indent + 1, ' ', prompt, |
| 542 | menu_is_empty(menu) ? "----" : "--->"); |
| 543 | item_set_tag('m'); |
| 544 | item_set_data(menu); |
| 545 | if (single_menu_mode && menu->data) |
| 546 | goto conf_childs; |
| 547 | return; |
| 548 | case P_COMMENT: |
| 549 | if (prompt) { |
| 550 | child_count++; |
| 551 | item_make(" %*c*** %s ***", indent + 1, ' ', prompt); |
| 552 | item_set_tag(':'); |
| 553 | item_set_data(menu); |
| 554 | } |
| 555 | break; |
| 556 | default: |
| 557 | if (prompt) { |
| 558 | child_count++; |
| 559 | item_make("---%*c%s", indent + 1, ' ', prompt); |
| 560 | item_set_tag(':'); |
| 561 | item_set_data(menu); |
| 562 | } |
| 563 | } |
| 564 | } else |
no test coverage detected