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

Function zconfdump

scripts/config/parser.tab.c:2131–2176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2129}
2130
2131void zconfdump(FILE *out)
2132{
2133 struct property *prop;
2134 struct symbol *sym;
2135 struct menu *menu;
2136
2137 menu = rootmenu.list;
2138 while (menu) {
2139 if ((sym = menu->sym))
2140 print_symbol(out, menu);
2141 else if ((prop = menu->prompt)) {
2142 switch (prop->type) {
2143 case P_COMMENT:
2144 fputs("\ncomment ", out);
2145 print_quoted_string(out, prop->text);
2146 fputs("\n", out);
2147 break;
2148 case P_MENU:
2149 fputs("\nmenu ", out);
2150 print_quoted_string(out, prop->text);
2151 fputs("\n", out);
2152 break;
2153 default:
2154 ;
2155 }
2156 if (!expr_is_yes(prop->visible.expr)) {
2157 fputs(" depends ", out);
2158 expr_fprint(prop->visible.expr, out);
2159 fputc('\n', out);
2160 }
2161 }
2162
2163 if (menu->list)
2164 menu = menu->list;
2165 else if (menu->next)
2166 menu = menu->next;
2167 else while ((menu = menu->parent)) {
2168 if (menu->prompt && menu->prompt->type == P_MENU)
2169 fputs("\nendmenu\n", out);
2170 if (menu->next) {
2171 menu = menu->next;
2172 break;
2173 }
2174 }
2175 }
2176}

Callers

nothing calls this directly

Calls 4

print_symbolFunction · 0.85
print_quoted_stringFunction · 0.85
expr_is_yesFunction · 0.85
expr_fprintFunction · 0.85

Tested by

no test coverage detected