MCPcopy Create free account
hub / github.com/Entware/Entware / build_conf

Function build_conf

scripts/config/nconf.c:811–994  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

809
810
811static void build_conf(struct menu *menu)
812{
813 struct symbol *sym;
814 struct property *prop;
815 struct menu *child;
816 int type, tmp, doint = 2;
817 tristate val;
818 char ch;
819
820 if (!menu || (!show_all_items && !menu_is_visible(menu)))
821 return;
822
823 sym = menu->sym;
824 prop = menu->prompt;
825 if (!sym) {
826 if (prop && menu != current_menu) {
827 const char *prompt = menu_get_prompt(menu);
828 enum prop_type ptype;
829 ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN;
830 switch (ptype) {
831 case P_MENU:
832 child_count++;
833 if (single_menu_mode) {
834 item_make(menu, 'm',
835 "%s%*c%s",
836 menu->data ? "-->" : "++>",
837 indent + 1, ' ', prompt);
838 } else
839 item_make(menu, 'm',
840 " %*c%s %s",
841 indent + 1, ' ', prompt,
842 menu_is_empty(menu) ? "----" : "--->");
843
844 if (single_menu_mode && menu->data)
845 goto conf_childs;
846 return;
847 case P_COMMENT:
848 if (prompt) {
849 child_count++;
850 item_make(menu, ':',
851 " %*c*** %s ***",
852 indent + 1, ' ',
853 prompt);
854 }
855 break;
856 default:
857 if (prompt) {
858 child_count++;
859 item_make(menu, ':', "---%*c%s",
860 indent + 1, ' ',
861 prompt);
862 }
863 }
864 } else
865 doint = 0;
866 goto conf_childs;
867 }
868

Callers 1

selected_confFunction · 0.70

Calls 13

menu_is_visibleFunction · 0.85
menu_get_promptFunction · 0.85
menu_is_emptyFunction · 0.85
sym_get_typeFunction · 0.85
sym_is_choiceFunction · 0.85
sym_get_choice_valueFunction · 0.85
sym_get_tristate_valueFunction · 0.85
sym_is_changeableFunction · 0.85
sym_is_choice_valueFunction · 0.85
sym_get_string_valueFunction · 0.85
sym_has_valueFunction · 0.85
item_makeFunction · 0.70

Tested by

no test coverage detected