Lines Matching +full:block +full:- +full:comment

1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
102 $$->filename, $$->lineno);
144 printd(DEBUG_PARSE, "%s:%d:config %s\n", cur_filename, cur_lineno, $2->name);
150 if (!current_entry->prompt) {
152 current_entry->filename, current_entry->lineno);
156 if (current_entry->sym->type != S_BOOLEAN) {
158 current_entry->filename, current_entry->lineno);
162 list_add_tail(&current_entry->sym->choice_link,
163 &current_choice->choice_members);
172 printd(DEBUG_PARSE, "%s:%d:menuconfig %s\n", cur_filename, cur_lineno, $2->name);
177 if (current_entry->prompt)
178 current_entry->prompt->type = P_MENU;
205 current_entry->sym->flags |= SYMBOL_TRANS;
240 current_entry->sym->name, modules_sym->name);
241 modules_sym = current_entry->sym;
252 INIT_LIST_HEAD(&current_entry->choice_members);
259 if (!current_entry->prompt) {
261 current_entry->filename, current_entry->lineno);
376 /* comment entry */
378 comment: T_COMMENT T_WORD_QUOTE T_EOL
382 printd(DEBUG_PARSE, "%s:%d:comment\n", cur_filename, cur_lineno);
385 comment_stmt: comment comment_option_list
403 if (current_entry->help) {
404 free(current_entry->help);
406 current_entry->sym->name ?: "<choice>");
412 current_entry->sym->name ?: "<choice>");
414 current_entry->help = $2;
487 * transitional_check_sanity - check transitional symbols have no other
492 * Return: -1 if an error is found, 0 otherwise.
498 if (!menu->sym || !(menu->sym->flags & SYMBOL_TRANS))
502 if ((menu->dep && !expr_is_yes(menu->dep)) ||
503 (menu->visibility && !expr_is_yes(menu->visibility))) {
505 menu->filename, menu->lineno,
507 return -1;
511 for (prop = menu->sym->prop; prop; prop = prop->next) {
512 if (prop->type != P_COMMENT) {
514 prop->filename, prop->lineno,
516 return -1;
524 * choice_check_sanity - check sanity of a choice member
528 * Return: -1 if an error is found, 0 otherwise.
535 for (prop = menu->sym->prop; prop; prop = prop->next) {
536 if (prop->type == P_DEFAULT) {
538 prop->filename, prop->lineno,
540 ret = -1;
543 if (prop->menu != menu && prop->type == P_PROMPT) {
545 prop->filename, prop->lineno,
547 ret = -1;
595 if (menu->sym && sym_check_deps(menu->sym))
601 if (menu->sym && sym_is_choice(menu->sym)) {
603 if (child->sym && choice_check_sanity(child))
617 zconf_error("unexpected '%s' within %s block",
622 if (strcmp(current_menu->filename, cur_filename)) {
626 current_menu->filename, current_menu->lineno,
658 len = p - str;
670 struct symbol *sym = menu->sym;
676 fprintf(out, "\nconfig %s\n", sym->name);
677 switch (sym->type) {
697 for (prop = sym->prop; prop; prop = prop->next) {
698 if (prop->menu != menu)
700 switch (prop->type) {
703 print_quoted_string(out, prop->text);
704 if (!expr_is_yes(prop->visible.expr)) {
706 expr_fprint(prop->visible.expr, out);
712 expr_fprint(prop->expr, out);
713 if (!expr_is_yes(prop->visible.expr)) {
715 expr_fprint(prop->visible.expr, out);
721 expr_fprint(prop->expr, out);
726 expr_fprint(prop->expr, out);
731 expr_fprint(prop->expr, out);
736 print_quoted_string(out, prop->text);
740 fprintf(out, " unknown prop %d!\n", prop->type);
744 if (menu->help) {
745 int len = strlen(menu->help);
746 while (menu->help[--len] == '\n')
747 menu->help[len] = 0;
748 fprintf(out, " help\n%s\n", menu->help);
760 if ((sym = menu->sym))
762 else if ((prop = menu->prompt)) {
763 switch (prop->type) {
766 print_quoted_string(out, prop->text);
771 print_quoted_string(out, prop->text);
777 if (!expr_is_yes(prop->visible.expr)) {
779 expr_fprint(prop->visible.expr, out);
784 if (menu->list)
785 menu = menu->list;
786 else if (menu->next)
787 menu = menu->next;
788 else while ((menu = menu->parent)) {
789 if (menu->prompt && menu->prompt->type == P_MENU)
791 if (menu->next) {
792 menu = menu->next;