kconfig: re-sync with Linux 4.10
Re-sync all files under the scripts/kconfig directory with Linux 4.10. Some parts include U-Boot own modification. I made sure to not revert the following commits:5b8031ccb4("Add more SPDX-License-Identifier tags")192bc6948b("Fix GCC format-security errors and convert sprintfs.")da58dec866("Various Makefiles: Add SPDX-License-Identifier tags")20c20826ef("Kconfig: Enable usage of escape char '\' in string values") Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
This commit is contained in:
		
							parent
							
								
									554c73c025
								
							
						
					
					
						commit
						bf7ab1e70f
					
				|  | @ -44,6 +44,8 @@ nconfig: $(obj)/nconf | ||||||
| 
 | 
 | ||||||
| silentoldconfig: $(obj)/conf | silentoldconfig: $(obj)/conf | ||||||
| 	$(Q)mkdir -p include/config include/generated | 	$(Q)mkdir -p include/config include/generated | ||||||
|  | 	$(Q)test -e include/generated/autoksyms.h || \
 | ||||||
|  | 	    touch   include/generated/autoksyms.h | ||||||
| 	$< $(silent) --$@ $(Kconfig) | 	$< $(silent) --$@ $(Kconfig) | ||||||
| 
 | 
 | ||||||
| localyesconfig localmodconfig: $(obj)/streamline_config.pl $(obj)/conf | localyesconfig localmodconfig: $(obj)/streamline_config.pl $(obj)/conf | ||||||
|  | @ -95,7 +97,7 @@ $(simple-targets): $(obj)/conf | ||||||
| PHONY += oldnoconfig savedefconfig defconfig | PHONY += oldnoconfig savedefconfig defconfig | ||||||
| 
 | 
 | ||||||
| # oldnoconfig is an alias of olddefconfig, because people already are dependent
 | # oldnoconfig is an alias of olddefconfig, because people already are dependent
 | ||||||
| # on its behavior(sets new symbols to their default value but not 'n') with the
 | # on its behavior (sets new symbols to their default value but not 'n') with the
 | ||||||
| # counter-intuitive name.
 | # counter-intuitive name.
 | ||||||
| oldnoconfig: olddefconfig | oldnoconfig: olddefconfig | ||||||
| 
 | 
 | ||||||
|  | @ -106,8 +108,13 @@ defconfig: $(obj)/conf | ||||||
| ifeq ($(KBUILD_DEFCONFIG),) | ifeq ($(KBUILD_DEFCONFIG),) | ||||||
| 	$< $(silent) --defconfig $(Kconfig) | 	$< $(silent) --defconfig $(Kconfig) | ||||||
| else | else | ||||||
|  | ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)),) | ||||||
| 	@$(kecho) "*** Default configuration is based on '$(KBUILD_DEFCONFIG)'" | 	@$(kecho) "*** Default configuration is based on '$(KBUILD_DEFCONFIG)'" | ||||||
| 	$(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig) | 	$(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig) | ||||||
|  | else | ||||||
|  | 	@$(kecho) "*** Default configuration is based on target '$(KBUILD_DEFCONFIG)'" | ||||||
|  | 	$(Q)$(MAKE) -f $(srctree)/Makefile $(KBUILD_DEFCONFIG) | ||||||
|  | endif | ||||||
| endif | endif | ||||||
| 
 | 
 | ||||||
| %_defconfig: $(obj)/conf | %_defconfig: $(obj)/conf | ||||||
|  | @ -128,6 +135,10 @@ PHONY += kvmconfig | ||||||
| kvmconfig: kvm_guest.config | kvmconfig: kvm_guest.config | ||||||
| 	@: | 	@: | ||||||
| 
 | 
 | ||||||
|  | PHONY += xenconfig | ||||||
|  | xenconfig: xen.config | ||||||
|  | 	@: | ||||||
|  | 
 | ||||||
| PHONY += tinyconfig | PHONY += tinyconfig | ||||||
| tinyconfig: | tinyconfig: | ||||||
| 	$(Q)$(MAKE) -f $(srctree)/Makefile allnoconfig tiny.config | 	$(Q)$(MAKE) -f $(srctree)/Makefile allnoconfig tiny.config | ||||||
|  | @ -135,10 +146,11 @@ tinyconfig: | ||||||
| # Help text used by make help
 | # Help text used by make help
 | ||||||
| help: | help: | ||||||
| 	@echo  '  config	  - Update current config utilising a line-oriented program' | 	@echo  '  config	  - Update current config utilising a line-oriented program' | ||||||
| 	@echo  '  nconfig         - Update current config utilising a ncurses menu based program' | 	@echo  '  nconfig         - Update current config utilising a ncurses menu based' | ||||||
|  | 	@echo  '                    program' | ||||||
| 	@echo  '  menuconfig	  - Update current config utilising a menu based program' | 	@echo  '  menuconfig	  - Update current config utilising a menu based program' | ||||||
| 	@echo  '  xconfig	  - Update current config utilising a QT based front-end' | 	@echo  '  xconfig	  - Update current config utilising a Qt based front-end' | ||||||
| 	@echo  '  gconfig	  - Update current config utilising a GTK based front-end' | 	@echo  '  gconfig	  - Update current config utilising a GTK+ based front-end' | ||||||
| 	@echo  '  oldconfig	  - Update current config utilising a provided .config as base' | 	@echo  '  oldconfig	  - Update current config utilising a provided .config as base' | ||||||
| 	@echo  '  localmodconfig  - Update current config disabling modules not loaded' | 	@echo  '  localmodconfig  - Update current config disabling modules not loaded' | ||||||
| 	@echo  '  localyesconfig  - Update current config converting local mods to core' | 	@echo  '  localyesconfig  - Update current config converting local mods to core' | ||||||
|  | @ -151,8 +163,10 @@ help: | ||||||
| 	@echo  '  alldefconfig    - New config with all symbols set to default' | 	@echo  '  alldefconfig    - New config with all symbols set to default' | ||||||
| 	@echo  '  randconfig	  - New config with random answer to all options' | 	@echo  '  randconfig	  - New config with random answer to all options' | ||||||
| 	@echo  '  listnewconfig   - List new options' | 	@echo  '  listnewconfig   - List new options' | ||||||
| 	@echo  '  olddefconfig	  - Same as silentoldconfig but sets new symbols to their default value' | 	@echo  '  olddefconfig	  - Same as silentoldconfig but sets new symbols to their' | ||||||
| #	@echo  '  kvmconfig	  - Enable additional options for guest kernel support'
 | 	@echo  '                    default value' | ||||||
|  | #	@echo  '  kvmconfig	  - Enable additional options for kvm guest kernel support'
 | ||||||
|  | #	@echo  '  xenconfig       - Enable additional options for xen dom0 and guest kernel support'
 | ||||||
| #	@echo  '  tinyconfig	  - Configure the tiniest possible kernel'
 | #	@echo  '  tinyconfig	  - Configure the tiniest possible kernel'
 | ||||||
| 
 | 
 | ||||||
| # lxdialog stuff
 | # lxdialog stuff
 | ||||||
|  | @ -171,9 +185,9 @@ HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags) \ | ||||||
| # mconf:  Used for the menuconfig target
 | # mconf:  Used for the menuconfig target
 | ||||||
| #         Utilizes the lxdialog package
 | #         Utilizes the lxdialog package
 | ||||||
| # qconf:  Used for the xconfig target
 | # qconf:  Used for the xconfig target
 | ||||||
| #         Based on QT which needs to be installed to compile it
 | #         Based on Qt which needs to be installed to compile it
 | ||||||
| # gconf:  Used for the gconfig target
 | # gconf:  Used for the gconfig target
 | ||||||
| #         Based on GTK which needs to be installed to compile it
 | #         Based on GTK+ which needs to be installed to compile it
 | ||||||
| # object files used by all kconfig flavours
 | # object files used by all kconfig flavours
 | ||||||
| 
 | 
 | ||||||
| lxdialog := lxdialog/checklist.o lxdialog/util.o lxdialog/inputbox.o | lxdialog := lxdialog/checklist.o lxdialog/util.o lxdialog/inputbox.o | ||||||
|  | @ -230,51 +244,23 @@ ifeq ($(MAKECMDGOALS),xconfig) | ||||||
| $(obj)/.tmp_qtcheck: $(src)/Makefile | $(obj)/.tmp_qtcheck: $(src)/Makefile | ||||||
| -include $(obj)/.tmp_qtcheck | -include $(obj)/.tmp_qtcheck | ||||||
| 
 | 
 | ||||||
| # QT needs some extra effort...
 | # Qt needs some extra effort...
 | ||||||
| $(obj)/.tmp_qtcheck: | $(obj)/.tmp_qtcheck: | ||||||
| 	@set -e; $(kecho) "  CHECK   qt"; dir=""; pkg=""; \
 | 	@set -e; $(kecho) "  CHECK   qt"; \
 | ||||||
| 	if ! pkg-config --exists QtCore 2> /dev/null; then \
 | 	if pkg-config --exists Qt5Core; then \
 | ||||||
| 	    echo "* Unable to find the QT4 tool qmake. Trying to use QT3"; \
 | 	    cflags="-std=c++11 -fPIC `pkg-config --cflags Qt5Core Qt5Gui Qt5Widgets`"; \
 | ||||||
| 	    pkg-config --exists qt 2> /dev/null && pkg=qt; \
 | 	    libs=`pkg-config --libs Qt5Core Qt5Gui Qt5Widgets`; \
 | ||||||
| 	    pkg-config --exists qt-mt 2> /dev/null && pkg=qt-mt; \
 | 	    moc=`pkg-config --variable=host_bins Qt5Core`/moc; \
 | ||||||
| 	    if [ -n "$$pkg" ]; then \
 | 	elif pkg-config --exists QtCore; then \
 | ||||||
| 	      cflags="\$$(shell pkg-config $$pkg --cflags)"; \
 | 	    cflags=`pkg-config --cflags QtCore QtGui`; \
 | ||||||
| 	      libs="\$$(shell pkg-config $$pkg --libs)"; \
 | 	    libs=`pkg-config --libs QtCore QtGui`; \
 | ||||||
| 	      moc="\$$(shell pkg-config $$pkg --variable=prefix)/bin/moc"; \
 | 	    moc=`pkg-config --variable=moc_location QtCore`; \
 | ||||||
| 	      dir="$$(pkg-config $$pkg --variable=prefix)"; \
 |  | ||||||
| 	else \
 | 	else \
 | ||||||
| 	      for d in $$QTDIR /usr/share/qt* /usr/lib/qt*; do \
 |  | ||||||
| 	        if [ -f $$d/include/qconfig.h ]; then dir=$$d; break; fi; \
 |  | ||||||
| 	      done; \
 |  | ||||||
| 	      if [ -z "$$dir" ]; then \
 |  | ||||||
| 	    echo >&2 "*"; \
 | 	    echo >&2 "*"; \
 | ||||||
| 	        echo >&2 "* Unable to find any QT installation. Please make sure that"; \
 | 	    echo >&2 "* Could not find Qt via pkg-config."; \
 | ||||||
| 	        echo >&2 "* the QT4 or QT3 development package is correctly installed and"; \
 | 	    echo >&2 "* Please install either Qt 4.8 or 5.x. and make sure it's in PKG_CONFIG_PATH"; \
 | ||||||
| 	        echo >&2 "* either qmake can be found or install pkg-config or set"; \
 |  | ||||||
| 	        echo >&2 "* the QTDIR environment variable to the correct location."; \
 |  | ||||||
| 	    echo >&2 "*"; \
 | 	    echo >&2 "*"; \
 | ||||||
| 	        false; \
 | 	    exit 1; \
 | ||||||
| 	      fi; \
 |  | ||||||
| 	      libpath=$$dir/lib; lib=qt; osdir=""; \
 |  | ||||||
| 	      $(HOSTCXX) -print-multi-os-directory > /dev/null 2>&1 && \
 |  | ||||||
| 	        osdir=x$$($(HOSTCXX) -print-multi-os-directory); \
 |  | ||||||
| 	      test -d $$libpath/$$osdir && libpath=$$libpath/$$osdir; \
 |  | ||||||
| 	      test -f $$libpath/libqt-mt.so && lib=qt-mt; \
 |  | ||||||
| 	      cflags="-I$$dir/include"; \
 |  | ||||||
| 	      libs="-L$$libpath -Wl,-rpath,$$libpath -l$$lib"; \
 |  | ||||||
| 	      moc="$$dir/bin/moc"; \
 |  | ||||||
| 	    fi; \
 |  | ||||||
| 	    if [ ! -x $$dir/bin/moc -a -x /usr/bin/moc ]; then \
 |  | ||||||
| 	      echo "*"; \
 |  | ||||||
| 	      echo "* Unable to find $$dir/bin/moc, using /usr/bin/moc instead."; \
 |  | ||||||
| 	      echo "*"; \
 |  | ||||||
| 	      moc="/usr/bin/moc"; \
 |  | ||||||
| 	    fi; \
 |  | ||||||
| 	else \
 |  | ||||||
| 	  cflags="\$$(shell pkg-config QtCore QtGui Qt3Support --cflags)"; \
 |  | ||||||
| 	  libs="\$$(shell pkg-config QtCore QtGui Qt3Support --libs)"; \
 |  | ||||||
| 	  moc="\$$(shell pkg-config QtCore --variable=moc_location)"; \
 |  | ||||||
| 	  [ -n "$$moc" ] || moc="\$$(shell pkg-config QtCore --variable=prefix)/bin/moc"; \
 |  | ||||||
| 	fi; \
 | 	fi; \
 | ||||||
| 	echo "KC_QT_CFLAGS=$$cflags" > $@; \
 | 	echo "KC_QT_CFLAGS=$$cflags" > $@; \
 | ||||||
| 	echo "KC_QT_LIBS=$$libs" >> $@; \
 | 	echo "KC_QT_LIBS=$$libs" >> $@; \
 | ||||||
|  | @ -286,7 +272,7 @@ $(obj)/gconf.o: $(obj)/.tmp_gtkcheck | ||||||
| ifeq ($(MAKECMDGOALS),gconfig) | ifeq ($(MAKECMDGOALS),gconfig) | ||||||
| -include $(obj)/.tmp_gtkcheck | -include $(obj)/.tmp_gtkcheck | ||||||
| 
 | 
 | ||||||
| # GTK needs some extra effort, too...
 | # GTK+ needs some extra effort, too...
 | ||||||
| $(obj)/.tmp_gtkcheck: | $(obj)/.tmp_gtkcheck: | ||||||
| 	@if `pkg-config --exists gtk+-2.0 gmodule-2.0 libglade-2.0`; then		\
 | 	@if `pkg-config --exists gtk+-2.0 gmodule-2.0 libglade-2.0`; then		\
 | ||||||
| 		if `pkg-config --atleast-version=2.0.0 gtk+-2.0`; then			\
 | 		if `pkg-config --atleast-version=2.0.0 gtk+-2.0`; then			\
 | ||||||
|  | @ -317,7 +303,7 @@ quiet_cmd_moc = MOC     $@ | ||||||
| $(obj)/%.moc: $(src)/%.h $(obj)/.tmp_qtcheck | $(obj)/%.moc: $(src)/%.h $(obj)/.tmp_qtcheck | ||||||
| 	$(call cmd,moc) | 	$(call cmd,moc) | ||||||
| 
 | 
 | ||||||
| # Extract gconf menu items for I18N support
 | # Extract gconf menu items for i18n support
 | ||||||
| $(obj)/gconf.glade.h: $(obj)/gconf.glade | $(obj)/gconf.glade.h: $(obj)/gconf.glade | ||||||
| 	$(Q)intltool-extract --type=gettext/glade --srcdir=$(srctree) \
 | 	$(Q)intltool-extract --type=gettext/glade --srcdir=$(srctree) \
 | ||||||
| 	$(obj)/gconf.glade | 	$(obj)/gconf.glade | ||||||
|  |  | ||||||
|  | @ -5,6 +5,7 @@ | ||||||
| 
 | 
 | ||||||
| #include <locale.h> | #include <locale.h> | ||||||
| #include <ctype.h> | #include <ctype.h> | ||||||
|  | #include <limits.h> | ||||||
| #include <stdio.h> | #include <stdio.h> | ||||||
| #include <stdlib.h> | #include <stdlib.h> | ||||||
| #include <string.h> | #include <string.h> | ||||||
|  | @ -41,7 +42,7 @@ static int tty_stdio; | ||||||
| static int valid_stdin = 1; | static int valid_stdin = 1; | ||||||
| static int sync_kconfig; | static int sync_kconfig; | ||||||
| static int conf_cnt; | static int conf_cnt; | ||||||
| static char line[128]; | static char line[PATH_MAX]; | ||||||
| static struct menu *rootEntry; | static struct menu *rootEntry; | ||||||
| 
 | 
 | ||||||
