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

Function conf

scripts/config/conf.c:565–630  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

563}
564
565static 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

Callers 3

conf_choiceFunction · 0.70
check_confFunction · 0.70
mainFunction · 0.70

Calls 7

menu_is_visibleFunction · 0.85
check_confFunction · 0.85
menu_get_promptFunction · 0.85
sym_is_choiceFunction · 0.85
conf_symFunction · 0.85
conf_choiceFunction · 0.70
conf_stringFunction · 0.70

Tested by

no test coverage detected