| static void print_help(struct menu *menu) | static void print_help(struct menu *menu) | ||||||
|  | @ -109,7 +110,7 @@ static int conf_askvalue(struct symbol *sym, const char *def) | ||||||
| 		/* fall through */ | 		/* fall through */ | ||||||
| 	case oldaskconfig: | 	case oldaskconfig: | ||||||
| 		fflush(stdout); | 		fflush(stdout); | ||||||
| 		xfgets(line, 128, stdin); | 		xfgets(line, sizeof(line), stdin); | ||||||
| 		if (!tty_stdio) | 		if (!tty_stdio) | ||||||
| 			printf("\n"); | 			printf("\n"); | ||||||
| 		return 1; | 		return 1; | ||||||
|  | @ -311,7 +312,7 @@ static int conf_choice(struct menu *menu) | ||||||
| 			/* fall through */ | 			/* fall through */ | ||||||
| 		case oldaskconfig: | 		case oldaskconfig: | ||||||
| 			fflush(stdout); | 			fflush(stdout); | ||||||
| 			xfgets(line, 128, stdin); | 			xfgets(line, sizeof(line), stdin); | ||||||
| 			strip(line); | 			strip(line); | ||||||
| 			if (line[0] == '?') { | 			if (line[0] == '?') { | ||||||
| 				print_help(menu); | 				print_help(menu); | ||||||
|  |  | ||||||
|  | @ -263,11 +263,8 @@ int conf_read_simple(const char *name, int def) | ||||||
| 		if (in) | 		if (in) | ||||||
| 			goto load; | 			goto load; | ||||||
| 		sym_add_change_count(1); | 		sym_add_change_count(1); | ||||||
| 		if (!sym_defconfig_list) { | 		if (!sym_defconfig_list) | ||||||
| 			if (modules_sym) |  | ||||||
| 				sym_calc_value(modules_sym); |  | ||||||
| 			return 1; | 			return 1; | ||||||
| 		} |  | ||||||
| 
 | 
 | ||||||
| 		for_all_defaults(sym_defconfig_list, prop) { | 		for_all_defaults(sym_defconfig_list, prop) { | ||||||
| 			if (expr_calc_value(prop->visible.expr) == no || | 			if (expr_calc_value(prop->visible.expr) == no || | ||||||
|  | @ -374,7 +371,9 @@ load: | ||||||
| 				continue; | 				continue; | ||||||
| 		} else { | 		} else { | ||||||
| 			if (line[0] != '\r' && line[0] != '\n') | 			if (line[0] != '\r' && line[0] != '\n') | ||||||
| 				conf_warning("unexpected data"); | 				conf_warning("unexpected data: %.*s", | ||||||
|  | 					     (int)strcspn(line, "\r\n"), line); | ||||||
|  | 
 | ||||||
| 			continue; | 			continue; | ||||||
| 		} | 		} | ||||||
| setsym: | setsym: | ||||||
|  | @ -400,9 +399,6 @@ setsym: | ||||||
| 	} | 	} | ||||||
| 	free(line); | 	free(line); | ||||||
| 	fclose(in); | 	fclose(in); | ||||||
| 
 |  | ||||||
| 	if (modules_sym) |  | ||||||
| 		sym_calc_value(modules_sym); |  | ||||||
| 	return 0; | 	return 0; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | @ -413,8 +409,12 @@ int conf_read(const char *name) | ||||||
| 
 | 
 | ||||||
| 	sym_set_change_count(0); | 	sym_set_change_count(0); | ||||||
| 
 | 
 | ||||||
| 	if (conf_read_simple(name, S_DEF_USER)) | 	if (conf_read_simple(name, S_DEF_USER)) { | ||||||
|  | 		sym_calc_value(modules_sym); | ||||||
| 		return 1; | 		return 1; | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	sym_calc_value(modules_sym); | ||||||
| 
 | 
 | ||||||
| 	for_all_symbols(i, sym) { | 	for_all_symbols(i, sym) { | ||||||
| 		sym_calc_value(sym); | 		sym_calc_value(sym); | ||||||
|  | @ -847,6 +847,7 @@ static int conf_split_config(void) | ||||||
| 
 | 
 | ||||||
| 	name = conf_get_autoconfig_name(); | 	name = conf_get_autoconfig_name(); | ||||||
| 	conf_read_simple(name, S_DEF_AUTO); | 	conf_read_simple(name, S_DEF_AUTO); | ||||||
|  | 	sym_calc_value(modules_sym); | ||||||
| 
 | 
 | ||||||
| 	if (chdir("include/config")) | 	if (chdir("include/config")) | ||||||
| 		return 1; | 		return 1; | ||||||
|  |  | ||||||
|  | @ -13,9 +13,6 @@ | ||||||
| 
 | 
 | ||||||
| static int expr_eq(struct expr *e1, struct expr *e2); | static int expr_eq(struct expr *e1, struct expr *e2); | ||||||
| static struct expr *expr_eliminate_yn(struct expr *e); | static struct expr *expr_eliminate_yn(struct expr *e); | ||||||
| static struct expr *expr_extract_eq_and(struct expr **ep1, struct expr **ep2); |  | ||||||
| static struct expr *expr_extract_eq_or(struct expr **ep1, struct expr **ep2); |  | ||||||
| static void expr_extract_eq(enum expr_type type, struct expr **ep, struct expr **ep1, struct expr **ep2); |  | ||||||
| 
 | 
 | ||||||
| struct expr *expr_alloc_symbol(struct symbol *sym) | struct expr *expr_alloc_symbol(struct symbol *sym) | ||||||
| { | { | ||||||
|  | @ -82,6 +79,10 @@ struct expr *expr_copy(const struct expr *org) | ||||||
| 		e->left.expr = expr_copy(org->left.expr); | 		e->left.expr = expr_copy(org->left.expr); | ||||||
| 		break; | 		break; | ||||||
| 	case E_EQUAL: | 	case E_EQUAL: | ||||||
|  | 	case E_GEQ: | ||||||
|  | 	case E_GTH: | ||||||
|  | 	case E_LEQ: | ||||||
|  | 	case E_LTH: | ||||||
| 	case E_UNEQUAL: | 	case E_UNEQUAL: | ||||||
| 		e->left.sym = org->left.sym; | 		e->left.sym = org->left.sym; | ||||||
| 		e->right.sym = org->right.sym; | 		e->right.sym = org->right.sym; | ||||||
|  | @ -114,6 +115,10 @@ void expr_free(struct expr *e) | ||||||
| 		expr_free(e->left.expr); | 		expr_free(e->left.expr); | ||||||
| 		return; | 		return; | ||||||
| 	case E_EQUAL: | 	case E_EQUAL: | ||||||
|  | 	case E_GEQ: | ||||||
|  | 	case E_GTH: | ||||||
|  | 	case E_LEQ: | ||||||
|  | 	case E_LTH: | ||||||
| 	case E_UNEQUAL: | 	case E_UNEQUAL: | ||||||
| 		break; | 		break; | ||||||
| 	case E_OR: | 	case E_OR: | ||||||
|  | @ -200,6 +205,10 @@ static int expr_eq(struct expr *e1, struct expr *e2) | ||||||
| 		return 0; | 		return 0; | ||||||
| 	switch (e1->type) { | 	switch (e1->type) { | ||||||
| 	case E_EQUAL: | 	case E_EQUAL: | ||||||
|  | 	case E_GEQ: | ||||||
|  | 	case E_GTH: | ||||||
|  | 	case E_LEQ: | ||||||
|  | 	case E_LTH: | ||||||
| 	case E_UNEQUAL: | 	case E_UNEQUAL: | ||||||
| 		return e1->left.sym == e2->left.sym && e1->right.sym == e2->right.sym; | 		return e1->left.sym == e2->left.sym && e1->right.sym == e2->right.sym; | ||||||
| 	case E_SYMBOL: | 	case E_SYMBOL: | ||||||
|  | @ -559,62 +568,6 @@ static void expr_eliminate_dups1(enum expr_type type, struct expr **ep1, struct | ||||||
| #undef e2 | #undef e2 | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| static void expr_eliminate_dups2(enum expr_type type, struct expr **ep1, struct expr **ep2) |  | ||||||
| { |  | ||||||
| #define e1 (*ep1) |  | ||||||
| #define e2 (*ep2) |  | ||||||
| 	struct expr *tmp, *tmp1, *tmp2; |  | ||||||
| 
 |  | ||||||
| 	if (e1->type == type) { |  | ||||||
| 		expr_eliminate_dups2(type, &e1->left.expr, &e2); |  | ||||||
| 		expr_eliminate_dups2(type, &e1->right.expr, &e2); |  | ||||||
| 		return; |  | ||||||
| 	} |  | ||||||
| 	if (e2->type == type) { |  | ||||||
| 		expr_eliminate_dups2(type, &e1, &e2->left.expr); |  | ||||||
| 		expr_eliminate_dups2(type, &e1, &e2->right.expr); |  | ||||||
| 	} |  | ||||||
| 	if (e1 == e2) |  | ||||||
| 		return; |  | ||||||
| 
 |  | ||||||
| 	switch (e1->type) { |  | ||||||
| 	case E_OR: |  | ||||||
| 		expr_eliminate_dups2(e1->type, &e1, &e1); |  | ||||||
| 		// (FOO || BAR) && (!FOO && !BAR) -> n
 |  | ||||||
| 		tmp1 = expr_transform(expr_alloc_one(E_NOT, expr_copy(e1))); |  | ||||||
| 		tmp2 = expr_copy(e2); |  | ||||||
| 		tmp = expr_extract_eq_and(&tmp1, &tmp2); |  | ||||||
| 		if (expr_is_yes(tmp1)) { |  | ||||||
| 			expr_free(e1); |  | ||||||
| 			e1 = expr_alloc_symbol(&symbol_no); |  | ||||||
| 			trans_count++; |  | ||||||
| 		} |  | ||||||
| 		expr_free(tmp2); |  | ||||||
| 		expr_free(tmp1); |  | ||||||
| 		expr_free(tmp); |  | ||||||
| 		break; |  | ||||||
| 	case E_AND: |  | ||||||
| 		expr_eliminate_dups2(e1->type, &e1, &e1); |  | ||||||
| 		// (FOO && BAR) || (!FOO || !BAR) -> y
 |  | ||||||
| 		tmp1 = expr_transform(expr_alloc_one(E_NOT, expr_copy(e1))); |  | ||||||
| 		tmp2 = expr_copy(e2); |  | ||||||
| 		tmp = expr_extract_eq_or(&tmp1, &tmp2); |  | ||||||
| 		if (expr_is_no(tmp1)) { |  | ||||||
| 			expr_free(e1); |  | ||||||
| 			e1 = expr_alloc_symbol(&symbol_yes); |  | ||||||
| 			trans_count++; |  | ||||||
| 		} |  | ||||||
| 		expr_free(tmp2); |  | ||||||
| 		expr_free(tmp1); |  | ||||||
| 		expr_free(tmp); |  | ||||||
| 		break; |  | ||||||
| 	default: |  | ||||||
| 		; |  | ||||||
| 	} |  | ||||||
| #undef e1 |  | ||||||
| #undef e2 |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| struct expr *expr_eliminate_dups(struct expr *e) | struct expr *expr_eliminate_dups(struct expr *e) | ||||||
| { | { | ||||||
| 	int oldcount; | 	int oldcount; | ||||||
|  | @ -627,7 +580,6 @@ struct expr *expr_eliminate_dups(struct expr *e) | ||||||
| 		switch (e->type) { | 		switch (e->type) { | ||||||
| 		case E_OR: case E_AND: | 		case E_OR: case E_AND: | ||||||
| 			expr_eliminate_dups1(e->type, &e, &e); | 			expr_eliminate_dups1(e->type, &e, &e); | ||||||
| 			expr_eliminate_dups2(e->type, &e, &e); |  | ||||||
| 		default: | 		default: | ||||||
| 			; | 			; | ||||||
| 		} | 		} | ||||||
|  | @ -647,6 +599,10 @@ struct expr *expr_transform(struct expr *e) | ||||||
| 		return NULL; | 		return NULL; | ||||||
| 	switch (e->type) { | 	switch (e->type) { | ||||||
| 	case E_EQUAL: | 	case E_EQUAL: | ||||||
|  | 	case E_GEQ: | ||||||
|  | 	case E_GTH: | ||||||
|  | 	case E_LEQ: | ||||||
|  | 	case E_LTH: | ||||||
| 	case E_UNEQUAL: | 	case E_UNEQUAL: | ||||||
| 	case E_SYMBOL: | 	case E_SYMBOL: | ||||||
| 	case E_LIST: | 	case E_LIST: | ||||||
|  | @ -719,6 +675,22 @@ struct expr *expr_transform(struct expr *e) | ||||||
| 			e = tmp; | 			e = tmp; | ||||||
| 			e->type = e->type == E_EQUAL ? E_UNEQUAL : E_EQUAL; | 			e->type = e->type == E_EQUAL ? E_UNEQUAL : E_EQUAL; | ||||||
| 			break; | 			break; | ||||||
|  | 		case E_LEQ: | ||||||
|  | 		case E_GEQ: | ||||||
|  | 			// !a<='x' -> a>'x'
 | ||||||
|  | 			tmp = e->left.expr; | ||||||
|  | 			free(e); | ||||||
|  | 			e = tmp; | ||||||
|  | 			e->type = e->type == E_LEQ ? E_GTH : E_LTH; | ||||||
|  | 			break; | ||||||
|  | 		case E_LTH: | ||||||
|  | 		case E_GTH: | ||||||
|  | 			// !a<'x' -> a>='x'
 | ||||||
|  | 			tmp = e->left.expr; | ||||||
|  | 			free(e); | ||||||
|  | 			e = tmp; | ||||||
|  | 			e->type = e->type == E_LTH ? E_GEQ : E_LEQ; | ||||||
|  | 			break; | ||||||
| 		case E_OR: | 		case E_OR: | ||||||
| 			// !(a || b) -> !a && !b
 | 			// !(a || b) -> !a && !b
 | ||||||
| 			tmp = e->left.expr; | 			tmp = e->left.expr; | ||||||
|  | @ -789,6 +761,10 @@ int expr_contains_symbol(struct expr *dep, struct symbol *sym) | ||||||
| 	case E_SYMBOL: | 	case E_SYMBOL: | ||||||
| 		return dep->left.sym == sym; | 		return dep->left.sym == sym; | ||||||
| 	case E_EQUAL: | 	case E_EQUAL: | ||||||
|  | 	case E_GEQ: | ||||||
|  | 	case E_GTH: | ||||||
|  | 	case E_LEQ: | ||||||
|  | 	case E_LTH: | ||||||
| 	case E_UNEQUAL: | 	case E_UNEQUAL: | ||||||
| 		return dep->left.sym == sym || | 		return dep->left.sym == sym || | ||||||
| 		       dep->right.sym == sym; | 		       dep->right.sym == sym; | ||||||
|  | @ -829,57 +805,6 @@ bool expr_depends_symbol(struct expr *dep, struct symbol *sym) | ||||||
|  	return false; |  	return false; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| static struct expr *expr_extract_eq_and(struct expr **ep1, struct expr **ep2) |  | ||||||
| { |  | ||||||
| 	struct expr *tmp = NULL; |  | ||||||
| 	expr_extract_eq(E_AND, &tmp, ep1, ep2); |  | ||||||
| 	if (tmp) { |  | ||||||
| 		*ep1 = expr_eliminate_yn(*ep1); |  | ||||||
| 		*ep2 = expr_eliminate_yn(*ep2); |  | ||||||
| 	} |  | ||||||
| 	return tmp; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| static struct expr *expr_extract_eq_or(struct expr **ep1, struct expr **ep2) |  | ||||||
| { |  | ||||||
| 	struct expr *tmp = NULL; |  | ||||||
| 	expr_extract_eq(E_OR, &tmp, ep1, ep2); |  | ||||||
| 	if (tmp) { |  | ||||||
| 		*ep1 = expr_eliminate_yn(*ep1); |  | ||||||
| 		*ep2 = expr_eliminate_yn(*ep2); |  | ||||||
| 	} |  | ||||||
| 	return tmp; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| static void expr_extract_eq(enum expr_type type, struct expr **ep, struct expr **ep1, struct expr **ep2) |  | ||||||
| { |  | ||||||
| #define e1 (*ep1) |  | ||||||
| #define e2 (*ep2) |  | ||||||
| 	if (e1->type == type) { |  | ||||||
| 		expr_extract_eq(type, ep, &e1->left.expr, &e2); |  | ||||||
| 		expr_extract_eq(type, ep, &e1->right.expr, &e2); |  | ||||||
| 		return; |  | ||||||
| 	} |  | ||||||
| 	if (e2->type == type) { |  | ||||||
| 		expr_extract_eq(type, ep, ep1, &e2->left.expr); |  | ||||||
| 		expr_extract_eq(type, ep, ep1, &e2->right.expr); |  | ||||||
| 		return; |  | ||||||
| 	} |  | ||||||
| 	if (expr_eq(e1, e2)) { |  | ||||||
| 		*ep = *ep ? expr_alloc_two(type, *ep, e1) : e1; |  | ||||||
| 		expr_free(e2); |  | ||||||
| 		if (type == E_AND) { |  | ||||||
| 			e1 = expr_alloc_symbol(&symbol_yes); |  | ||||||
| 			e2 = expr_alloc_symbol(&symbol_yes); |  | ||||||
| 		} else if (type == E_OR) { |  | ||||||
| 			e1 = expr_alloc_symbol(&symbol_no); |  | ||||||
| 			e2 = expr_alloc_symbol(&symbol_no); |  | ||||||
| 		} |  | ||||||
| 	} |  | ||||||
| #undef e1 |  | ||||||
| #undef e2 |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| struct expr *expr_trans_compare(struct expr *e, enum expr_type type, struct symbol *sym) | struct expr *expr_trans_compare(struct expr *e, enum expr_type type, struct symbol *sym) | ||||||
| { | { | ||||||
| 	struct expr *e1, *e2; | 	struct expr *e1, *e2; | ||||||
|  | @ -914,6 +839,10 @@ struct expr *expr_trans_compare(struct expr *e, enum expr_type type, struct symb | ||||||
| 	case E_NOT: | 	case E_NOT: | ||||||
| 		return expr_trans_compare(e->left.expr, type == E_EQUAL ? E_UNEQUAL : E_EQUAL, sym); | 		return expr_trans_compare(e->left.expr, type == E_EQUAL ? E_UNEQUAL : E_EQUAL, sym); | ||||||
| 	case E_UNEQUAL: | 	case E_UNEQUAL: | ||||||
|  | 	case E_LTH: | ||||||
|  | 	case E_LEQ: | ||||||
|  | 	case E_GTH: | ||||||
|  | 	case E_GEQ: | ||||||
| 	case E_EQUAL: | 	case E_EQUAL: | ||||||
| 		if (type == E_EQUAL) { | 		if (type == E_EQUAL) { | ||||||
| 			if (sym == &symbol_yes) | 			if (sym == &symbol_yes) | ||||||
|  | @ -941,10 +870,57 @@ struct expr *expr_trans_compare(struct expr *e, enum expr_type type, struct symb | ||||||
| 	return NULL; | 	return NULL; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | enum string_value_kind { | ||||||
|  | 	k_string, | ||||||
|  | 	k_signed, | ||||||
|  | 	k_unsigned, | ||||||
|  | 	k_invalid | ||||||
|  | }; | ||||||
|  | 
 | ||||||
|  | union string_value { | ||||||
|  | 	unsigned long long u; | ||||||
|  | 	signed long long s; | ||||||
|  | }; | ||||||
|  | 
 | ||||||
|  | static enum string_value_kind expr_parse_string(const char *str, | ||||||
|  | 						enum symbol_type type, | ||||||
|  | 						union string_value *val) | ||||||
|  | { | ||||||
|  | 	char *tail; | ||||||
|  | 	enum string_value_kind kind; | ||||||
|  | 
 | ||||||
|  | 	errno = 0; | ||||||
|  | 	switch (type) { | ||||||
|  | 	case S_BOOLEAN: | ||||||
|  | 	case S_TRISTATE: | ||||||
|  | 		return k_string; | ||||||
|  | 	case S_INT: | ||||||
|  | 		val->s = strtoll(str, &tail, 10); | ||||||
|  | 		kind = k_signed; | ||||||
|  | 		break; | ||||||
|  | 	case S_HEX: | ||||||
|  | 		val->u = strtoull(str, &tail, 16); | ||||||
|  | 		kind = k_unsigned; | ||||||
|  | 		break; | ||||||
|  | 	case S_STRING: | ||||||
|  | 	case S_UNKNOWN: | ||||||
|  | 		val->s = strtoll(str, &tail, 0); | ||||||
|  | 		kind = k_signed; | ||||||
|  | 		break; | ||||||
|  | 	default: | ||||||
|  | 		return k_invalid; | ||||||
|  | 	} | ||||||
|  | 	return !errno && !*tail && tail > str && isxdigit(tail[-1]) | ||||||
|  | 	       ? kind : k_string; | ||||||
|  | } | ||||||
|  | 
 | ||||||
| tristate expr_calc_value(struct expr *e) | tristate expr_calc_value(struct expr *e) | ||||||
| { | { | ||||||
| 	tristate val1, val2; | 	tristate val1, val2; | ||||||
| 	const char *str1, *str2; | 	const char *str1, *str2; | ||||||
|  | 	enum string_value_kind k1 = k_string, k2 = k_string; | ||||||
|  | 	union string_value lval = {}, rval = {}; | ||||||
|  | 	int res; | ||||||
| 
 | 
 | ||||||
| 	if (!e) | 	if (!e) | ||||||
| 		return yes; | 		return yes; | ||||||
|  | @ -965,21 +941,57 @@ tristate expr_calc_value(struct expr *e) | ||||||
| 		val1 = expr_calc_value(e->left.expr); | 		val1 = expr_calc_value(e->left.expr); | ||||||
| 		return EXPR_NOT(val1); | 		return EXPR_NOT(val1); | ||||||
| 	case E_EQUAL: | 	case E_EQUAL: | ||||||
| 		sym_calc_value(e->left.sym); | 	case E_GEQ: | ||||||
| 		sym_calc_value(e->right.sym); | 	case E_GTH: | ||||||
| 		str1 = sym_get_string_value(e->left.sym); | 	case E_LEQ: | ||||||
| 		str2 = sym_get_string_value(e->right.sym); | 	case E_LTH: | ||||||
| 		return !strcmp(str1, str2) ? yes : no; |  | ||||||
| 	case E_UNEQUAL: | 	case E_UNEQUAL: | ||||||
| 		sym_calc_value(e->left.sym); | 		break; | ||||||
| 		sym_calc_value(e->right.sym); |  | ||||||
| 		str1 = sym_get_string_value(e->left.sym); |  | ||||||
| 		str2 = sym_get_string_value(e->right.sym); |  | ||||||
| 		return !strcmp(str1, str2) ? no : yes; |  | ||||||
| 	default: | 	default: | ||||||
| 		printf("expr_calc_value: %d?\n", e->type); | 		printf("expr_calc_value: %d?\n", e->type); | ||||||
| 		return no; | 		return no; | ||||||
| 	} | 	} | ||||||
|  | 
 | ||||||
|  | 	sym_calc_value(e->left.sym); | ||||||
|  | 	sym_calc_value(e->right.sym); | ||||||
|  | 	str1 = sym_get_string_value(e->left.sym); | ||||||
|  | 	str2 = sym_get_string_value(e->right.sym); | ||||||
|  | 
 | ||||||
|  | 	if (e->left.sym->type != S_STRING || e->right.sym->type != S_STRING) { | ||||||
|  | 		k1 = expr_parse_string(str1, e->left.sym->type, &lval); | ||||||
|  | 		k2 = expr_parse_string(str2, e->right.sym->type, &rval); | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	if (k1 == k_string || k2 == k_string) | ||||||
|  | 		res = strcmp(str1, str2); | ||||||
|  | 	else if (k1 == k_invalid || k2 == k_invalid) { | ||||||
|  | 		if (e->type != E_EQUAL && e->type != E_UNEQUAL) { | ||||||
|  | 			printf("Cannot compare \"%s\" and \"%s\"\n", str1, str2); | ||||||
|  | 			return no; | ||||||
|  | 		} | ||||||
|  | 		res = strcmp(str1, str2); | ||||||
|  | 	} else if (k1 == k_unsigned || k2 == k_unsigned) | ||||||
|  | 		res = (lval.u > rval.u) - (lval.u < rval.u); | ||||||
|  | 	else /* if (k1 == k_signed && k2 == k_signed) */ | ||||||
|  | 		res = (lval.s > rval.s) - (lval.s < rval.s); | ||||||
|  | 
 | ||||||
|  | 	switch(e->type) { | ||||||
|  | 	case E_EQUAL: | ||||||
|  | 		return res ? no : yes; | ||||||
|  | 	case E_GEQ: | ||||||
|  | 		return res >= 0 ? yes : no; | ||||||
|  | 	case E_GTH: | ||||||
|  | 		return res > 0 ? yes : no; | ||||||
|  | 	case E_LEQ: | ||||||
|  | 		return res <= 0 ? yes : no; | ||||||
|  | 	case E_LTH: | ||||||
|  | 		return res < 0 ? yes : no; | ||||||
|  | 	case E_UNEQUAL: | ||||||
|  | 		return res ? yes : no; | ||||||
|  | 	default: | ||||||
|  | 		printf("expr_calc_value: relation %d?\n", e->type); | ||||||
|  | 		return no; | ||||||
|  | 	} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| static int expr_compare_type(enum expr_type t1, enum expr_type t2) | static int expr_compare_type(enum expr_type t1, enum expr_type t2) | ||||||
|  | @ -987,6 +999,12 @@ static int expr_compare_type(enum expr_type t1, enum expr_type t2) | ||||||
| 	if (t1 == t2) | 	if (t1 == t2) | ||||||
| 		return 0; | 		return 0; | ||||||
| 	switch (t1) { | 	switch (t1) { | ||||||
|  | 	case E_LEQ: | ||||||
|  | 	case E_LTH: | ||||||
|  | 	case E_GEQ: | ||||||
|  | 	case E_GTH: | ||||||
|  | 		if (t2 == E_EQUAL || t2 == E_UNEQUAL) | ||||||
|  | 			return 1; | ||||||
| 	case E_EQUAL: | 	case E_EQUAL: | ||||||
| 	case E_UNEQUAL: | 	case E_UNEQUAL: | ||||||
| 		if (t2 == E_NOT) | 		if (t2 == E_NOT) | ||||||
|  | @ -1080,6 +1098,24 @@ void expr_print(struct expr *e, void (*fn)(void *, struct symbol *, const char * | ||||||
| 		fn(data, NULL, "="); | 		fn(data, NULL, "="); | ||||||
| 		fn(data, e->right.sym, e->right.sym->name); | 		fn(data, e->right.sym, e->right.sym->name); | ||||||
| 		break; | 		break; | ||||||
|  | 	case E_LEQ: | ||||||
|  | 	case E_LTH: | ||||||
|  | 		if (e->left.sym->name) | ||||||
|  | 			fn(data, e->left.sym, e->left.sym->name); | ||||||
|  | 		else | ||||||
|  | 			fn(data, NULL, "<choice>"); | ||||||
|  | 		fn(data, NULL, e->type == E_LEQ ? "<=" : "<"); | ||||||
|  | 		fn(data, e->right.sym, e->right.sym->name); | ||||||
|  | 		break; | ||||||
|  | 	case E_GEQ: | ||||||
|  | 	case E_GTH: | ||||||
|  | 		if (e->left.sym->name) | ||||||
|  | 			fn(data, e->left.sym, e->left.sym->name); | ||||||
|  | 		else | ||||||
|  | 			fn(data, NULL, "<choice>"); | ||||||
|  | 		fn(data, NULL, e->type == E_GEQ ? ">=" : ">"); | ||||||
|  | 		fn(data, e->right.sym, e->right.sym->name); | ||||||
|  | 		break; | ||||||
| 	case E_UNEQUAL: | 	case E_UNEQUAL: | ||||||
| 		if (e->left.sym->name) | 		if (e->left.sym->name) | ||||||
| 			fn(data, e->left.sym, e->left.sym->name); | 			fn(data, e->left.sym, e->left.sym->name); | ||||||
|  |  | ||||||
|  | @ -29,7 +29,9 @@ typedef enum tristate { | ||||||
| } tristate; | } tristate; | ||||||
| 
 | 
 | ||||||
| enum expr_type { | enum expr_type { | ||||||
| 	E_NONE, E_OR, E_AND, E_NOT, E_EQUAL, E_UNEQUAL, E_LIST, E_SYMBOL, E_RANGE | 	E_NONE, E_OR, E_AND, E_NOT, | ||||||
|  | 	E_EQUAL, E_UNEQUAL, E_LTH, E_LEQ, E_GTH, E_GEQ, | ||||||
|  | 	E_LIST, E_SYMBOL, E_RANGE | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| union expr_data { | union expr_data { | ||||||
|  | @ -83,6 +85,7 @@ struct symbol { | ||||||
| 	struct property *prop; | 	struct property *prop; | ||||||
| 	struct expr_value dir_dep; | 	struct expr_value dir_dep; | ||||||
| 	struct expr_value rev_dep; | 	struct expr_value rev_dep; | ||||||
|  | 	struct expr_value implied; | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| #define for_all_symbols(i, sym) for (i = 0; i < SYMBOL_HASHSIZE; i++) for (sym = symbol_hash[i]; sym; sym = sym->next) if (sym->type != S_OTHER) | #define for_all_symbols(i, sym) for (i = 0; i < SYMBOL_HASHSIZE; i++) for (sym = symbol_hash[i]; sym; sym = sym->next) if (sym->type != S_OTHER) | ||||||
|  | @ -134,6 +137,7 @@ enum prop_type { | ||||||
| 	P_DEFAULT,  /* default y */ | 	P_DEFAULT,  /* default y */ | ||||||
| 	P_CHOICE,   /* choice value */ | 	P_CHOICE,   /* choice value */ | ||||||
| 	P_SELECT,   /* select BAR */ | 	P_SELECT,   /* select BAR */ | ||||||
|  | 	P_IMPLY,    /* imply BAR */ | ||||||
| 	P_RANGE,    /* range 7..100 (for a symbol) */ | 	P_RANGE,    /* range 7..100 (for a symbol) */ | ||||||
| 	P_ENV,      /* value from environment variable */ | 	P_ENV,      /* value from environment variable */ | ||||||
| 	P_SYMBOL,   /* where a symbol is defined */ | 	P_SYMBOL,   /* where a symbol is defined */ | ||||||
|  |  | ||||||
|  | @ -233,6 +233,8 @@ static void sym_check_prop(struct symbol *sym) | ||||||
| { | { | ||||||
| 	struct property *prop; | 	struct property *prop; | ||||||
| 	struct symbol *sym2; | 	struct symbol *sym2; | ||||||
|  | 	char *use; | ||||||
|  | 
 | ||||||
| 	for (prop = sym->prop; prop; prop = prop->next) { | 	for (prop = sym->prop; prop; prop = prop->next) { | ||||||
| 		switch (prop->type) { | 		switch (prop->type) { | ||||||
| 		case P_DEFAULT: | 		case P_DEFAULT: | ||||||
|  | @ -252,18 +254,20 @@ static void sym_check_prop(struct symbol *sym) | ||||||
| 			} | 			} | ||||||
| 			break; | 			break; | ||||||
| 		case P_SELECT: | 		case P_SELECT: | ||||||
|  | 		case P_IMPLY: | ||||||
|  | 			use = prop->type == P_SELECT ? "select" : "imply"; | ||||||
| 			sym2 = prop_get_symbol(prop); | 			sym2 = prop_get_symbol(prop); | ||||||
| 			if (sym->type != S_BOOLEAN && sym->type != S_TRISTATE) | 			if (sym->type != S_BOOLEAN && sym->type != S_TRISTATE) | ||||||
| 				prop_warn(prop, | 				prop_warn(prop, | ||||||
| 				    "config symbol '%s' uses select, but is " | 				    "config symbol '%s' uses %s, but is " | ||||||
| 				    "not boolean or tristate", sym->name); | 				    "not boolean or tristate", sym->name, use); | ||||||
| 			else if (sym2->type != S_UNKNOWN && | 			else if (sym2->type != S_UNKNOWN && | ||||||
| 				 sym2->type != S_BOOLEAN && | 				 sym2->type != S_BOOLEAN && | ||||||
| 				 sym2->type != S_TRISTATE) | 				 sym2->type != S_TRISTATE) | ||||||
| 				prop_warn(prop, | 				prop_warn(prop, | ||||||
| 				    "'%s' has wrong type. 'select' only " | 				    "'%s' has wrong type. '%s' only " | ||||||
| 				    "accept arguments of boolean and " | 				    "accept arguments of boolean and " | ||||||
| 				    "tristate type", sym2->name); | 				    "tristate type", sym2->name, use); | ||||||
| 			break; | 			break; | ||||||
| 		case P_RANGE: | 		case P_RANGE: | ||||||
| 			if (sym->type != S_INT && sym->type != S_HEX) | 			if (sym->type != S_INT && sym->type != S_HEX) | ||||||
|  | @ -333,6 +337,10 @@ void menu_finalize(struct menu *parent) | ||||||
| 					struct symbol *es = prop_get_symbol(prop); | 					struct symbol *es = prop_get_symbol(prop); | ||||||
| 					es->rev_dep.expr = expr_alloc_or(es->rev_dep.expr, | 					es->rev_dep.expr = expr_alloc_or(es->rev_dep.expr, | ||||||
| 							expr_alloc_and(expr_alloc_symbol(menu->sym), expr_copy(dep))); | 							expr_alloc_and(expr_alloc_symbol(menu->sym), expr_copy(dep))); | ||||||
|  | 				} else if (prop->type == P_IMPLY) { | ||||||
|  | 					struct symbol *es = prop_get_symbol(prop); | ||||||
|  | 					es->implied.expr = expr_alloc_or(es->implied.expr, | ||||||
|  | 							expr_alloc_and(expr_alloc_symbol(menu->sym), expr_copy(dep))); | ||||||
| 				} | 				} | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
|  | @ -477,7 +485,7 @@ bool menu_is_visible(struct menu *menu) | ||||||
| 
 | 
 | ||||||
| 	if (menu->visibility) { | 	if (menu->visibility) { | ||||||
| 		if (expr_calc_value(menu->visibility) == no) | 		if (expr_calc_value(menu->visibility) == no) | ||||||
| 			return no; | 			return false; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	sym = menu->sym; | 	sym = menu->sym; | ||||||
|  | @ -612,13 +620,30 @@ static struct property *get_symbol_prop(struct symbol *sym) | ||||||
| 	return prop; | 	return prop; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | static void get_symbol_props_str(struct gstr *r, struct symbol *sym, | ||||||
|  | 				 enum prop_type tok, const char *prefix) | ||||||
|  | { | ||||||
|  | 	bool hit = false; | ||||||
|  | 	struct property *prop; | ||||||
|  | 
 | ||||||
|  | 	for_all_properties(sym, prop, tok) { | ||||||
|  | 		if (!hit) { | ||||||
|  | 			str_append(r, prefix); | ||||||
|  | 			hit = true; | ||||||
|  | 		} else | ||||||
|  | 			str_printf(r, " && "); | ||||||
|  | 		expr_gstr_print(prop->expr, r); | ||||||
|  | 	} | ||||||
|  | 	if (hit) | ||||||
|  | 		str_append(r, "\n"); | ||||||
|  | } | ||||||
|  | 
 | ||||||
| /*
 | /*
 | ||||||
|  * head is optional and may be NULL |  * head is optional and may be NULL | ||||||
|  */ |  */ | ||||||
| static void get_symbol_str(struct gstr *r, struct symbol *sym, | static void get_symbol_str(struct gstr *r, struct symbol *sym, | ||||||
| 		    struct list_head *head) | 		    struct list_head *head) | ||||||
| { | { | ||||||
| 	bool hit; |  | ||||||
| 	struct property *prop; | 	struct property *prop; | ||||||
| 
 | 
 | ||||||
| 	if (sym && sym->name) { | 	if (sym && sym->name) { | ||||||
|  | @ -648,22 +673,20 @@ static void get_symbol_str(struct gstr *r, struct symbol *sym, | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	hit = false; | 	get_symbol_props_str(r, sym, P_SELECT, _("  Selects: ")); | ||||||
| 	for_all_properties(sym, prop, P_SELECT) { |  | ||||||
| 		if (!hit) { |  | ||||||
| 			str_append(r, "  Selects: "); |  | ||||||
| 			hit = true; |  | ||||||
| 		} else |  | ||||||
| 			str_printf(r, " && "); |  | ||||||
| 		expr_gstr_print(prop->expr, r); |  | ||||||
| 	} |  | ||||||
| 	if (hit) |  | ||||||
| 		str_append(r, "\n"); |  | ||||||
| 	if (sym->rev_dep.expr) { | 	if (sym->rev_dep.expr) { | ||||||
| 		str_append(r, _("  Selected by: ")); | 		str_append(r, _("  Selected by: ")); | ||||||
| 		expr_gstr_print(sym->rev_dep.expr, r); | 		expr_gstr_print(sym->rev_dep.expr, r); | ||||||
| 		str_append(r, "\n"); | 		str_append(r, "\n"); | ||||||
| 	} | 	} | ||||||
|  | 
 | ||||||
|  | 	get_symbol_props_str(r, sym, P_IMPLY, _("  Implies: ")); | ||||||
|  | 	if (sym->implied.expr) { | ||||||
|  | 		str_append(r, _("  Implied by: ")); | ||||||
|  | 		expr_gstr_print(sym->implied.expr, r); | ||||||
|  | 		str_append(r, "\n"); | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
| 	str_append(r, "\n\n"); | 	str_append(r, "\n\n"); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -32,7 +32,7 @@ usage() { | ||||||
| 	echo "  -m    only merge the fragments, do not execute the make command" | 	echo "  -m    only merge the fragments, do not execute the make command" | ||||||
| 	echo "  -n    use allnoconfig instead of alldefconfig" | 	echo "  -n    use allnoconfig instead of alldefconfig" | ||||||
| 	echo "  -r    list redundant entries when merging fragments" | 	echo "  -r    list redundant entries when merging fragments" | ||||||
| 	echo "  -O    dir to put generated output files" | 	echo "  -O    dir to put generated output files.  Consider setting \$KCONFIG_CONFIG instead." | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| RUNMAKE=true | RUNMAKE=true | ||||||
|  | @ -77,11 +77,19 @@ while true; do | ||||||
| 	esac | 	esac | ||||||
| done | done | ||||||
| 
 | 
 | ||||||
| if [ "$#" -lt 2 ] ; then | if [ "$#" -lt 1 ] ; then | ||||||
| 	usage | 	usage | ||||||
| 	exit | 	exit | ||||||
| fi | fi | ||||||
| 
 | 
 | ||||||
|  | if [ -z "$KCONFIG_CONFIG" ]; then | ||||||
|  | 	if [ "$OUTPUT" != . ]; then | ||||||
|  | 		KCONFIG_CONFIG=$(readlink -m -- "$OUTPUT/.config") | ||||||
|  | 	else | ||||||
|  | 		KCONFIG_CONFIG=.config | ||||||
|  | 	fi | ||||||
|  | fi | ||||||
|  | 
 | ||||||
| INITFILE=$1 | INITFILE=$1 | ||||||
| shift; | shift; | ||||||
| 
 | 
 | ||||||
|  | @ -100,6 +108,10 @@ cat $INITFILE > $TMP_FILE | ||||||
| # Merge files, printing warnings on overridden values | # Merge files, printing warnings on overridden values | ||||||
| for MERGE_FILE in $MERGE_LIST ; do | for MERGE_FILE in $MERGE_LIST ; do | ||||||
| 	echo "Merging $MERGE_FILE" | 	echo "Merging $MERGE_FILE" | ||||||
|  | 	if [ ! -r "$MERGE_FILE" ]; then | ||||||
|  | 		echo "The merge file '$MERGE_FILE' does not exist.  Exit." >&2 | ||||||
|  | 		exit 1 | ||||||
|  | 	fi | ||||||
| 	CFG_LIST=$(sed -n "$SED_CONFIG_EXP" $MERGE_FILE) | 	CFG_LIST=$(sed -n "$SED_CONFIG_EXP" $MERGE_FILE) | ||||||
| 
 | 
 | ||||||
| 	for CFG in $CFG_LIST ; do | 	for CFG in $CFG_LIST ; do | ||||||
|  | @ -120,9 +132,9 @@ for MERGE_FILE in $MERGE_LIST ; do | ||||||
| done | done | ||||||
| 
 | 
 | ||||||
| if [ "$RUNMAKE" = "false" ]; then | if [ "$RUNMAKE" = "false" ]; then | ||||||
| 	cp $TMP_FILE $OUTPUT/.config | 	cp -T -- "$TMP_FILE" "$KCONFIG_CONFIG" | ||||||
| 	echo "#" | 	echo "#" | ||||||
| 	echo "# merged configuration written to $OUTPUT/.config (needs make)" | 	echo "# merged configuration written to $KCONFIG_CONFIG (needs make)" | ||||||
| 	echo "#" | 	echo "#" | ||||||
| 	clean_up | 	clean_up | ||||||
| 	exit | 	exit | ||||||
|  | @ -146,7 +158,7 @@ make KCONFIG_ALLCONFIG=$TMP_FILE $OUTPUT_ARG $ALLTARGET | ||||||
| for CFG in $(sed -n "$SED_CONFIG_EXP" $TMP_FILE); do | for CFG in $(sed -n "$SED_CONFIG_EXP" $TMP_FILE); do | ||||||
| 
 | 
 | ||||||
| 	REQUESTED_VAL=$(grep -w -e "$CFG" $TMP_FILE) | 	REQUESTED_VAL=$(grep -w -e "$CFG" $TMP_FILE) | ||||||
| 	ACTUAL_VAL=$(grep -w -e "$CFG" $OUTPUT/.config) | 	ACTUAL_VAL=$(grep -w -e "$CFG" "$KCONFIG_CONFIG") | ||||||
| 	if [ "x$REQUESTED_VAL" != "x$ACTUAL_VAL" ] ; then | 	if [ "x$REQUESTED_VAL" != "x$ACTUAL_VAL" ] ; then | ||||||
| 		echo "Value requested for $CFG not in final .config" | 		echo "Value requested for $CFG not in final .config" | ||||||
| 		echo "Requested value:  $REQUESTED_VAL" | 		echo "Requested value:  $REQUESTED_VAL" | ||||||
|  |  | ||||||
|  | @ -5,7 +5,9 @@ | ||||||
|  * Derived from menuconfig. |  * Derived from menuconfig. | ||||||
|  * |  * | ||||||
|  */ |  */ | ||||||
|  | #ifndef _GNU_SOURCE | ||||||
| #define _GNU_SOURCE | #define _GNU_SOURCE | ||||||
|  | #endif | ||||||
| #include <string.h> | #include <string.h> | ||||||
| #include <stdlib.h> | #include <stdlib.h> | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -364,12 +364,14 @@ int dialog_inputbox(WINDOW *main_window, | ||||||
| 	WINDOW *prompt_win; | 	WINDOW *prompt_win; | ||||||
| 	WINDOW *form_win; | 	WINDOW *form_win; | ||||||
| 	PANEL *panel; | 	PANEL *panel; | ||||||
| 	int i, x, y; | 	int i, x, y, lines, columns, win_lines, win_cols; | ||||||
| 	int res = -1; | 	int res = -1; | ||||||
| 	int cursor_position = strlen(init); | 	int cursor_position = strlen(init); | ||||||
| 	int cursor_form_win; | 	int cursor_form_win; | ||||||
| 	char *result = *resultp; | 	char *result = *resultp; | ||||||
| 
 | 
 | ||||||
|  | 	getmaxyx(stdscr, lines, columns); | ||||||
|  | 
 | ||||||
| 	if (strlen(init)+1 > *result_len) { | 	if (strlen(init)+1 > *result_len) { | ||||||
| 		*result_len = strlen(init)+1; | 		*result_len = strlen(init)+1; | ||||||
| 		*resultp = result = realloc(result, *result_len); | 		*resultp = result = realloc(result, *result_len); | ||||||
|  | @ -386,14 +388,19 @@ int dialog_inputbox(WINDOW *main_window, | ||||||
| 	if (title) | 	if (title) | ||||||
| 		prompt_width = max(prompt_width, strlen(title)); | 		prompt_width = max(prompt_width, strlen(title)); | ||||||
| 
 | 
 | ||||||
|  | 	win_lines = min(prompt_lines+6, lines-2); | ||||||
|  | 	win_cols = min(prompt_width+7, columns-2); | ||||||
|  | 	prompt_lines = max(win_lines-6, 0); | ||||||
|  | 	prompt_width = max(win_cols-7, 0); | ||||||
|  | 
 | ||||||
| 	/* place dialog in middle of screen */ | 	/* place dialog in middle of screen */ | ||||||
| 	y = (getmaxy(stdscr)-(prompt_lines+4))/2; | 	y = (lines-win_lines)/2; | ||||||
| 	x = (getmaxx(stdscr)-(prompt_width+4))/2; | 	x = (columns-win_cols)/2; | ||||||
| 
 | 
 | ||||||
| 	strncpy(result, init, *result_len); | 	strncpy(result, init, *result_len); | ||||||
| 
 | 
 | ||||||
| 	/* create the windows */ | 	/* create the windows */ | ||||||
| 	win = newwin(prompt_lines+6, prompt_width+7, y, x); | 	win = newwin(win_lines, win_cols, y, x); | ||||||
| 	prompt_win = derwin(win, prompt_lines+1, prompt_width, 2, 2); | 	prompt_win = derwin(win, prompt_lines+1, prompt_width, 2, 2); | ||||||
| 	form_win = derwin(win, 1, prompt_width, prompt_lines+3, 2); | 	form_win = derwin(win, 1, prompt_width, prompt_lines+3, 2); | ||||||
| 	keypad(form_win, TRUE); | 	keypad(form_win, TRUE); | ||||||
|  |  | ||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							|  | @ -3,26 +3,18 @@ | ||||||
|  * Released under the terms of the GNU GPL v2.0. |  * Released under the terms of the GNU GPL v2.0. | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| #if QT_VERSION < 0x040000 | #include <QTextBrowser> | ||||||
| #include <qlistview.h> | #include <QTreeWidget> | ||||||
| #else | #include <QMainWindow> | ||||||
| #include <q3listview.h> | #include <QHeaderView> | ||||||
| #endif |  | ||||||
| #include <qsettings.h> | #include <qsettings.h> | ||||||
| 
 | #include <QPushButton> | ||||||
| #if QT_VERSION < 0x040000 | #include <QSettings> | ||||||
| #define Q3ValueList             QValueList | #include <QLineEdit> | ||||||
| #define Q3PopupMenu             QPopupMenu | #include <QSplitter> | ||||||
| #define Q3ListView              QListView | #include <QCheckBox> | ||||||
| #define Q3ListViewItem          QListViewItem | #include <QDialog> | ||||||
| #define Q3VBox                  QVBox | #include "expr.h" | ||||||
| #define Q3TextBrowser           QTextBrowser |  | ||||||
| #define Q3MainWindow            QMainWindow |  | ||||||
| #define Q3Action                QAction |  | ||||||
| #define Q3ToolBar               QToolBar |  | ||||||
| #define Q3ListViewItemIterator  QListViewItemIterator |  | ||||||
| #define Q3FileDialog            QFileDialog |  | ||||||
| #endif |  | ||||||
| 
 | 
 | ||||||
| class ConfigView; | class ConfigView; | ||||||
| class ConfigList; | class ConfigList; | ||||||
|  | @ -33,8 +25,8 @@ class ConfigMainWindow; | ||||||
| class ConfigSettings : public QSettings { | class ConfigSettings : public QSettings { | ||||||
| public: | public: | ||||||
| 	ConfigSettings(); | 	ConfigSettings(); | ||||||
| 	Q3ValueList<int> readSizes(const QString& key, bool *ok); | 	QList<int> readSizes(const QString& key, bool *ok); | ||||||
| 	bool writeSizes(const QString& key, const Q3ValueList<int>& value); | 	bool writeSizes(const QString& key, const QList<int>& value); | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| enum colIdx { | enum colIdx { | ||||||
|  | @ -47,9 +39,9 @@ enum optionMode { | ||||||
| 	normalOpt = 0, allOpt, promptOpt | 	normalOpt = 0, allOpt, promptOpt | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| class ConfigList : public Q3ListView { | class ConfigList : public QTreeWidget { | ||||||
| 	Q_OBJECT | 	Q_OBJECT | ||||||
| 	typedef class Q3ListView Parent; | 	typedef class QTreeWidget Parent; | ||||||
| public: | public: | ||||||
| 	ConfigList(ConfigView* p, const char *name = 0); | 	ConfigList(ConfigView* p, const char *name = 0); | ||||||
| 	void reinit(void); | 	void reinit(void); | ||||||
|  | @ -61,10 +53,10 @@ public: | ||||||
| 
 | 
 | ||||||
| protected: | protected: | ||||||
| 	void keyPressEvent(QKeyEvent *e); | 	void keyPressEvent(QKeyEvent *e); | ||||||
| 	void contentsMousePressEvent(QMouseEvent *e); | 	void mousePressEvent(QMouseEvent *e); | ||||||
| 	void contentsMouseReleaseEvent(QMouseEvent *e); | 	void mouseReleaseEvent(QMouseEvent *e); | ||||||
| 	void contentsMouseMoveEvent(QMouseEvent *e); | 	void mouseMoveEvent(QMouseEvent *e); | ||||||
| 	void contentsMouseDoubleClickEvent(QMouseEvent *e); | 	void mouseDoubleClickEvent(QMouseEvent *e); | ||||||
| 	void focusInEvent(QFocusEvent *e); | 	void focusInEvent(QFocusEvent *e); | ||||||
| 	void contextMenuEvent(QContextMenuEvent *e); | 	void contextMenuEvent(QContextMenuEvent *e); | ||||||
| 
 | 
 | ||||||
|  | @ -95,32 +87,23 @@ public: | ||||||
| 	} | 	} | ||||||
| 	ConfigItem* firstChild() const | 	ConfigItem* firstChild() const | ||||||
| 	{ | 	{ | ||||||
| 		return (ConfigItem *)Parent::firstChild(); | 		return (ConfigItem *)children().first(); | ||||||
| 	} | 	} | ||||||
| 	int mapIdx(colIdx idx) | 	void addColumn(colIdx idx) | ||||||
| 	{ | 	{ | ||||||
| 		return colMap[idx]; | 		showColumn(idx); | ||||||
| 	} |  | ||||||
| 	void addColumn(colIdx idx, const QString& label) |  | ||||||
| 	{ |  | ||||||
| 		colMap[idx] = Parent::addColumn(label); |  | ||||||
| 		colRevMap[colMap[idx]] = idx; |  | ||||||
| 	} | 	} | ||||||
| 	void removeColumn(colIdx idx) | 	void removeColumn(colIdx idx) | ||||||
| 	{ | 	{ | ||||||
| 		int col = colMap[idx]; | 		hideColumn(idx); | ||||||
| 		if (col >= 0) { |  | ||||||
| 			Parent::removeColumn(col); |  | ||||||
| 			colRevMap[col] = colMap[idx] = -1; |  | ||||||
| 		} |  | ||||||
| 	} | 	} | ||||||
| 	void setAllOpen(bool open); | 	void setAllOpen(bool open); | ||||||
| 	void setParentMenu(void); | 	void setParentMenu(void); | ||||||
| 
 | 
 | ||||||
| 	bool menuSkip(struct menu *); | 	bool menuSkip(struct menu *); | ||||||
| 
 | 
 | ||||||
| 	template <class P> | 	void updateMenuList(ConfigItem *parent, struct menu*); | ||||||
| 	void updateMenuList(P*, struct menu*); | 	void updateMenuList(ConfigList *parent, struct menu*); | ||||||
| 
 | 
 | ||||||
| 	bool updateAll; | 	bool updateAll; | ||||||
| 
 | 
 | ||||||
|  | @ -132,30 +115,26 @@ public: | ||||||
| 	enum listMode mode; | 	enum listMode mode; | ||||||
| 	enum optionMode optMode; | 	enum optionMode optMode; | ||||||
| 	struct menu *rootEntry; | 	struct menu *rootEntry; | ||||||
| 	QColorGroup disabledColorGroup; | 	QPalette disabledColorGroup; | ||||||
| 	QColorGroup inactivedColorGroup; | 	QPalette inactivedColorGroup; | ||||||
| 	Q3PopupMenu* headerPopup; | 	QMenu* headerPopup; | ||||||
| 
 |  | ||||||
| private: |  | ||||||
| 	int colMap[colNr]; |  | ||||||
| 	int colRevMap[colNr]; |  | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| class ConfigItem : public Q3ListViewItem { | class ConfigItem : public QTreeWidgetItem { | ||||||
| 	typedef class Q3ListViewItem Parent; | 	typedef class QTreeWidgetItem Parent; | ||||||
| public: | public: | ||||||
| 	ConfigItem(Q3ListView *parent, ConfigItem *after, struct menu *m, bool v) | 	ConfigItem(ConfigList *parent, ConfigItem *after, struct menu *m, bool v) | ||||||
| 	: Parent(parent, after), menu(m), visible(v), goParent(false) | 	: Parent(parent, after), nextItem(0), menu(m), visible(v), goParent(false) | ||||||
| 	{ | 	{ | ||||||
| 		init(); | 		init(); | ||||||
| 	} | 	} | ||||||
| 	ConfigItem(ConfigItem *parent, ConfigItem *after, struct menu *m, bool v) | 	ConfigItem(ConfigItem *parent, ConfigItem *after, struct menu *m, bool v) | ||||||
| 	: Parent(parent, after), menu(m), visible(v), goParent(false) | 	: Parent(parent, after), nextItem(0), menu(m), visible(v), goParent(false) | ||||||
| 	{ | 	{ | ||||||
| 		init(); | 		init(); | ||||||
| 	} | 	} | ||||||
| 	ConfigItem(Q3ListView *parent, ConfigItem *after, bool v) | 	ConfigItem(ConfigList *parent, ConfigItem *after, bool v) | ||||||
| 	: Parent(parent, after), menu(0), visible(v), goParent(true) | 	: Parent(parent, after), nextItem(0), menu(0), visible(v), goParent(true) | ||||||
| 	{ | 	{ | ||||||
| 		init(); | 		init(); | ||||||
| 	} | 	} | ||||||
|  | @ -166,33 +145,43 @@ public: | ||||||
| 	void testUpdateMenu(bool v); | 	void testUpdateMenu(bool v); | ||||||
| 	ConfigList* listView() const | 	ConfigList* listView() const | ||||||
| 	{ | 	{ | ||||||
| 		return (ConfigList*)Parent::listView(); | 		return (ConfigList*)Parent::treeWidget(); | ||||||
| 	} | 	} | ||||||
| 	ConfigItem* firstChild() const | 	ConfigItem* firstChild() const | ||||||
| 	{ | 	{ | ||||||
| 		return (ConfigItem *)Parent::firstChild(); | 		return (ConfigItem *)Parent::child(0); | ||||||
| 	} | 	} | ||||||
| 	ConfigItem* nextSibling() const | 	ConfigItem* nextSibling() | ||||||
| 	{ | 	{ | ||||||
| 		return (ConfigItem *)Parent::nextSibling(); | 		ConfigItem *ret = NULL; | ||||||
|  | 		ConfigItem *_parent = (ConfigItem *)parent(); | ||||||
|  | 
 | ||||||
|  | 		if(_parent) { | ||||||
|  | 			ret = (ConfigItem *)_parent->child(_parent->indexOfChild(this)+1); | ||||||
|  | 		} else { | ||||||
|  | 			QTreeWidget *_treeWidget = treeWidget(); | ||||||
|  | 			ret = (ConfigItem *)_treeWidget->topLevelItem(_treeWidget->indexOfTopLevelItem(this)+1); | ||||||
|  | 		} | ||||||
|  | 
 | ||||||
|  | 		return ret; | ||||||
| 	} | 	} | ||||||
| 	void setText(colIdx idx, const QString& text) | 	void setText(colIdx idx, const QString& text) | ||||||
| 	{ | 	{ | ||||||
| 		Parent::setText(listView()->mapIdx(idx), text); | 		Parent::setText(idx, text); | ||||||
| 	} | 	} | ||||||
| 	QString text(colIdx idx) const | 	QString text(colIdx idx) const | ||||||
| 	{ | 	{ | ||||||
| 		return Parent::text(listView()->mapIdx(idx)); | 		return Parent::text(idx); | ||||||
| 	} | 	} | ||||||
| 	void setPixmap(colIdx idx, const QPixmap& pm) | 	void setPixmap(colIdx idx, const QIcon &icon) | ||||||
| 	{ | 	{ | ||||||
| 		Parent::setPixmap(listView()->mapIdx(idx), pm); | 		Parent::setIcon(idx, icon); | ||||||
| 	} | 	} | ||||||
| 	const QPixmap* pixmap(colIdx idx) const | 	const QIcon pixmap(colIdx idx) const | ||||||
| 	{ | 	{ | ||||||
| 		return Parent::pixmap(listView()->mapIdx(idx)); | 		return icon(idx); | ||||||
| 	} | 	} | ||||||
| 	void paintCell(QPainter* p, const QColorGroup& cg, int column, int width, int align); | 	// TODO: Implement paintCell
 | ||||||
| 
 | 
 | ||||||
| 	ConfigItem* nextItem; | 	ConfigItem* nextItem; | ||||||
| 	struct menu *menu; | 	struct menu *menu; | ||||||
|  | @ -216,9 +205,9 @@ public: | ||||||
| 	ConfigItem *item; | 	ConfigItem *item; | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| class ConfigView : public Q3VBox { | class ConfigView : public QWidget { | ||||||
| 	Q_OBJECT | 	Q_OBJECT | ||||||
| 	typedef class Q3VBox Parent; | 	typedef class QWidget Parent; | ||||||
| public: | public: | ||||||
| 	ConfigView(QWidget* parent, const char *name = 0); | 	ConfigView(QWidget* parent, const char *name = 0); | ||||||
| 	~ConfigView(void); | 	~ConfigView(void); | ||||||
|  | @ -249,9 +238,9 @@ public: | ||||||
| 	static QAction *showPromptAction; | 	static QAction *showPromptAction; | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| class ConfigInfoView : public Q3TextBrowser { | class ConfigInfoView : public QTextBrowser { | ||||||
| 	Q_OBJECT | 	Q_OBJECT | ||||||
| 	typedef class Q3TextBrowser Parent; | 	typedef class QTextBrowser Parent; | ||||||
| public: | public: | ||||||
| 	ConfigInfoView(QWidget* parent, const char *name = 0); | 	ConfigInfoView(QWidget* parent, const char *name = 0); | ||||||
| 	bool showDebug(void) const { return _showDebug; } | 	bool showDebug(void) const { return _showDebug; } | ||||||
|  | @ -271,8 +260,8 @@ protected: | ||||||
| 	QString debug_info(struct symbol *sym); | 	QString debug_info(struct symbol *sym); | ||||||
| 	static QString print_filter(const QString &str); | 	static QString print_filter(const QString &str); | ||||||
| 	static void expr_print_help(void *data, struct symbol *sym, const char *str); | 	static void expr_print_help(void *data, struct symbol *sym, const char *str); | ||||||
| 	Q3PopupMenu* createPopupMenu(const QPoint& pos); | 	QMenu *createStandardContextMenu(const QPoint & pos); | ||||||
| 	void contentsContextMenuEvent(QContextMenuEvent *e); | 	void contextMenuEvent(QContextMenuEvent *e); | ||||||
| 
 | 
 | ||||||
| 	struct symbol *sym; | 	struct symbol *sym; | ||||||
| 	struct menu *_menu; | 	struct menu *_menu; | ||||||
|  | @ -299,10 +288,10 @@ protected: | ||||||
| 	struct symbol **result; | 	struct symbol **result; | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| class ConfigMainWindow : public Q3MainWindow { | class ConfigMainWindow : public QMainWindow { | ||||||
| 	Q_OBJECT | 	Q_OBJECT | ||||||
| 
 | 
 | ||||||
| 	static Q3Action *saveAction; | 	static QAction *saveAction; | ||||||
| 	static void conf_changed(void); | 	static void conf_changed(void); | ||||||
| public: | public: | ||||||
| 	ConfigMainWindow(void); | 	ConfigMainWindow(void); | ||||||
|  | @ -331,8 +320,11 @@ protected: | ||||||
| 	ConfigView *configView; | 	ConfigView *configView; | ||||||
| 	ConfigList *configList; | 	ConfigList *configList; | ||||||
| 	ConfigInfoView *helpText; | 	ConfigInfoView *helpText; | ||||||
| 	Q3ToolBar *toolBar; | 	QToolBar *toolBar; | ||||||
| 	Q3Action *backAction; | 	QAction *backAction; | ||||||
| 	QSplitter* split1; | 	QAction *singleViewAction; | ||||||
| 	QSplitter* split2; | 	QAction *splitViewAction; | ||||||
|  | 	QAction *fullViewAction; | ||||||
|  | 	QSplitter *split1; | ||||||
|  | 	QSplitter *split2; | ||||||
| }; | }; | ||||||
|  |  | ||||||
|  | @ -137,7 +137,7 @@ my $ksource = ($ARGV[0] ? $ARGV[0] : '.'); | ||||||
| my $kconfig = $ARGV[1]; | my $kconfig = $ARGV[1]; | ||||||
| my $lsmod_file = $ENV{'LSMOD'}; | my $lsmod_file = $ENV{'LSMOD'}; | ||||||
| 
 | 
 | ||||||
| my @makefiles = `find $ksource -name Makefile 2>/dev/null`; | my @makefiles = `find $ksource -name Makefile -or -name Kbuild 2>/dev/null`; | ||||||
| chomp @makefiles; | chomp @makefiles; | ||||||
| 
 | 
 | ||||||
| my %depends; | my %depends; | ||||||
|  | @ -188,7 +188,7 @@ sub read_kconfig { | ||||||
| 	$cont = 0; | 	$cont = 0; | ||||||
| 
 | 
 | ||||||
| 	# collect any Kconfig sources | 	# collect any Kconfig sources | ||||||
| 	if (/^source\s*"(.*)"/) { | 	if (/^source\s+"?([^"]+)/) { | ||||||
| 	    my $kconfig = $1; | 	    my $kconfig = $1; | ||||||
| 	    # prevent reading twice. | 	    # prevent reading twice. | ||||||
| 	    if (!defined($read_kconfigs{$kconfig})) { | 	    if (!defined($read_kconfigs{$kconfig})) { | ||||||
|  | @ -237,7 +237,7 @@ sub read_kconfig { | ||||||
| 	    } | 	    } | ||||||
| 
 | 
 | ||||||
| 	# configs without prompts must be selected | 	# configs without prompts must be selected | ||||||
| 	} elsif ($state ne "NONE" && /^\s*tristate\s\S/) { | 	} elsif ($state ne "NONE" && /^\s*(tristate\s+\S|prompt\b)/) { | ||||||
| 	    # note if the config has a prompt | 	    # note if the config has a prompt | ||||||
| 	    $prompts{$config} = 1; | 	    $prompts{$config} = 1; | ||||||
| 
 | 
 | ||||||
|  | @ -256,8 +256,8 @@ sub read_kconfig { | ||||||
| 
 | 
 | ||||||
| 	    $iflevel-- if ($iflevel); | 	    $iflevel-- if ($iflevel); | ||||||
| 
 | 
 | ||||||
| 	# stop on "help" | 	# stop on "help" and keywords that end a menu entry | ||||||
| 	} elsif (/^\s*help\s*$/) { | 	} elsif (/^\s*(---)?help(---)?\s*$/ || /^(comment|choice|menu)\b/) { | ||||||
| 	    $state = "NONE"; | 	    $state = "NONE"; | ||||||
| 	} | 	} | ||||||
|     } |     } | ||||||
|  | @ -454,7 +454,7 @@ sub parse_config_depends | ||||||
| 	    $p =~ s/^[^$valid]*[$valid]+//; | 	    $p =~ s/^[^$valid]*[$valid]+//; | ||||||
| 
 | 
 | ||||||
| 	    # We only need to process if the depend config is a module | 	    # We only need to process if the depend config is a module | ||||||
| 	    if (!defined($orig_configs{$conf}) || !$orig_configs{conf} eq "m") { | 	    if (!defined($orig_configs{$conf}) || $orig_configs{$conf} eq "y") { | ||||||
| 		next; | 		next; | ||||||
| 	    } | 	    } | ||||||
| 
 | 
 | ||||||
|  | @ -610,6 +610,40 @@ foreach my $line (@config_file) { | ||||||
| 	next; | 	next; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |     if (/CONFIG_MODULE_SIG_KEY="(.+)"/) { | ||||||
|  |         my $orig_cert = $1; | ||||||
|  |         my $default_cert = "certs/signing_key.pem"; | ||||||
|  | 
 | ||||||
|  |         # Check that the logic in this script still matches the one in Kconfig | ||||||
|  |         if (!defined($depends{"MODULE_SIG_KEY"}) || | ||||||
|  |             $depends{"MODULE_SIG_KEY"} !~ /"\Q$default_cert\E"/) { | ||||||
|  |             print STDERR "WARNING: MODULE_SIG_KEY assertion failure, ", | ||||||
|  |                 "update needed to ", __FILE__, " line ", __LINE__, "\n"; | ||||||
|  |             print; | ||||||
|  |         } elsif ($orig_cert ne $default_cert && ! -f $orig_cert) { | ||||||
|  |             print STDERR "Module signature verification enabled but ", | ||||||
|  |                 "module signing key \"$orig_cert\" not found. Resetting ", | ||||||
|  |                 "signing key to default value.\n"; | ||||||
|  |             print "CONFIG_MODULE_SIG_KEY=\"$default_cert\"\n"; | ||||||
|  |         } else { | ||||||
|  |             print; | ||||||
|  |         } | ||||||
|  |         next; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     if (/CONFIG_SYSTEM_TRUSTED_KEYS="(.+)"/) { | ||||||
|  |         my $orig_keys = $1; | ||||||
|  | 
 | ||||||
|  |         if (! -f $orig_keys) { | ||||||
|  |             print STDERR "System keyring enabled but keys \"$orig_keys\" ", | ||||||
|  |                 "not found. Resetting keys to default value.\n"; | ||||||
|  |             print "CONFIG_SYSTEM_TRUSTED_KEYS=\"\"\n"; | ||||||
|  |         } else { | ||||||
|  |             print; | ||||||
|  |         } | ||||||
|  |         next; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|     if (/^(CONFIG.*)=(m|y)/) { |     if (/^(CONFIG.*)=(m|y)/) { | ||||||
| 	if (defined($configs{$1})) { | 	if (defined($configs{$1})) { | ||||||
| 	    if ($localyesconfig) { | 	    if ($localyesconfig) { | ||||||
|  |  | ||||||
|  | @ -209,12 +209,26 @@ static void sym_set_all_changed(void) | ||||||
| static void sym_calc_visibility(struct symbol *sym) | static void sym_calc_visibility(struct symbol *sym) | ||||||
| { | { | ||||||
| 	struct property *prop; | 	struct property *prop; | ||||||
|  | 	struct symbol *choice_sym = NULL; | ||||||
| 	tristate tri; | 	tristate tri; | ||||||
| 
 | 
 | ||||||
| 	/* any prompt visible? */ | 	/* any prompt visible? */ | ||||||
| 	tri = no; | 	tri = no; | ||||||
|  | 
 | ||||||
|  | 	if (sym_is_choice_value(sym)) | ||||||
|  | 		choice_sym = prop_get_symbol(sym_get_choice_prop(sym)); | ||||||
|  | 
 | ||||||
| 	for_all_prompts(sym, prop) { | 	for_all_prompts(sym, prop) { | ||||||
| 		prop->visible.tri = expr_calc_value(prop->visible.expr); | 		prop->visible.tri = expr_calc_value(prop->visible.expr); | ||||||
|  | 		/*
 | ||||||
|  | 		 * Tristate choice_values with visibility 'mod' are | ||||||
|  | 		 * not visible if the corresponding choice's value is | ||||||
|  | 		 * 'yes'. | ||||||
|  | 		 */ | ||||||
|  | 		if (choice_sym && sym->type == S_TRISTATE && | ||||||
|  | 		    prop->visible.tri == mod && choice_sym->curr.tri == yes) | ||||||
|  | 			prop->visible.tri = no; | ||||||
|  | 
 | ||||||
| 		tri = EXPR_OR(tri, prop->visible.tri); | 		tri = EXPR_OR(tri, prop->visible.tri); | ||||||
| 	} | 	} | ||||||
| 	if (tri == mod && (sym->type != S_TRISTATE || modules_val == no)) | 	if (tri == mod && (sym->type != S_TRISTATE || modules_val == no)) | ||||||
|  | @ -244,6 +258,15 @@ static void sym_calc_visibility(struct symbol *sym) | ||||||
| 		sym->rev_dep.tri = tri; | 		sym->rev_dep.tri = tri; | ||||||
| 		sym_set_changed(sym); | 		sym_set_changed(sym); | ||||||
| 	} | 	} | ||||||
|  | 	tri = no; | ||||||
|  | 	if (sym->implied.expr && sym->dir_dep.tri != no) | ||||||
|  | 		tri = expr_calc_value(sym->implied.expr); | ||||||
|  | 	if (tri == mod && sym_get_type(sym) == S_BOOLEAN) | ||||||
|  | 		tri = yes; | ||||||
|  | 	if (sym->implied.tri != tri) { | ||||||
|  | 		sym->implied.tri = tri; | ||||||
|  | 		sym_set_changed(sym); | ||||||
|  | 	} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| /*
 | /*
 | ||||||
|  | @ -383,6 +406,10 @@ void sym_calc_value(struct symbol *sym) | ||||||
| 					newval.tri = EXPR_AND(expr_calc_value(prop->expr), | 					newval.tri = EXPR_AND(expr_calc_value(prop->expr), | ||||||
| 							      prop->visible.tri); | 							      prop->visible.tri); | ||||||
| 				} | 				} | ||||||
|  | 				if (sym->implied.tri != no) { | ||||||
|  | 					sym->flags |= SYMBOL_WRITE; | ||||||
|  | 					newval.tri = EXPR_OR(newval.tri, sym->implied.tri); | ||||||
|  | 				} | ||||||
| 			} | 			} | ||||||
| 		calc_newval: | 		calc_newval: | ||||||
| 			if (sym->dir_dep.tri == no && sym->rev_dep.tri != no) { | 			if (sym->dir_dep.tri == no && sym->rev_dep.tri != no) { | ||||||
|  | @ -399,7 +426,8 @@ void sym_calc_value(struct symbol *sym) | ||||||
| 			} | 			} | ||||||
| 			newval.tri = EXPR_OR(newval.tri, sym->rev_dep.tri); | 			newval.tri = EXPR_OR(newval.tri, sym->rev_dep.tri); | ||||||
| 		} | 		} | ||||||
| 		if (newval.tri == mod && sym_get_type(sym) == S_BOOLEAN) | 		if (newval.tri == mod && | ||||||
|  | 		    (sym_get_type(sym) == S_BOOLEAN || sym->implied.tri == yes)) | ||||||
| 			newval.tri = yes; | 			newval.tri = yes; | ||||||
| 		break; | 		break; | ||||||
| 	case S_STRING: | 	case S_STRING: | ||||||
|  | @ -467,7 +495,6 @@ void sym_clear_all_valid(void) | ||||||
| 	for_all_symbols(i, sym) | 	for_all_symbols(i, sym) | ||||||
| 		sym->flags &= ~SYMBOL_VALID; | 		sym->flags &= ~SYMBOL_VALID; | ||||||
| 	sym_add_change_count(1); | 	sym_add_change_count(1); | ||||||
| 	if (modules_sym) |  | ||||||
| 	sym_calc_value(modules_sym); | 	sym_calc_value(modules_sym); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | @ -485,6 +512,8 @@ bool sym_tristate_within_range(struct symbol *sym, tristate val) | ||||||
| 		return false; | 		return false; | ||||||
| 	if (sym->visible <= sym->rev_dep.tri) | 	if (sym->visible <= sym->rev_dep.tri) | ||||||
| 		return false; | 		return false; | ||||||
|  | 	if (sym->implied.tri == yes && val == mod) | ||||||
|  | 		return false; | ||||||
| 	if (sym_is_choice_value(sym) && sym->visible == yes) | 	if (sym_is_choice_value(sym) && sym->visible == yes) | ||||||
| 		return val == yes; | 		return val == yes; | ||||||
| 	return val >= sym->rev_dep.tri && val <= sym->visible; | 	return val >= sym->rev_dep.tri && val <= sym->visible; | ||||||
|  | @ -737,6 +766,10 @@ const char *sym_get_string_default(struct symbol *sym) | ||||||
| 	if (sym->type == S_BOOLEAN && val == mod) | 	if (sym->type == S_BOOLEAN && val == mod) | ||||||
| 		val = yes; | 		val = yes; | ||||||
| 
 | 
 | ||||||
|  | 	/* adjust the default value if this symbol is implied by another */ | ||||||
|  | 	if (val < sym->implied.tri) | ||||||
|  | 		val = sym->implied.tri; | ||||||
|  | 
 | ||||||
| 	switch (sym->type) { | 	switch (sym->type) { | ||||||
| 	case S_BOOLEAN: | 	case S_BOOLEAN: | ||||||
| 	case S_TRISTATE: | 	case S_TRISTATE: | ||||||
|  | @ -912,6 +945,49 @@ const char *sym_expand_string_value(const char *in) | ||||||
| 	return res; | 	return res; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | const char *sym_escape_string_value(const char *in) | ||||||
|  | { | ||||||
|  | 	const char *p; | ||||||
|  | 	size_t reslen; | ||||||
|  | 	char *res; | ||||||
|  | 	size_t l; | ||||||
|  | 
 | ||||||
|  | 	reslen = strlen(in) + strlen("\"\"") + 1; | ||||||
|  | 
 | ||||||
|  | 	p = in; | ||||||
|  | 	for (;;) { | ||||||
|  | 		l = strcspn(p, "\"\\"); | ||||||
|  | 		p += l; | ||||||
|  | 
 | ||||||
|  | 		if (p[0] == '\0') | ||||||
|  | 			break; | ||||||
|  | 
 | ||||||
|  | 		reslen++; | ||||||
|  | 		p++; | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	res = xmalloc(reslen); | ||||||
|  | 	res[0] = '\0'; | ||||||
|  | 
 | ||||||
|  | 	strcat(res, "\""); | ||||||
|  | 
 | ||||||
|  | 	p = in; | ||||||
|  | 	for (;;) { | ||||||
|  | 		l = strcspn(p, "\"\\"); | ||||||
|  | 		strncat(res, p, l); | ||||||
|  | 		p += l; | ||||||
|  | 
 | ||||||
|  | 		if (p[0] == '\0') | ||||||
|  | 			break; | ||||||
|  | 
 | ||||||
|  | 		strcat(res, "\\"); | ||||||
|  | 		strncat(res, p++, 1); | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	strcat(res, "\""); | ||||||
|  | 	return res; | ||||||
|  | } | ||||||
|  | 
 | ||||||
| struct sym_match { | struct sym_match { | ||||||
| 	struct symbol	*sym; | 	struct symbol	*sym; | ||||||
| 	off_t		so, eo; | 	off_t		so, eo; | ||||||
|  | @ -1074,6 +1150,8 @@ static void sym_check_print_recursive(struct symbol *last_sym) | ||||||
| 		if (stack->sym == last_sym) | 		if (stack->sym == last_sym) | ||||||
| 			fprintf(stderr, "%s:%d:error: recursive dependency detected!\n", | 			fprintf(stderr, "%s:%d:error: recursive dependency detected!\n", | ||||||
| 				prop->file->name, prop->lineno); | 				prop->file->name, prop->lineno); | ||||||
|  | 			fprintf(stderr, "For a resolution refer to Documentation/kbuild/kconfig-language.txt\n"); | ||||||
|  | 			fprintf(stderr, "subsection \"Kconfig recursive dependency limitations\"\n"); | ||||||
| 		if (stack->expr) { | 		if (stack->expr) { | ||||||
| 			fprintf(stderr, "%s:%d:\tsymbol %s %s value contains %s\n", | 			fprintf(stderr, "%s:%d:\tsymbol %s %s value contains %s\n", | ||||||
| 				prop->file->name, prop->lineno, | 				prop->file->name, prop->lineno, | ||||||
|  | @ -1123,6 +1201,10 @@ static struct symbol *sym_check_expr_deps(struct expr *e) | ||||||
| 	case E_NOT: | 	case E_NOT: | ||||||
| 		return sym_check_expr_deps(e->left.expr); | 		return sym_check_expr_deps(e->left.expr); | ||||||
| 	case E_EQUAL: | 	case E_EQUAL: | ||||||
|  | 	case E_GEQ: | ||||||
|  | 	case E_GTH: | ||||||
|  | 	case E_LEQ: | ||||||
|  | 	case E_LTH: | ||||||
| 	case E_UNEQUAL: | 	case E_UNEQUAL: | ||||||
| 		sym = sym_check_deps(e->left.sym); | 		sym = sym_check_deps(e->left.sym); | ||||||
| 		if (sym) | 		if (sym) | ||||||
|  | @ -1290,6 +1372,8 @@ const char *prop_get_type_name(enum prop_type type) | ||||||
| 		return "choice"; | 		return "choice"; | ||||||
| 	case P_SELECT: | 	case P_SELECT: | ||||||
| 		return "select"; | 		return "select"; | ||||||
|  | 	case P_IMPLY: | ||||||
|  | 		return "imply"; | ||||||
| 	case P_RANGE: | 	case P_RANGE: | ||||||
| 		return "range"; | 		return "range"; | ||||||
| 	case P_SYMBOL: | 	case P_SYMBOL: | ||||||
|  |  | ||||||
|  | @ -22,6 +22,7 @@ comment,	T_COMMENT,	TF_COMMAND | ||||||
| config,		T_CONFIG,	TF_COMMAND | config,		T_CONFIG,	TF_COMMAND | ||||||
| menuconfig,	T_MENUCONFIG,	TF_COMMAND | menuconfig,	T_MENUCONFIG,	TF_COMMAND | ||||||
| help,		T_HELP,		TF_COMMAND | help,		T_HELP,		TF_COMMAND | ||||||
|  | ---help---,	T_HELP,		TF_COMMAND | ||||||
| if,		T_IF,		TF_COMMAND|TF_PARAM | if,		T_IF,		TF_COMMAND|TF_PARAM | ||||||
| endif,		T_ENDIF,	TF_COMMAND | endif,		T_ENDIF,	TF_COMMAND | ||||||
| depends,	T_DEPENDS,	TF_COMMAND | depends,	T_DEPENDS,	TF_COMMAND | ||||||
|  | @ -37,6 +38,7 @@ int,		T_TYPE,		TF_COMMAND, S_INT | ||||||
| hex,		T_TYPE,		TF_COMMAND, S_HEX | hex,		T_TYPE,		TF_COMMAND, S_HEX | ||||||
| string,		T_TYPE,		TF_COMMAND, S_STRING | string,		T_TYPE,		TF_COMMAND, S_STRING | ||||||
| select,		T_SELECT,	TF_COMMAND | select,		T_SELECT,	TF_COMMAND | ||||||
|  | imply,		T_IMPLY,	TF_COMMAND | ||||||
| range,		T_RANGE,	TF_COMMAND | range,		T_RANGE,	TF_COMMAND | ||||||
| visible,	T_VISIBLE,	TF_COMMAND | visible,	T_VISIBLE,	TF_COMMAND | ||||||
| option,		T_OPTION,	TF_COMMAND | option,		T_OPTION,	TF_COMMAND | ||||||
|  |  | ||||||
|  | @ -50,15 +50,15 @@ kconf_id_hash (register const char *str, register unsigned int len) | ||||||
|       73, 73, 73, 73, 73, 73, 73, 73, 73, 73, |       73, 73, 73, 73, 73, 73, 73, 73, 73, 73, | ||||||
|       73, 73, 73, 73, 73, 73, 73, 73, 73, 73, |       73, 73, 73, 73, 73, 73, 73, 73, 73, 73, | ||||||
|       73, 73, 73, 73, 73, 73, 73, 73, 73, 73, |       73, 73, 73, 73, 73, 73, 73, 73, 73, 73, | ||||||
|  |       73, 73, 73, 73, 73,  0, 73, 73, 73, 73, | ||||||
|       73, 73, 73, 73, 73, 73, 73, 73, 73, 73, |       73, 73, 73, 73, 73, 73, 73, 73, 73, 73, | ||||||
|       73, 73, 73, 73, 73, 73, 73, 73, 73, 73, |       73, 73, 73, 73, 73, 73, 73, 73, 73, 73, | ||||||
|       73, 73, 73, 73, 73, 73, 73, 73, 73, 73, |       73, 73, 73, 73, 73, 73, 73, 73, 73, 73, | ||||||
|       73, 73, 73, 73, 73, 73, 73, 73, 73, 73, |       73, 73, 73, 73, 73, 73, 73, 73, 73, 73, | ||||||
|       73, 73, 73, 73, 73, 73, 73, 73, 73, 73, |       73, 73, 73, 73, 73, 73, 73, 10, 25, 25, | ||||||
|       73, 73, 73, 73, 73, 73, 73,  5, 25, 25, |  | ||||||
|        0,  0,  0,  5,  0,  0, 73, 73,  5,  0, |        0,  0,  0,  5,  0,  0, 73, 73,  5,  0, | ||||||
|       10,  5, 45, 73, 20, 20,  0, 15, 15, 73, |       10,  5, 45, 73, 20, 20,  0, 15, 15, 73, | ||||||
|       20,  5, 73, 73, 73, 73, 73, 73, 73, 73, |       20,  0, 73, 73, 73, 73, 73, 73, 73, 73, | ||||||
|       73, 73, 73, 73, 73, 73, 73, 73, 73, 73, |       73, 73, 73, 73, 73, 73, 73, 73, 73, 73, | ||||||
|       73, 73, 73, 73, 73, 73, 73, 73, 73, 73, |       73, 73, 73, 73, 73, 73, 73, 73, 73, 73, | ||||||
|       73, 73, 73, 73, 73, 73, 73, 73, 73, 73, |       73, 73, 73, 73, 73, 73, 73, 73, 73, 73, | ||||||
|  | @ -96,6 +96,7 @@ struct kconf_id_strings_t | ||||||
|     char kconf_id_strings_str7[sizeof("default")]; |     char kconf_id_strings_str7[sizeof("default")]; | ||||||
|     char kconf_id_strings_str8[sizeof("tristate")]; |     char kconf_id_strings_str8[sizeof("tristate")]; | ||||||
|     char kconf_id_strings_str9[sizeof("endchoice")]; |     char kconf_id_strings_str9[sizeof("endchoice")]; | ||||||
|  |     char kconf_id_strings_str10[sizeof("---help---")]; | ||||||
|     char kconf_id_strings_str12[sizeof("def_tristate")]; |     char kconf_id_strings_str12[sizeof("def_tristate")]; | ||||||
|     char kconf_id_strings_str13[sizeof("def_bool")]; |     char kconf_id_strings_str13[sizeof("def_bool")]; | ||||||
|     char kconf_id_strings_str14[sizeof("defconfig_list")]; |     char kconf_id_strings_str14[sizeof("defconfig_list")]; | ||||||
|  | @ -119,6 +120,7 @@ struct kconf_id_strings_t | ||||||
|     char kconf_id_strings_str43[sizeof("hex")]; |     char kconf_id_strings_str43[sizeof("hex")]; | ||||||
|     char kconf_id_strings_str46[sizeof("config")]; |     char kconf_id_strings_str46[sizeof("config")]; | ||||||
|     char kconf_id_strings_str47[sizeof("boolean")]; |     char kconf_id_strings_str47[sizeof("boolean")]; | ||||||
|  |     char kconf_id_strings_str50[sizeof("imply")]; | ||||||
|     char kconf_id_strings_str51[sizeof("string")]; |     char kconf_id_strings_str51[sizeof("string")]; | ||||||
|     char kconf_id_strings_str54[sizeof("help")]; |     char kconf_id_strings_str54[sizeof("help")]; | ||||||
|     char kconf_id_strings_str56[sizeof("prompt")]; |     char kconf_id_strings_str56[sizeof("prompt")]; | ||||||
|  | @ -132,6 +134,7 @@ static const struct kconf_id_strings_t kconf_id_strings_contents = | ||||||
|     "default", |     "default", | ||||||
|     "tristate", |     "tristate", | ||||||
|     "endchoice", |     "endchoice", | ||||||
|  |     "---help---", | ||||||
|     "def_tristate", |     "def_tristate", | ||||||
|     "def_bool", |     "def_bool", | ||||||
|     "defconfig_list", |     "defconfig_list", | ||||||
|  | @ -155,6 +158,7 @@ static const struct kconf_id_strings_t kconf_id_strings_contents = | ||||||
|     "hex", |     "hex", | ||||||
|     "config", |     "config", | ||||||
|     "boolean", |     "boolean", | ||||||
|  |     "imply", | ||||||
|     "string", |     "string", | ||||||
|     "help", |     "help", | ||||||
|     "prompt", |     "prompt", | ||||||
|  | @ -172,7 +176,7 @@ kconf_id_lookup (register const char *str, register unsigned int len) | ||||||
| { | { | ||||||
|   enum |   enum | ||||||
|     { |     { | ||||||
|       TOTAL_KEYWORDS = 33, |       TOTAL_KEYWORDS = 35, | ||||||
|       MIN_WORD_LENGTH = 2, |       MIN_WORD_LENGTH = 2, | ||||||
|       MAX_WORD_LENGTH = 14, |       MAX_WORD_LENGTH = 14, | ||||||
|       MIN_HASH_VALUE = 2, |       MIN_HASH_VALUE = 2, | ||||||
|  | @ -182,34 +186,36 @@ kconf_id_lookup (register const char *str, register unsigned int len) | ||||||
|   static const struct kconf_id wordlist[] = |   static const struct kconf_id wordlist[] = | ||||||
|     { |     { | ||||||
|       {-1}, {-1}, |       {-1}, {-1}, | ||||||
| #line 25 "scripts/kconfig/zconf.gperf" | #line 26 "scripts/kconfig/zconf.gperf" | ||||||
|       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str2,		T_IF,		TF_COMMAND|TF_PARAM}, |       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str2,		T_IF,		TF_COMMAND|TF_PARAM}, | ||||||
| #line 36 "scripts/kconfig/zconf.gperf" | #line 37 "scripts/kconfig/zconf.gperf" | ||||||
|       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str3,		T_TYPE,		TF_COMMAND, S_INT}, |       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str3,		T_TYPE,		TF_COMMAND, S_INT}, | ||||||
|       {-1}, |       {-1}, | ||||||
| #line 26 "scripts/kconfig/zconf.gperf" | #line 27 "scripts/kconfig/zconf.gperf" | ||||||
|       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str5,		T_ENDIF,	TF_COMMAND}, |       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str5,		T_ENDIF,	TF_COMMAND}, | ||||||
|       {-1}, |       {-1}, | ||||||
| #line 29 "scripts/kconfig/zconf.gperf" | #line 30 "scripts/kconfig/zconf.gperf" | ||||||
|       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str7,	T_DEFAULT,	TF_COMMAND, S_UNKNOWN}, |       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str7,	T_DEFAULT,	TF_COMMAND, S_UNKNOWN}, | ||||||
| #line 31 "scripts/kconfig/zconf.gperf" | #line 32 "scripts/kconfig/zconf.gperf" | ||||||
|       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str8,	T_TYPE,		TF_COMMAND, S_TRISTATE}, |       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str8,	T_TYPE,		TF_COMMAND, S_TRISTATE}, | ||||||
| #line 20 "scripts/kconfig/zconf.gperf" | #line 20 "scripts/kconfig/zconf.gperf" | ||||||
|       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str9,	T_ENDCHOICE,	TF_COMMAND}, |       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str9,	T_ENDCHOICE,	TF_COMMAND}, | ||||||
|       {-1}, {-1}, | #line 25 "scripts/kconfig/zconf.gperf" | ||||||
| #line 32 "scripts/kconfig/zconf.gperf" |       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str10,	T_HELP,		TF_COMMAND}, | ||||||
|  |       {-1}, | ||||||
|  | #line 33 "scripts/kconfig/zconf.gperf" | ||||||
|       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str12,	T_DEFAULT,	TF_COMMAND, S_TRISTATE}, |       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str12,	T_DEFAULT,	TF_COMMAND, S_TRISTATE}, | ||||||
| #line 35 "scripts/kconfig/zconf.gperf" | #line 36 "scripts/kconfig/zconf.gperf" | ||||||
|       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str13,	T_DEFAULT,	TF_COMMAND, S_BOOLEAN}, |       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str13,	T_DEFAULT,	TF_COMMAND, S_BOOLEAN}, | ||||||
| #line 45 "scripts/kconfig/zconf.gperf" | #line 47 "scripts/kconfig/zconf.gperf" | ||||||
|       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str14,	T_OPT_DEFCONFIG_LIST,TF_OPTION}, |       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str14,	T_OPT_DEFCONFIG_LIST,TF_OPTION}, | ||||||
|       {-1}, {-1}, |       {-1}, {-1}, | ||||||
| #line 43 "scripts/kconfig/zconf.gperf" | #line 45 "scripts/kconfig/zconf.gperf" | ||||||
|       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str17,		T_ON,		TF_PARAM}, |       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str17,		T_ON,		TF_PARAM}, | ||||||
| #line 28 "scripts/kconfig/zconf.gperf" | #line 29 "scripts/kconfig/zconf.gperf" | ||||||
|       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str18,	T_OPTIONAL,	TF_COMMAND}, |       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str18,	T_OPTIONAL,	TF_COMMAND}, | ||||||
|       {-1}, {-1}, |       {-1}, {-1}, | ||||||
| #line 42 "scripts/kconfig/zconf.gperf" | #line 44 "scripts/kconfig/zconf.gperf" | ||||||
|       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str21,		T_OPTION,	TF_COMMAND}, |       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str21,		T_OPTION,	TF_COMMAND}, | ||||||
| #line 17 "scripts/kconfig/zconf.gperf" | #line 17 "scripts/kconfig/zconf.gperf" | ||||||
|       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str22,	T_ENDMENU,	TF_COMMAND}, |       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str22,	T_ENDMENU,	TF_COMMAND}, | ||||||
|  | @ -219,51 +225,53 @@ kconf_id_lookup (register const char *str, register unsigned int len) | ||||||
| #line 23 "scripts/kconfig/zconf.gperf" | #line 23 "scripts/kconfig/zconf.gperf" | ||||||
|       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str25,	T_MENUCONFIG,	TF_COMMAND}, |       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str25,	T_MENUCONFIG,	TF_COMMAND}, | ||||||
|       {-1}, |       {-1}, | ||||||
| #line 44 "scripts/kconfig/zconf.gperf" | #line 46 "scripts/kconfig/zconf.gperf" | ||||||
|       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str27,	T_OPT_MODULES,	TF_OPTION}, |       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str27,	T_OPT_MODULES,	TF_OPTION}, | ||||||
| #line 47 "scripts/kconfig/zconf.gperf" | #line 49 "scripts/kconfig/zconf.gperf" | ||||||
|       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str28,	T_OPT_ALLNOCONFIG_Y,TF_OPTION}, |       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str28,	T_OPT_ALLNOCONFIG_Y,TF_OPTION}, | ||||||
| #line 16 "scripts/kconfig/zconf.gperf" | #line 16 "scripts/kconfig/zconf.gperf" | ||||||
|       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str29,		T_MENU,		TF_COMMAND}, |       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str29,		T_MENU,		TF_COMMAND}, | ||||||
|       {-1}, |       {-1}, | ||||||
| #line 39 "scripts/kconfig/zconf.gperf" | #line 40 "scripts/kconfig/zconf.gperf" | ||||||
|       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str31,		T_SELECT,	TF_COMMAND}, |       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str31,		T_SELECT,	TF_COMMAND}, | ||||||
| #line 21 "scripts/kconfig/zconf.gperf" | #line 21 "scripts/kconfig/zconf.gperf" | ||||||
|       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str32,	T_COMMENT,	TF_COMMAND}, |       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str32,	T_COMMENT,	TF_COMMAND}, | ||||||
| #line 46 "scripts/kconfig/zconf.gperf" | #line 48 "scripts/kconfig/zconf.gperf" | ||||||
|       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str33,		T_OPT_ENV,	TF_OPTION}, |       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str33,		T_OPT_ENV,	TF_OPTION}, | ||||||
|       {-1}, |       {-1}, | ||||||
| #line 40 "scripts/kconfig/zconf.gperf" | #line 42 "scripts/kconfig/zconf.gperf" | ||||||
|       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str35,		T_RANGE,	TF_COMMAND}, |       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str35,		T_RANGE,	TF_COMMAND}, | ||||||
| #line 19 "scripts/kconfig/zconf.gperf" | #line 19 "scripts/kconfig/zconf.gperf" | ||||||
|       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str36,		T_CHOICE,	TF_COMMAND}, |       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str36,		T_CHOICE,	TF_COMMAND}, | ||||||
|       {-1}, {-1}, |       {-1}, {-1}, | ||||||
| #line 33 "scripts/kconfig/zconf.gperf" | #line 34 "scripts/kconfig/zconf.gperf" | ||||||
|       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str39,		T_TYPE,		TF_COMMAND, S_BOOLEAN}, |       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str39,		T_TYPE,		TF_COMMAND, S_BOOLEAN}, | ||||||
|       {-1}, |       {-1}, | ||||||
| #line 18 "scripts/kconfig/zconf.gperf" | #line 18 "scripts/kconfig/zconf.gperf" | ||||||
|       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str41,		T_SOURCE,	TF_COMMAND}, |       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str41,		T_SOURCE,	TF_COMMAND}, | ||||||
| #line 41 "scripts/kconfig/zconf.gperf" | #line 43 "scripts/kconfig/zconf.gperf" | ||||||
|       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str42,	T_VISIBLE,	TF_COMMAND}, |       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str42,	T_VISIBLE,	TF_COMMAND}, | ||||||
| #line 37 "scripts/kconfig/zconf.gperf" | #line 38 "scripts/kconfig/zconf.gperf" | ||||||
|       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str43,		T_TYPE,		TF_COMMAND, S_HEX}, |       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str43,		T_TYPE,		TF_COMMAND, S_HEX}, | ||||||
|       {-1}, {-1}, |       {-1}, {-1}, | ||||||
| #line 22 "scripts/kconfig/zconf.gperf" | #line 22 "scripts/kconfig/zconf.gperf" | ||||||
|       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str46,		T_CONFIG,	TF_COMMAND}, |       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str46,		T_CONFIG,	TF_COMMAND}, | ||||||
| #line 34 "scripts/kconfig/zconf.gperf" | #line 35 "scripts/kconfig/zconf.gperf" | ||||||
|       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str47,	T_TYPE,		TF_COMMAND, S_BOOLEAN}, |       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str47,	T_TYPE,		TF_COMMAND, S_BOOLEAN}, | ||||||
|       {-1}, {-1}, {-1}, |       {-1}, {-1}, | ||||||
| #line 38 "scripts/kconfig/zconf.gperf" | #line 41 "scripts/kconfig/zconf.gperf" | ||||||
|  |       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str50,		T_IMPLY,	TF_COMMAND}, | ||||||
|  | #line 39 "scripts/kconfig/zconf.gperf" | ||||||
|       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str51,		T_TYPE,		TF_COMMAND, S_STRING}, |       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str51,		T_TYPE,		TF_COMMAND, S_STRING}, | ||||||
|       {-1}, {-1}, |       {-1}, {-1}, | ||||||
| #line 24 "scripts/kconfig/zconf.gperf" | #line 24 "scripts/kconfig/zconf.gperf" | ||||||
|       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str54,		T_HELP,		TF_COMMAND}, |       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str54,		T_HELP,		TF_COMMAND}, | ||||||
|       {-1}, |       {-1}, | ||||||
| #line 30 "scripts/kconfig/zconf.gperf" | #line 31 "scripts/kconfig/zconf.gperf" | ||||||
|       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str56,		T_PROMPT,	TF_COMMAND}, |       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str56,		T_PROMPT,	TF_COMMAND}, | ||||||
|       {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, |       {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, | ||||||
|       {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, |       {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, | ||||||
| #line 27 "scripts/kconfig/zconf.gperf" | #line 28 "scripts/kconfig/zconf.gperf" | ||||||
|       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str72,	T_DEPENDS,	TF_COMMAND} |       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str72,	T_DEPENDS,	TF_COMMAND} | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|  | @ -285,5 +293,5 @@ kconf_id_lookup (register const char *str, register unsigned int len) | ||||||
|     } |     } | ||||||
|   return 0; |   return 0; | ||||||
| } | } | ||||||
| #line 48 "scripts/kconfig/zconf.gperf" | #line 50 "scripts/kconfig/zconf.gperf" | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -66,9 +66,16 @@ static void alloc_string(const char *str, int size) | ||||||
| 	memcpy(text, str, size); | 	memcpy(text, str, size); | ||||||
| 	text[size] = 0; | 	text[size] = 0; | ||||||
| } | } | ||||||
|  | 
 | ||||||
|  | static void warn_ignored_character(char chr) | ||||||
|  | { | ||||||
|  | 	fprintf(stderr, | ||||||
|  | 	        "%s:%d:warning: ignoring unsupported character '%c'\n", | ||||||
|  | 	        zconf_curname(), zconf_lineno(), chr); | ||||||
|  | } | ||||||
| %} | %} | ||||||
| 
 | 
 | ||||||
| n	[A-Za-z0-9_] | n	[A-Za-z0-9_-] | ||||||
| 
 | 
 | ||||||
| %% | %% | ||||||
| 	int str = 0; | 	int str = 0; | ||||||
|  | @ -106,7 +113,7 @@ n	[A-Za-z0-9_] | ||||||
| 		zconflval.string = text; | 		zconflval.string = text; | ||||||
| 		return T_WORD; | 		return T_WORD; | ||||||
| 	} | 	} | ||||||
| 	. | 	.	warn_ignored_character(*yytext); | ||||||
| 	\n	{ | 	\n	{ | ||||||
| 		BEGIN(INITIAL); | 		BEGIN(INITIAL); | ||||||
| 		current_file->lineno++; | 		current_file->lineno++; | ||||||
|  | @ -122,14 +129,17 @@ n	[A-Za-z0-9_] | ||||||
| 	"!"	return T_NOT; | 	"!"	return T_NOT; | ||||||
| 	"="	return T_EQUAL; | 	"="	return T_EQUAL; | ||||||
| 	"!="	return T_UNEQUAL; | 	"!="	return T_UNEQUAL; | ||||||
|  | 	"<="	return T_LESS_EQUAL; | ||||||
|  | 	">="	return T_GREATER_EQUAL; | ||||||
|  | 	"<"	return T_LESS; | ||||||
|  | 	">"	return T_GREATER; | ||||||
| 	\"|\'	{ | 	\"|\'	{ | ||||||
| 		str = yytext[0]; | 		str = yytext[0]; | ||||||
| 		new_string(); | 		new_string(); | ||||||
| 		BEGIN(STRING); | 		BEGIN(STRING); | ||||||
| 	} | 	} | ||||||
| 	\n	BEGIN(INITIAL); current_file->lineno++; return T_EOL; | 	\n	BEGIN(INITIAL); current_file->lineno++; return T_EOL; | ||||||
| 	---	/* ignore */ | 	({n}|[/.])+	{ | ||||||
| 	({n}|[-/.])+	{ |  | ||||||
| 		const struct kconf_id *id = kconf_id_lookup(yytext, yyleng); | 		const struct kconf_id *id = kconf_id_lookup(yytext, yyleng); | ||||||
| 		if (id && id->flags & TF_PARAM) { | 		if (id && id->flags & TF_PARAM) { | ||||||
| 			zconflval.id = id; | 			zconflval.id = id; | ||||||
|  | @ -141,7 +151,8 @@ n	[A-Za-z0-9_] | ||||||
| 	} | 	} | ||||||
| 	#.*	/* comment */ | 	#.*	/* comment */ | ||||||
| 	\\\n	current_file->lineno++; | 	\\\n	current_file->lineno++; | ||||||
| 	. | 	[[:blank:]]+ | ||||||
|  | 	.	warn_ignored_character(*yytext); | ||||||
| 	<<EOF>> { | 	<<EOF>> { | ||||||
| 		BEGIN(INITIAL); | 		BEGIN(INITIAL); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  | @ -72,7 +72,6 @@ typedef int flex_int32_t; | ||||||
| typedef unsigned char flex_uint8_t;  | typedef unsigned char flex_uint8_t;  | ||||||
| typedef unsigned short int flex_uint16_t; | typedef unsigned short int flex_uint16_t; | ||||||
| typedef unsigned int flex_uint32_t; | typedef unsigned int flex_uint32_t; | ||||||
| #endif /* ! C99 */ |  | ||||||
| 
 | 
 | ||||||
| /* Limits of integral types. */ | /* Limits of integral types. */ | ||||||
| #ifndef INT8_MIN | #ifndef INT8_MIN | ||||||
|  | @ -103,6 +102,8 @@ typedef unsigned int flex_uint32_t; | ||||||
| #define UINT32_MAX             (4294967295U) | #define UINT32_MAX             (4294967295U) | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
|  | #endif /* ! C99 */ | ||||||
|  | 
 | ||||||
| #endif /* ! FLEXINT_H */ | #endif /* ! FLEXINT_H */ | ||||||
| 
 | 
 | ||||||
| #ifdef __cplusplus | #ifdef __cplusplus | ||||||
|  | @ -159,7 +160,15 @@ typedef unsigned int flex_uint32_t; | ||||||
| 
 | 
 | ||||||
| /* Size of default input buffer. */ | /* Size of default input buffer. */ | ||||||
| #ifndef YY_BUF_SIZE | #ifndef YY_BUF_SIZE | ||||||
|  | #ifdef __ia64__ | ||||||
|  | /* On IA-64, the buffer size is 16k, not 8k. | ||||||
|  |  * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. | ||||||
|  |  * Ditto for the __ia64__ case accordingly. | ||||||
|  |  */ | ||||||
|  | #define YY_BUF_SIZE 32768 | ||||||
|  | #else | ||||||
| #define YY_BUF_SIZE 16384 | #define YY_BUF_SIZE 16384 | ||||||
|  | #endif /* __ia64__ */ | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| /* The state buf must be large enough to hold one state per character in the main buffer. | /* The state buf must be large enough to hold one state per character in the main buffer. | ||||||
|  | @ -365,323 +374,338 @@ int zconflineno = 1; | ||||||
| 
 | 
 | ||||||
| extern char *zconftext; | extern char *zconftext; | ||||||
| #define yytext_ptr zconftext | #define yytext_ptr zconftext | ||||||
| static yyconst flex_int16_t yy_nxt[][17] = | static yyconst flex_int16_t yy_nxt[][18] = | ||||||
|     { |     { | ||||||
|     { |     { | ||||||
|         0,    0,    0,    0,    0,    0,    0,    0,    0,    0, |         0,    0,    0,    0,    0,    0,    0,    0,    0,    0, | ||||||
|         0,    0,    0,    0,    0,    0,    0 |         0,    0,    0,    0,    0,    0,    0,    0 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,   12,   13,   14,   12,   12,   15,   12,   12,   12, |        11,   12,   13,   14,   12,   12,   15,   12,   12,   12, | ||||||
|        12,   12,   12,   12,   12,   12,   12 |        12,   12,   12,   12,   12,   12,   12,   12 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,   12,   13,   14,   12,   12,   15,   12,   12,   12, |        11,   12,   13,   14,   12,   12,   15,   12,   12,   12, | ||||||
|        12,   12,   12,   12,   12,   12,   12 |        12,   12,   12,   12,   12,   12,   12,   12 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,   16,   16,   17,   16,   16,   16,   16,   16,   16, |        11,   16,   16,   17,   16,   16,   16,   16,   16,   16, | ||||||
|        16,   16,   16,   18,   16,   16,   16 |        16,   18,   16,   16,   16,   16,   16,   16 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,   16,   16,   17,   16,   16,   16,   16,   16,   16, |        11,   16,   16,   17,   16,   16,   16,   16,   16,   16, | ||||||
|        16,   16,   16,   18,   16,   16,   16 |        16,   18,   16,   16,   16,   16,   16,   16 | ||||||
| 
 | 
 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,   19,   20,   21,   19,   19,   19,   19,   19,   19, |        11,   19,   20,   21,   19,   19,   19,   19,   19,   19, | ||||||
|        19,   19,   19,   19,   19,   19,   19 |        19,   19,   19,   19,   19,   19,   19,   19 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,   19,   20,   21,   19,   19,   19,   19,   19,   19, |        11,   19,   20,   21,   19,   19,   19,   19,   19,   19, | ||||||
|        19,   19,   19,   19,   19,   19,   19 |        19,   19,   19,   19,   19,   19,   19,   19 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,   22,   22,   23,   22,   24,   22,   22,   24,   22, |        11,   22,   22,   23,   22,   24,   22,   22,   24,   22, | ||||||
|        22,   22,   22,   22,   22,   25,   22 |        22,   22,   22,   22,   22,   22,   25,   22 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,   22,   22,   23,   22,   24,   22,   22,   24,   22, |        11,   22,   22,   23,   22,   24,   22,   22,   24,   22, | ||||||
|        22,   22,   22,   22,   22,   25,   22 |        22,   22,   22,   22,   22,   22,   25,   22 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,   26,   26,   27,   28,   29,   30,   31,   29,   32, |        11,   26,   27,   28,   29,   30,   31,   32,   30,   33, | ||||||
|        33,   34,   35,   35,   36,   37,   38 |        34,   35,   35,   36,   37,   38,   39,   40 | ||||||
| 
 | 
 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,   26,   26,   27,   28,   29,   30,   31,   29,   32, |        11,   26,   27,   28,   29,   30,   31,   32,   30,   33, | ||||||
|        33,   34,   35,   35,   36,   37,   38 |        34,   35,   35,   36,   37,   38,   39,   40 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|       -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11, |       -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11, | ||||||
|       -11,  -11,  -11,  -11,  -11,  -11,  -11 |       -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,  -12,  -12,  -12,  -12,  -12,  -12,  -12,  -12,  -12, |        11,  -12,  -12,  -12,  -12,  -12,  -12,  -12,  -12,  -12, | ||||||
|       -12,  -12,  -12,  -12,  -12,  -12,  -12 |       -12,  -12,  -12,  -12,  -12,  -12,  -12,  -12 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,  -13,   39,   40,  -13,  -13,   41,  -13,  -13,  -13, |        11,  -13,   41,   42,  -13,  -13,   43,  -13,  -13,  -13, | ||||||
|       -13,  -13,  -13,  -13,  -13,  -13,  -13 |       -13,  -13,  -13,  -13,  -13,  -13,  -13,  -13 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,  -14,  -14,  -14,  -14,  -14,  -14,  -14,  -14,  -14, |        11,  -14,  -14,  -14,  -14,  -14,  -14,  -14,  -14,  -14, | ||||||
|       -14,  -14,  -14,  -14,  -14,  -14,  -14 |       -14,  -14,  -14,  -14,  -14,  -14,  -14,  -14 | ||||||
| 
 | 
 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,   42,   42,   43,   42,   42,   42,   42,   42,   42, |        11,   44,   44,   45,   44,   44,   44,   44,   44,   44, | ||||||
|        42,   42,   42,   42,   42,   42,   42 |        44,   44,   44,   44,   44,   44,   44,   44 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,  -16,  -16,  -16,  -16,  -16,  -16,  -16,  -16,  -16, |        11,  -16,  -16,  -16,  -16,  -16,  -16,  -16,  -16,  -16, | ||||||
|       -16,  -16,  -16,  -16,  -16,  -16,  -16 |       -16,  -16,  -16,  -16,  -16,  -16,  -16,  -16 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,  -17,  -17,  -17,  -17,  -17,  -17,  -17,  -17,  -17, |        11,  -17,  -17,  -17,  -17,  -17,  -17,  -17,  -17,  -17, | ||||||
|       -17,  -17,  -17,  -17,  -17,  -17,  -17 |       -17,  -17,  -17,  -17,  -17,  -17,  -17,  -17 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,  -18,  -18,  -18,  -18,  -18,  -18,  -18,  -18,  -18, |        11,  -18,  -18,  -18,  -18,  -18,  -18,  -18,  -18,  -18, | ||||||
|       -18,  -18,  -18,   44,  -18,  -18,  -18 |       -18,   46,  -18,  -18,  -18,  -18,  -18,  -18 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,   45,   45,  -19,   45,   45,   45,   45,   45,   45, |        11,   47,   47,  -19,   47,   47,   47,   47,   47,   47, | ||||||
|        45,   45,   45,   45,   45,   45,   45 |        47,   47,   47,   47,   47,   47,   47,   47 | ||||||
| 
 | 
 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,  -20,   46,   47,  -20,  -20,  -20,  -20,  -20,  -20, |        11,  -20,   48,   49,  -20,  -20,  -20,  -20,  -20,  -20, | ||||||
|       -20,  -20,  -20,  -20,  -20,  -20,  -20 |       -20,  -20,  -20,  -20,  -20,  -20,  -20,  -20 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,   48,  -21,  -21,   48,   48,   48,   48,   48,   48, |        11,   50,  -21,  -21,   50,   50,   50,   50,   50,   50, | ||||||
|        48,   48,   48,   48,   48,   48,   48 |        50,   50,   50,   50,   50,   50,   50,   50 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,   49,   49,   50,   49,  -22,   49,   49,  -22,   49, |        11,   51,   51,   52,   51,  -22,   51,   51,  -22,   51, | ||||||
|        49,   49,   49,   49,   49,  -22,   49 |        51,   51,   51,   51,   51,   51,  -22,   51 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,  -23,  -23,  -23,  -23,  -23,  -23,  -23,  -23,  -23, |        11,  -23,  -23,  -23,  -23,  -23,  -23,  -23,  -23,  -23, | ||||||
|       -23,  -23,  -23,  -23,  -23,  -23,  -23 |       -23,  -23,  -23,  -23,  -23,  -23,  -23,  -23 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,  -24,  -24,  -24,  -24,  -24,  -24,  -24,  -24,  -24, |        11,  -24,  -24,  -24,  -24,  -24,  -24,  -24,  -24,  -24, | ||||||
|       -24,  -24,  -24,  -24,  -24,  -24,  -24 |       -24,  -24,  -24,  -24,  -24,  -24,  -24,  -24 | ||||||
| 
 | 
 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,   51,   51,   52,   51,   51,   51,   51,   51,   51, |        11,   53,   53,   54,   53,   53,   53,   53,   53,   53, | ||||||
|        51,   51,   51,   51,   51,   51,   51 |        53,   53,   53,   53,   53,   53,   53,   53 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,  -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26, |        11,  -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26, | ||||||
|       -26,  -26,  -26,  -26,  -26,  -26,  -26 |       -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,  -27,  -27,  -27,  -27,  -27,  -27,  -27,  -27,  -27, |        11,  -27,   55,  -27,  -27,  -27,  -27,  -27,  -27,  -27, | ||||||
|       -27,  -27,  -27,  -27,  -27,  -27,  -27 |       -27,  -27,  -27,  -27,  -27,  -27,  -27,  -27 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,  -28,  -28,  -28,  -28,  -28,  -28,  -28,  -28,  -28, |        11,  -28,  -28,  -28,  -28,  -28,  -28,  -28,  -28,  -28, | ||||||
|       -28,  -28,  -28,  -28,   53,  -28,  -28 |       -28,  -28,  -28,  -28,  -28,  -28,  -28,  -28 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,  -29,  -29,  -29,  -29,  -29,  -29,  -29,  -29,  -29, |        11,  -29,  -29,  -29,  -29,  -29,  -29,  -29,  -29,  -29, | ||||||
|       -29,  -29,  -29,  -29,  -29,  -29,  -29 |       -29,  -29,  -29,  -29,   56,  -29,  -29,  -29 | ||||||
| 
 | 
 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,   54,   54,  -30,   54,   54,   54,   54,   54,   54, |        11,  -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30, | ||||||
|        54,   54,   54,   54,   54,   54,   54 |       -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,  -31,  -31,  -31,  -31,  -31,  -31,   55,  -31,  -31, |        11,   57,   57,  -31,   57,   57,   57,   57,   57,   57, | ||||||
|       -31,  -31,  -31,  -31,  -31,  -31,  -31 |        57,   57,   57,   57,   57,   57,   57,   57 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,  -32,  -32,  -32,  -32,  -32,  -32,  -32,  -32,  -32, |        11,  -32,  -32,  -32,  -32,  -32,  -32,   58,  -32,  -32, | ||||||
|       -32,  -32,  -32,  -32,  -32,  -32,  -32 |       -32,  -32,  -32,  -32,  -32,  -32,  -32,  -32 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,  -33,  -33,  -33,  -33,  -33,  -33,  -33,  -33,  -33, |        11,  -33,  -33,  -33,  -33,  -33,  -33,  -33,  -33,  -33, | ||||||
|       -33,  -33,  -33,  -33,  -33,  -33,  -33 |       -33,  -33,  -33,  -33,  -33,  -33,  -33,  -33 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,  -34,  -34,  -34,  -34,  -34,  -34,  -34,  -34,  -34, |        11,  -34,  -34,  -34,  -34,  -34,  -34,  -34,  -34,  -34, | ||||||
|       -34,   56,   57,   57,  -34,  -34,  -34 |       -34,  -34,  -34,  -34,  -34,  -34,  -34,  -34 | ||||||
| 
 | 
 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,  -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35, |        11,  -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35, | ||||||
|       -35,   57,   57,   57,  -35,  -35,  -35 |       -35,   59,   59,  -35,  -35,  -35,  -35,  -35 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,  -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36, |        11,  -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36, | ||||||
|       -36,  -36,  -36,  -36,  -36,  -36,  -36 |       -36,  -36,  -36,  -36,   60,  -36,  -36,  -36 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,  -37,  -37,   58,  -37,  -37,  -37,  -37,  -37,  -37, |        11,  -37,  -37,  -37,  -37,  -37,  -37,  -37,  -37,  -37, | ||||||
|       -37,  -37,  -37,  -37,  -37,  -37,  -37 |       -37,  -37,  -37,  -37,  -37,  -37,  -37,  -37 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,  -38,  -38,  -38,  -38,  -38,  -38,  -38,  -38,  -38, |        11,  -38,  -38,  -38,  -38,  -38,  -38,  -38,  -38,  -38, | ||||||
|       -38,  -38,  -38,  -38,  -38,  -38,   59 |       -38,  -38,  -38,  -38,   61,  -38,  -38,  -38 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,  -39,   39,   40,  -39,  -39,   41,  -39,  -39,  -39, |        11,  -39,  -39,   62,  -39,  -39,  -39,  -39,  -39,  -39, | ||||||
|       -39,  -39,  -39,  -39,  -39,  -39,  -39 |       -39,  -39,  -39,  -39,  -39,  -39,  -39,  -39 | ||||||
| 
 | 
 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,  -40,  -40,  -40,  -40,  -40,  -40,  -40,  -40,  -40, |        11,  -40,  -40,  -40,  -40,  -40,  -40,  -40,  -40,  -40, | ||||||
|       -40,  -40,  -40,  -40,  -40,  -40,  -40 |       -40,  -40,  -40,  -40,  -40,  -40,  -40,   63 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,   42,   42,   43,   42,   42,   42,   42,   42,   42, |        11,  -41,   41,   42,  -41,  -41,   43,  -41,  -41,  -41, | ||||||
|        42,   42,   42,   42,   42,   42,   42 |       -41,  -41,  -41,  -41,  -41,  -41,  -41,  -41 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,   42,   42,   43,   42,   42,   42,   42,   42,   42, |        11,  -42,  -42,  -42,  -42,  -42,  -42,  -42,  -42,  -42, | ||||||
|        42,   42,   42,   42,   42,   42,   42 |       -42,  -42,  -42,  -42,  -42,  -42,  -42,  -42 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,  -43,  -43,  -43,  -43,  -43,  -43,  -43,  -43,  -43, |        11,   44,   44,   45,   44,   44,   44,   44,   44,   44, | ||||||
|       -43,  -43,  -43,  -43,  -43,  -43,  -43 |        44,   44,   44,   44,   44,   44,   44,   44 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,  -44,  -44,  -44,  -44,  -44,  -44,  -44,  -44,  -44, |        11,   44,   44,   45,   44,   44,   44,   44,   44,   44, | ||||||
|       -44,  -44,  -44,   44,  -44,  -44,  -44 |        44,   44,   44,   44,   44,   44,   44,   44 | ||||||
| 
 | 
 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,   45,   45,  -45,   45,   45,   45,   45,   45,   45, |        11,  -45,  -45,  -45,  -45,  -45,  -45,  -45,  -45,  -45, | ||||||
|        45,   45,   45,   45,   45,   45,   45 |       -45,  -45,  -45,  -45,  -45,  -45,  -45,  -45 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,  -46,   46,   47,  -46,  -46,  -46,  -46,  -46,  -46, |        11,  -46,  -46,  -46,  -46,  -46,  -46,  -46,  -46,  -46, | ||||||
|       -46,  -46,  -46,  -46,  -46,  -46,  -46 |       -46,   46,  -46,  -46,  -46,  -46,  -46,  -46 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,   48,  -47,  -47,   48,   48,   48,   48,   48,   48, |        11,   47,   47,  -47,   47,   47,   47,   47,   47,   47, | ||||||
|        48,   48,   48,   48,   48,   48,   48 |        47,   47,   47,   47,   47,   47,   47,   47 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,  -48,  -48,  -48,  -48,  -48,  -48,  -48,  -48,  -48, |        11,  -48,   48,   49,  -48,  -48,  -48,  -48,  -48,  -48, | ||||||
|       -48,  -48,  -48,  -48,  -48,  -48,  -48 |       -48,  -48,  -48,  -48,  -48,  -48,  -48,  -48 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,   49,   49,   50,   49,  -49,   49,   49,  -49,   49, |        11,   50,  -49,  -49,   50,   50,   50,   50,   50,   50, | ||||||
|        49,   49,   49,   49,   49,  -49,   49 |        50,   50,   50,   50,   50,   50,   50,   50 | ||||||
| 
 | 
 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,  -50,  -50,  -50,  -50,  -50,  -50,  -50,  -50,  -50, |        11,  -50,  -50,  -50,  -50,  -50,  -50,  -50,  -50,  -50, | ||||||
|       -50,  -50,  -50,  -50,  -50,  -50,  -50 |       -50,  -50,  -50,  -50,  -50,  -50,  -50,  -50 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,  -51,  -51,   52,  -51,  -51,  -51,  -51,  -51,  -51, |        11,   51,   51,   52,   51,  -51,   51,   51,  -51,   51, | ||||||
|       -51,  -51,  -51,  -51,  -51,  -51,  -51 |        51,   51,   51,   51,   51,   51,  -51,   51 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,  -52,  -52,  -52,  -52,  -52,  -52,  -52,  -52,  -52, |        11,  -52,  -52,  -52,  -52,  -52,  -52,  -52,  -52,  -52, | ||||||
|       -52,  -52,  -52,  -52,  -52,  -52,  -52 |       -52,  -52,  -52,  -52,  -52,  -52,  -52,  -52 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,  -53,  -53,  -53,  -53,  -53,  -53,  -53,  -53,  -53, |        11,  -53,  -53,   54,  -53,  -53,  -53,  -53,  -53,  -53, | ||||||
|       -53,  -53,  -53,  -53,  -53,  -53,  -53 |       -53,  -53,  -53,  -53,  -53,  -53,  -53,  -53 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,   54,   54,  -54,   54,   54,   54,   54,   54,   54, |        11,  -54,  -54,  -54,  -54,  -54,  -54,  -54,  -54,  -54, | ||||||
|        54,   54,   54,   54,   54,   54,   54 |       -54,  -54,  -54,  -54,  -54,  -54,  -54,  -54 | ||||||
| 
 | 
 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,  -55,  -55,  -55,  -55,  -55,  -55,  -55,  -55,  -55, |        11,  -55,   55,  -55,  -55,  -55,  -55,  -55,  -55,  -55, | ||||||
|       -55,  -55,  -55,  -55,  -55,  -55,  -55 |       -55,  -55,  -55,  -55,  -55,  -55,  -55,  -55 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,  -56,  -56,  -56,  -56,  -56,  -56,  -56,  -56,  -56, |        11,  -56,  -56,  -56,  -56,  -56,  -56,  -56,  -56,  -56, | ||||||
|       -56,   60,   57,   57,  -56,  -56,  -56 |       -56,  -56,  -56,  -56,  -56,  -56,  -56,  -56 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,  -57,  -57,  -57,  -57,  -57,  -57,  -57,  -57,  -57, |        11,   57,   57,  -57,   57,   57,   57,   57,   57,   57, | ||||||
|       -57,   57,   57,   57,  -57,  -57,  -57 |        57,   57,   57,   57,   57,   57,   57,   57 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,  -58,  -58,  -58,  -58,  -58,  -58,  -58,  -58,  -58, |        11,  -58,  -58,  -58,  -58,  -58,  -58,  -58,  -58,  -58, | ||||||
|       -58,  -58,  -58,  -58,  -58,  -58,  -58 |       -58,  -58,  -58,  -58,  -58,  -58,  -58,  -58 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,  -59,  -59,  -59,  -59,  -59,  -59,  -59,  -59,  -59, |        11,  -59,  -59,  -59,  -59,  -59,  -59,  -59,  -59,  -59, | ||||||
|       -59,  -59,  -59,  -59,  -59,  -59,  -59 |       -59,   59,   59,  -59,  -59,  -59,  -59,  -59 | ||||||
| 
 | 
 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|        11,  -60,  -60,  -60,  -60,  -60,  -60,  -60,  -60,  -60, |        11,  -60,  -60,  -60,  -60,  -60,  -60,  -60,  -60,  -60, | ||||||
|       -60,   57,   57,   57,  -60,  -60,  -60 |       -60,  -60,  -60,  -60,  -60,  -60,  -60,  -60 | ||||||
|  |     }, | ||||||
|  | 
 | ||||||
|  |     { | ||||||
|  |        11,  -61,  -61,  -61,  -61,  -61,  -61,  -61,  -61,  -61, | ||||||
|  |       -61,  -61,  -61,  -61,  -61,  -61,  -61,  -61 | ||||||
|  |     }, | ||||||
|  | 
 | ||||||
|  |     { | ||||||
|  |        11,  -62,  -62,  -62,  -62,  -62,  -62,  -62,  -62,  -62, | ||||||
|  |       -62,  -62,  -62,  -62,  -62,  -62,  -62,  -62 | ||||||
|  |     }, | ||||||
|  | 
 | ||||||
|  |     { | ||||||
|  |        11,  -63,  -63,  -63,  -63,  -63,  -63,  -63,  -63,  -63, | ||||||
|  |       -63,  -63,  -63,  -63,  -63,  -63,  -63,  -63 | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     } ; |     } ; | ||||||
|  | @ -701,8 +725,8 @@ static void yy_fatal_error (yyconst char msg[]  ); | ||||||
| 	*yy_cp = '\0'; \ | 	*yy_cp = '\0'; \ | ||||||
| 	(yy_c_buf_p) = yy_cp; | 	(yy_c_buf_p) = yy_cp; | ||||||
| 
 | 
 | ||||||
| #define YY_NUM_RULES 33 | #define YY_NUM_RULES 37 | ||||||
| #define YY_END_OF_BUFFER 34 | #define YY_END_OF_BUFFER 38 | ||||||
| /* This struct is not used in this scanner, | /* This struct is not used in this scanner, | ||||||
|    but its presence is necessary. */ |    but its presence is necessary. */ | ||||||
| struct yy_trans_info | struct yy_trans_info | ||||||
|  | @ -710,14 +734,15 @@ struct yy_trans_info | ||||||
| 	flex_int32_t yy_verify; | 	flex_int32_t yy_verify; | ||||||
| 	flex_int32_t yy_nxt; | 	flex_int32_t yy_nxt; | ||||||
| 	}; | 	}; | ||||||
| static yyconst flex_int16_t yy_accept[61] = | static yyconst flex_int16_t yy_accept[64] = | ||||||
|     {   0, |     {   0, | ||||||
|         0,    0,    0,    0,    0,    0,    0,    0,    0,    0, |         0,    0,    0,    0,    0,    0,    0,    0,    0,    0, | ||||||
|        34,    5,    4,    2,    3,    7,    8,    6,   32,   29, |        38,    5,    4,    2,    3,    7,    8,    6,   36,   33, | ||||||
|        31,   24,   28,   27,   26,   22,   17,   13,   16,   20, |        35,   28,   32,   31,   30,   26,   25,   21,   13,   20, | ||||||
|        22,   11,   12,   19,   19,   14,   22,   22,    4,    2, |        23,   26,   11,   12,   22,   18,   14,   19,   26,   26, | ||||||
|         3,    3,    1,    6,   32,   29,   31,   30,   24,   23, |         4,    2,    3,    3,    1,    6,   36,   33,   35,   34, | ||||||
|        26,   25,   15,   20,    9,   19,   19,   21,   10,   18 |        28,   27,   30,   29,   25,   15,   23,    9,   22,   16, | ||||||
|  |        17,   24,   10 | ||||||
|     } ; |     } ; | ||||||
| 
 | 
 | ||||||
| static yyconst flex_int32_t yy_ec[256] = | static yyconst flex_int32_t yy_ec[256] = | ||||||
|  | @ -726,16 +751,16 @@ static yyconst flex_int32_t yy_ec[256] = | ||||||
|         1,    1,    1,    1,    1,    1,    1,    1,    1,    1, |         1,    1,    1,    1,    1,    1,    1,    1,    1,    1, | ||||||
|         1,    1,    1,    1,    1,    1,    1,    1,    1,    1, |         1,    1,    1,    1,    1,    1,    1,    1,    1,    1, | ||||||
|         1,    2,    4,    5,    6,    1,    1,    7,    8,    9, |         1,    2,    4,    5,    6,    1,    1,    7,    8,    9, | ||||||
|        10,    1,    1,    1,   11,   12,   12,   13,   13,   13, |        10,    1,    1,    1,   11,   12,   12,   11,   11,   11, | ||||||
|        13,   13,   13,   13,   13,   13,   13,    1,    1,    1, |        11,   11,   11,   11,   11,   11,   11,    1,    1,   13, | ||||||
|        14,    1,    1,    1,   13,   13,   13,   13,   13,   13, |        14,   15,    1,    1,   11,   11,   11,   11,   11,   11, | ||||||
|        13,   13,   13,   13,   13,   13,   13,   13,   13,   13, |        11,   11,   11,   11,   11,   11,   11,   11,   11,   11, | ||||||
|        13,   13,   13,   13,   13,   13,   13,   13,   13,   13, |        11,   11,   11,   11,   11,   11,   11,   11,   11,   11, | ||||||
|         1,   15,    1,    1,   13,    1,   13,   13,   13,   13, |         1,   16,    1,    1,   11,    1,   11,   11,   11,   11, | ||||||
| 
 | 
 | ||||||
|        13,   13,   13,   13,   13,   13,   13,   13,   13,   13, |        11,   11,   11,   11,   11,   11,   11,   11,   11,   11, | ||||||
|        13,   13,   13,   13,   13,   13,   13,   13,   13,   13, |        11,   11,   11,   11,   11,   11,   11,   11,   11,   11, | ||||||
|        13,   13,    1,   16,    1,    1,    1,    1,    1,    1, |        11,   11,    1,   17,    1,    1,    1,    1,    1,    1, | ||||||
|         1,    1,    1,    1,    1,    1,    1,    1,    1,    1, |         1,    1,    1,    1,    1,    1,    1,    1,    1,    1, | ||||||
|         1,    1,    1,    1,    1,    1,    1,    1,    1,    1, |         1,    1,    1,    1,    1,    1,    1,    1,    1,    1, | ||||||
|         1,    1,    1,    1,    1,    1,    1,    1,    1,    1, |         1,    1,    1,    1,    1,    1,    1,    1,    1,    1, | ||||||
|  | @ -829,6 +854,13 @@ static void alloc_string(const char *str, int size) | ||||||
| 	text[size] = 0; | 	text[size] = 0; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | static void warn_ignored_character(char chr) | ||||||
|  | { | ||||||
|  | 	fprintf(stderr, | ||||||
|  | 	        "%s:%d:warning: ignoring unsupported character '%c'\n", | ||||||
|  | 	        zconf_curname(), zconf_lineno(), chr); | ||||||
|  | } | ||||||
|  | 
 | ||||||
| #define INITIAL 0 | #define INITIAL 0 | ||||||
| #define COMMAND 1 | #define COMMAND 1 | ||||||
| #define HELP 2 | #define HELP 2 | ||||||
|  | @ -912,7 +944,12 @@ static int input (void ); | ||||||
| 
 | 
 | ||||||
| /* Amount of stuff to slurp up with each read. */ | /* Amount of stuff to slurp up with each read. */ | ||||||
| #ifndef YY_READ_BUF_SIZE | #ifndef YY_READ_BUF_SIZE | ||||||
|  | #ifdef __ia64__ | ||||||
|  | /* On IA-64, the buffer size is 16k, not 8k */ | ||||||
|  | #define YY_READ_BUF_SIZE 16384 | ||||||
|  | #else | ||||||
| #define YY_READ_BUF_SIZE 8192 | #define YY_READ_BUF_SIZE 8192 | ||||||
|  | #endif /* __ia64__ */ | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| /* Copy whatever the last rule matched to the standard output. */ | /* Copy whatever the last rule matched to the standard output. */ | ||||||
|  | @ -1100,7 +1137,7 @@ YY_RULE_SETUP | ||||||
| 	YY_BREAK | 	YY_BREAK | ||||||
| case 7: | case 7: | ||||||
| YY_RULE_SETUP | YY_RULE_SETUP | ||||||
| 
 | warn_ignored_character(*zconftext); | ||||||
| 	YY_BREAK | 	YY_BREAK | ||||||
| case 8: | case 8: | ||||||
| /* rule 8 can match eol */ | /* rule 8 can match eol */ | ||||||
|  | @ -1142,22 +1179,34 @@ return T_UNEQUAL; | ||||||
| 	YY_BREAK | 	YY_BREAK | ||||||
| case 16: | case 16: | ||||||
| YY_RULE_SETUP | YY_RULE_SETUP | ||||||
|  | return T_LESS_EQUAL; | ||||||
|  | 	YY_BREAK | ||||||
|  | case 17: | ||||||
|  | YY_RULE_SETUP | ||||||
|  | return T_GREATER_EQUAL; | ||||||
|  | 	YY_BREAK | ||||||
|  | case 18: | ||||||
|  | YY_RULE_SETUP | ||||||
|  | return T_LESS; | ||||||
|  | 	YY_BREAK | ||||||
|  | case 19: | ||||||
|  | YY_RULE_SETUP | ||||||
|  | return T_GREATER; | ||||||
|  | 	YY_BREAK | ||||||
|  | case 20: | ||||||
|  | YY_RULE_SETUP | ||||||
| { | { | ||||||
| 		str = zconftext[0]; | 		str = zconftext[0]; | ||||||
| 		new_string(); | 		new_string(); | ||||||
| 		BEGIN(STRING); | 		BEGIN(STRING); | ||||||
| 	} | 	} | ||||||
| 	YY_BREAK | 	YY_BREAK | ||||||
| case 17: | case 21: | ||||||
| /* rule 17 can match eol */ | /* rule 21 can match eol */ | ||||||
| YY_RULE_SETUP | YY_RULE_SETUP | ||||||
| BEGIN(INITIAL); current_file->lineno++; return T_EOL; | BEGIN(INITIAL); current_file->lineno++; return T_EOL; | ||||||
| 	YY_BREAK | 	YY_BREAK | ||||||
| case 18: | case 22: | ||||||
| YY_RULE_SETUP |  | ||||||
| /* ignore */ |  | ||||||
| 	YY_BREAK |  | ||||||
| case 19: |  | ||||||
| YY_RULE_SETUP | YY_RULE_SETUP | ||||||
| { | { | ||||||
| 		const struct kconf_id *id = kconf_id_lookup(zconftext, zconfleng); | 		const struct kconf_id *id = kconf_id_lookup(zconftext, zconfleng); | ||||||
|  | @ -1170,18 +1219,22 @@ YY_RULE_SETUP | ||||||
| 		return T_WORD; | 		return T_WORD; | ||||||
| 	} | 	} | ||||||
| 	YY_BREAK | 	YY_BREAK | ||||||
| case 20: | case 23: | ||||||
| YY_RULE_SETUP | YY_RULE_SETUP | ||||||
| /* comment */ | /* comment */ | ||||||
| 	YY_BREAK | 	YY_BREAK | ||||||
| case 21: | case 24: | ||||||
| /* rule 21 can match eol */ | /* rule 24 can match eol */ | ||||||
| YY_RULE_SETUP | YY_RULE_SETUP | ||||||
| current_file->lineno++; | current_file->lineno++; | ||||||
| 	YY_BREAK | 	YY_BREAK | ||||||
| case 22: | case 25: | ||||||
| YY_RULE_SETUP | YY_RULE_SETUP | ||||||
| 
 | 
 | ||||||
|  | 	YY_BREAK | ||||||
|  | case 26: | ||||||
|  | YY_RULE_SETUP | ||||||
|  | warn_ignored_character(*zconftext); | ||||||
| 	YY_BREAK | 	YY_BREAK | ||||||
| case YY_STATE_EOF(PARAM): | case YY_STATE_EOF(PARAM): | ||||||
| { | { | ||||||
|  | @ -1189,43 +1242,43 @@ case YY_STATE_EOF(PARAM): | ||||||
| 	} | 	} | ||||||
| 	YY_BREAK | 	YY_BREAK | ||||||
| 
 | 
 | ||||||
| case 23: |  | ||||||
| /* rule 23 can match eol */ |  | ||||||
| *yy_cp = (yy_hold_char); /* undo effects of setting up zconftext */ |  | ||||||
| (yy_c_buf_p) = yy_cp -= 1; |  | ||||||
| YY_DO_BEFORE_ACTION; /* set up zconftext again */ |  | ||||||
| YY_RULE_SETUP |  | ||||||
| { |  | ||||||
| 		append_string(zconftext, zconfleng); |  | ||||||
| 		zconflval.string = text; |  | ||||||
| 		return T_WORD_QUOTE; |  | ||||||
| 	} |  | ||||||
| 	YY_BREAK |  | ||||||
| case 24: |  | ||||||
| YY_RULE_SETUP |  | ||||||
| { |  | ||||||
| 		append_string(zconftext, zconfleng); |  | ||||||
| 	} |  | ||||||
| 	YY_BREAK |  | ||||||
| case 25: |  | ||||||
| /* rule 25 can match eol */ |  | ||||||
| *yy_cp = (yy_hold_char); /* undo effects of setting up zconftext */ |  | ||||||
| (yy_c_buf_p) = yy_cp -= 1; |  | ||||||
| YY_DO_BEFORE_ACTION; /* set up zconftext again */ |  | ||||||
| YY_RULE_SETUP |  | ||||||
| { |  | ||||||
| 		append_string(zconftext + 1, zconfleng - 1); |  | ||||||
| 		zconflval.string = text; |  | ||||||
| 		return T_WORD_QUOTE; |  | ||||||
| 	} |  | ||||||
| 	YY_BREAK |  | ||||||
| case 26: |  | ||||||
| YY_RULE_SETUP |  | ||||||
| { |  | ||||||
| 		append_string(zconftext + 1, zconfleng - 1); |  | ||||||
| 	} |  | ||||||
| 	YY_BREAK |  | ||||||
| case 27: | case 27: | ||||||
|  | /* rule 27 can match eol */ | ||||||
|  | *yy_cp = (yy_hold_char); /* undo effects of setting up zconftext */ | ||||||
|  | (yy_c_buf_p) = yy_cp -= 1; | ||||||
|  | YY_DO_BEFORE_ACTION; /* set up zconftext again */ | ||||||
|  | YY_RULE_SETUP | ||||||
|  | { | ||||||
|  | 		append_string(zconftext, zconfleng); | ||||||
|  | 		zconflval.string = text; | ||||||
|  | 		return T_WORD_QUOTE; | ||||||
|  | 	} | ||||||
|  | 	YY_BREAK | ||||||
|  | case 28: | ||||||
|  | YY_RULE_SETUP | ||||||
|  | { | ||||||
|  | 		append_string(zconftext, zconfleng); | ||||||
|  | 	} | ||||||
|  | 	YY_BREAK | ||||||
|  | case 29: | ||||||
|  | /* rule 29 can match eol */ | ||||||
|  | *yy_cp = (yy_hold_char); /* undo effects of setting up zconftext */ | ||||||
|  | (yy_c_buf_p) = yy_cp -= 1; | ||||||
|  | YY_DO_BEFORE_ACTION; /* set up zconftext again */ | ||||||
|  | YY_RULE_SETUP | ||||||
|  | { | ||||||
|  | 		append_string(zconftext + 1, zconfleng - 1); | ||||||
|  | 		zconflval.string = text; | ||||||
|  | 		return T_WORD_QUOTE; | ||||||
|  | 	} | ||||||
|  | 	YY_BREAK | ||||||
|  | case 30: | ||||||
|  | YY_RULE_SETUP | ||||||
|  | { | ||||||
|  | 		append_string(zconftext + 1, zconfleng - 1); | ||||||
|  | 	} | ||||||
|  | 	YY_BREAK | ||||||
|  | case 31: | ||||||
| YY_RULE_SETUP | YY_RULE_SETUP | ||||||
| { | { | ||||||
| 		if (str == zconftext[0]) { | 		if (str == zconftext[0]) { | ||||||
|  | @ -1236,8 +1289,8 @@ YY_RULE_SETUP | ||||||
| 			append_string(zconftext, 1); | 			append_string(zconftext, 1); | ||||||
| 	} | 	} | ||||||
| 	YY_BREAK | 	YY_BREAK | ||||||
| case 28: | case 32: | ||||||
| /* rule 28 can match eol */ | /* rule 32 can match eol */ | ||||||
| YY_RULE_SETUP | YY_RULE_SETUP | ||||||
| { | { | ||||||
| 		printf("%s:%d:warning: multi-line strings not supported\n", zconf_curname(), zconf_lineno()); | 		printf("%s:%d:warning: multi-line strings not supported\n", zconf_curname(), zconf_lineno()); | ||||||
|  | @ -1252,7 +1305,7 @@ case YY_STATE_EOF(STRING): | ||||||
| 	} | 	} | ||||||
| 	YY_BREAK | 	YY_BREAK | ||||||
| 
 | 
 | ||||||
| case 29: | case 33: | ||||||
| YY_RULE_SETUP | YY_RULE_SETUP | ||||||
| { | { | ||||||
| 		ts = 0; | 		ts = 0; | ||||||
|  | @ -1277,8 +1330,8 @@ YY_RULE_SETUP | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 	YY_BREAK | 	YY_BREAK | ||||||
| case 30: | case 34: | ||||||
| /* rule 30 can match eol */ | /* rule 34 can match eol */ | ||||||
| *yy_cp = (yy_hold_char); /* undo effects of setting up zconftext */ | *yy_cp = (yy_hold_char); /* undo effects of setting up zconftext */ | ||||||
| (yy_c_buf_p) = yy_cp -= 1; | (yy_c_buf_p) = yy_cp -= 1; | ||||||
| YY_DO_BEFORE_ACTION; /* set up zconftext again */ | YY_DO_BEFORE_ACTION; /* set up zconftext again */ | ||||||
|  | @ -1289,15 +1342,15 @@ YY_RULE_SETUP | ||||||
| 		return T_HELPTEXT; | 		return T_HELPTEXT; | ||||||
| 	} | 	} | ||||||
| 	YY_BREAK | 	YY_BREAK | ||||||
| case 31: | case 35: | ||||||
| /* rule 31 can match eol */ | /* rule 35 can match eol */ | ||||||
| YY_RULE_SETUP | YY_RULE_SETUP | ||||||
| { | { | ||||||
| 		current_file->lineno++; | 		current_file->lineno++; | ||||||
| 		append_string("\n", 1); | 		append_string("\n", 1); | ||||||
| 	} | 	} | ||||||
| 	YY_BREAK | 	YY_BREAK | ||||||
| case 32: | case 36: | ||||||
| YY_RULE_SETUP | YY_RULE_SETUP | ||||||
| { | { | ||||||
| 		while (zconfleng) { | 		while (zconfleng) { | ||||||
|  | @ -1328,7 +1381,7 @@ case YY_STATE_EOF(COMMAND): | ||||||
| 	yyterminate(); | 	yyterminate(); | ||||||
| } | } | ||||||
| 	YY_BREAK | 	YY_BREAK | ||||||
| case 33: | case 37: | ||||||
| YY_RULE_SETUP | YY_RULE_SETUP | ||||||
| YY_FATAL_ERROR( "flex scanner jammed" ); | YY_FATAL_ERROR( "flex scanner jammed" ); | ||||||
| 	YY_BREAK | 	YY_BREAK | ||||||
|  | @ -2058,8 +2111,8 @@ YY_BUFFER_STATE zconf_scan_string (yyconst char * yystr ) | ||||||
| 
 | 
 | ||||||
| /** Setup the input buffer state to scan the given bytes. The next call to zconflex() will | /** Setup the input buffer state to scan the given bytes. The next call to zconflex() will | ||||||
|  * scan from a @e copy of @a bytes. |  * scan from a @e copy of @a bytes. | ||||||
|  * @param bytes the byte buffer to scan |  * @param yybytes the byte buffer to scan | ||||||
|  * @param len the number of bytes in the buffer pointed to by @a bytes. |  * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. | ||||||
|  *  |  *  | ||||||
|  * @return the newly allocated buffer state object. |  * @return the newly allocated buffer state object. | ||||||
|  */ |  */ | ||||||
|  |  | ||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							|  | @ -31,7 +31,7 @@ struct symbol *symbol_hash[SYMBOL_HASHSIZE]; | ||||||
| static struct menu *current_menu, *current_entry; | static struct menu *current_menu, *current_entry; | ||||||
| 
 | 
 | ||||||
| %} | %} | ||||||
| %expect 30 | %expect 32 | ||||||
| 
 | 
 | ||||||
| %union | %union | ||||||
| { | { | ||||||
|  | @ -62,6 +62,7 @@ static struct menu *current_menu, *current_entry; | ||||||
| %token <id>T_TYPE | %token <id>T_TYPE | ||||||
| %token <id>T_DEFAULT | %token <id>T_DEFAULT | ||||||
| %token <id>T_SELECT | %token <id>T_SELECT | ||||||
|  | %token <id>T_IMPLY | ||||||
| %token <id>T_RANGE | %token <id>T_RANGE | ||||||
| %token <id>T_VISIBLE | %token <id>T_VISIBLE | ||||||
| %token <id>T_OPTION | %token <id>T_OPTION | ||||||
|  | @ -69,6 +70,10 @@ static struct menu *current_menu, *current_entry; | ||||||
| %token <string> T_WORD | %token <string> T_WORD | ||||||
| %token <string> T_WORD_QUOTE | %token <string> T_WORD_QUOTE | ||||||
| %token T_UNEQUAL | %token T_UNEQUAL | ||||||
|  | %token T_LESS | ||||||
|  | %token T_LESS_EQUAL | ||||||
|  | %token T_GREATER | ||||||
|  | %token T_GREATER_EQUAL | ||||||
| %token T_CLOSE_PAREN | %token T_CLOSE_PAREN | ||||||
| %token T_OPEN_PAREN | %token T_OPEN_PAREN | ||||||
| %token T_EOL | %token T_EOL | ||||||
|  | @ -76,6 +81,7 @@ static struct menu *current_menu, *current_entry; | ||||||
| %left T_OR | %left T_OR | ||||||
| %left T_AND | %left T_AND | ||||||
| %left T_EQUAL T_UNEQUAL | %left T_EQUAL T_UNEQUAL | ||||||
|  | %left T_LESS T_LESS_EQUAL T_GREATER T_GREATER_EQUAL | ||||||
| %nonassoc T_NOT | %nonassoc T_NOT | ||||||
| 
 | 
 | ||||||
| %type <string> prompt | %type <string> prompt | ||||||
|  | @ -119,7 +125,7 @@ stmt_list: | ||||||
| ; | ; | ||||||
| 
 | 
 | ||||||
| option_name: | option_name: | ||||||
| 	T_DEPENDS | T_PROMPT | T_TYPE | T_SELECT | T_OPTIONAL | T_RANGE | T_DEFAULT | T_VISIBLE | 	T_DEPENDS | T_PROMPT | T_TYPE | T_SELECT | T_IMPLY | T_OPTIONAL | T_RANGE | T_DEFAULT | T_VISIBLE | ||||||
| ; | ; | ||||||
| 
 | 
 | ||||||
| common_stmt: | common_stmt: | ||||||
|  | @ -211,6 +217,12 @@ config_option: T_SELECT T_WORD if_expr T_EOL | ||||||
| 	printd(DEBUG_PARSE, "%s:%d:select\n", zconf_curname(), zconf_lineno()); | 	printd(DEBUG_PARSE, "%s:%d:select\n", zconf_curname(), zconf_lineno()); | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
|  | config_option: T_IMPLY T_WORD if_expr T_EOL | ||||||
|  | { | ||||||
|  | 	menu_add_symbol(P_IMPLY, sym_lookup($2, 0), $3); | ||||||
|  | 	printd(DEBUG_PARSE, "%s:%d:imply\n", zconf_curname(), zconf_lineno()); | ||||||
|  | }; | ||||||
|  | 
 | ||||||
| config_option: T_RANGE symbol symbol if_expr T_EOL | config_option: T_RANGE symbol symbol if_expr T_EOL | ||||||
| { | { | ||||||
| 	menu_add_expr(P_RANGE, expr_alloc_comp(E_RANGE,$2, $3), $4); | 	menu_add_expr(P_RANGE, expr_alloc_comp(E_RANGE,$2, $3), $4); | ||||||
|  | @ -467,6 +479,10 @@ if_expr:  /* empty */			{ $$ = NULL; } | ||||||
| ; | ; | ||||||
| 
 | 
 | ||||||
| expr:	  symbol				{ $$ = expr_alloc_symbol($1); } | expr:	  symbol				{ $$ = expr_alloc_symbol($1); } | ||||||
|  | 	| symbol T_LESS symbol			{ $$ = expr_alloc_comp(E_LTH, $1, $3); } | ||||||
|  | 	| symbol T_LESS_EQUAL symbol		{ $$ = expr_alloc_comp(E_LEQ, $1, $3); } | ||||||
|  | 	| symbol T_GREATER symbol		{ $$ = expr_alloc_comp(E_GTH, $1, $3); } | ||||||
|  | 	| symbol T_GREATER_EQUAL symbol		{ $$ = expr_alloc_comp(E_GEQ, $1, $3); } | ||||||
| 	| symbol T_EQUAL symbol			{ $$ = expr_alloc_comp(E_EQUAL, $1, $3); } | 	| symbol T_EQUAL symbol			{ $$ = expr_alloc_comp(E_EQUAL, $1, $3); } | ||||||
| 	| symbol T_UNEQUAL symbol		{ $$ = expr_alloc_comp(E_UNEQUAL, $1, $3); } | 	| symbol T_UNEQUAL symbol		{ $$ = expr_alloc_comp(E_UNEQUAL, $1, $3); } | ||||||
| 	| T_OPEN_PAREN expr T_CLOSE_PAREN	{ $$ = $2; } | 	| T_OPEN_PAREN expr T_CLOSE_PAREN	{ $$ = $2; } | ||||||
|  | @ -655,6 +671,11 @@ static void print_symbol(FILE *out, struct menu *menu) | ||||||
| 			expr_fprint(prop->expr, out); | 			expr_fprint(prop->expr, out); | ||||||
| 			fputc('\n', out); | 			fputc('\n', out); | ||||||
| 			break; | 			break; | ||||||
|  | 		case P_IMPLY: | ||||||
|  | 			fputs( "  imply ", out); | ||||||
|  | 			expr_fprint(prop->expr, out); | ||||||
|  | 			fputc('\n', out); | ||||||
|  | 			break; | ||||||
| 		case P_RANGE: | 		case P_RANGE: | ||||||
| 			fputs( "  range ", out); | 			fputs( "  range ", out); | ||||||
| 			expr_fprint(prop->expr, out); | 			expr_fprint(prop->expr, out); | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue