summaryrefslogtreecommitdiff
path: root/kconfig
diff options
context:
space:
mode:
authorChris Packham <judge.packham@gmail.com>2020-12-09 09:22:43 (GMT)
committerChris Packham <judge.packham@gmail.com>2021-02-02 07:06:32 (GMT)
commitd057ba5324a082ba28d3b81f90405fae860bb376 (patch)
tree9f4ccaa778897d99e517878a206e99252d03b15b /kconfig
parent21095fab6712d3a082936b14b93cb6ff29c02872 (diff)
kconfig: Sync with upstream v5.1
This commit introduces the following upstream changes: 9c38f1f04408 kconfig/[mn]conf: handle backspace (^H) key c71bb9f86666 kconfig: remove stale lxdialog/.gitignore 8741908b3e29 kconfig: fix 'Save As' menu of xconfig 058507195b53 kbuild: move ".config not found!" message from Kconfig to Makefile 769a1c022678 kconfig: rename zconf.y to parser.y 981e545a698a kconfig: rename zconf.l to lexer.l Signed-off-by: Chris Packham <judge.packham@gmail.com>
Diffstat (limited to 'kconfig')
-rw-r--r--kconfig/Makefile.am18
-rw-r--r--kconfig/conf.c13
-rw-r--r--kconfig/expr.h2
-rw-r--r--kconfig/lexer.l (renamed from kconfig/zconf.l)2
-rw-r--r--kconfig/lkc.h2
-rw-r--r--kconfig/lxdialog/inputbox.c3
-rw-r--r--kconfig/nconf.c2
-rw-r--r--kconfig/nconf.gui.c3
-rw-r--r--kconfig/parser.y (renamed from kconfig/zconf.y)0
9 files changed, 17 insertions, 28 deletions
diff --git a/kconfig/Makefile.am b/kconfig/Makefile.am
index 8245606..2db2615 100644
--- a/kconfig/Makefile.am
+++ b/kconfig/Makefile.am
@@ -5,26 +5,26 @@ transform = s,x,x,
pkglibexec_PROGRAMS = conf nconf mconf
-EXTRA_DIST = zconf.y zconf.l \
+EXTRA_DIST = parser.y lexer.l \
expr.h list.h lkc.h lkc_proto.h nconf.h lxdialog/dialog.h \
confdata.c expr.c kconf_id.c menu.c symbol.c util.c
-CLEANFILES = zconf.lex.c zconf.tab.c
-BUILT_SOURCES = zconf.lex.c zconf.tab.c
+CLEANFILES = lexer.lex.c parser.tab.c parser.tab.h
+BUILT_SOURCES = lexer.lex.c parser.tab.c
AM_LFLAGS = -L
AM_YFLAGS = -t -l
AM_CPPFLAGS = -include config.h -DCONFIG_=\"CT_\"
AM_LIBTOOLFLAGS = --tag CC
-conf_SOURCES = conf.c confdata.c expr.c symbol.c preprocess.c zconf.lex.c zconf.tab.c
+conf_SOURCES = conf.c confdata.c expr.c symbol.c preprocess.c lexer.lex.c parser.tab.c
conf_LDADD = $(LIBINTL)
-nconf_SOURCES = nconf.c nconf.gui.c confdata.c expr.c symbol.c preprocess.c zconf.lex.c zconf.tab.c
+nconf_SOURCES = nconf.c nconf.gui.c confdata.c expr.c symbol.c preprocess.c lexer.lex.c parser.tab.c
nconf_CFLAGS = $(CURSES_CFLAGS)
nconf_LDADD = $(MENU_LIBS) $(PANEL_LIBS) $(CURSES_LIBS) $(LIBINTL)
-mconf_SOURCES = mconf.c confdata.c expr.c symbol.c preprocess.c zconf.lex.c zconf.tab.c \
+mconf_SOURCES = mconf.c confdata.c expr.c symbol.c preprocess.c lexer.lex.c parser.tab.c \
lxdialog/checklist.c lxdialog/inputbox.c \
lxdialog/menubox.c lxdialog/textbox.c lxdialog/util.c \
lxdialog/yesno.c
@@ -43,8 +43,8 @@ AM_V_LEX = $(am__v_LEX_@AM_V@)
am__v_LEX_ = $(am__v_LEX_@AM_DEFAULT_V@)
am__v_LEX_0 = @echo " LEX " $@;
-zconf.tab.c: zconf.y
- $(AM_V_YACC)$(YACCCOMPILE) -o$@ --defines=zconf.tab.h $<
+parser.tab.c: parser.y
+ $(AM_V_YACC)$(YACCCOMPILE) -o$@ --defines=parser.tab.h $<
-zconf.lex.c: zconf.l
+lexer.lex.c: lexer.l
$(AM_V_LEX)$(LEXCOMPILE) -o$@ $<
diff --git a/kconfig/conf.c b/kconfig/conf.c
index b86c7de..67e3219 100644
--- a/kconfig/conf.c
+++ b/kconfig/conf.c
@@ -468,7 +468,6 @@ int main(int ac, char **av)
const char *progname = av[0];
int opt;
const char *name, *defconfig_file = NULL /* gcc uninit */;
- struct stat tmpstat;
int no_conf_write = 0;
tty_stdio = isatty(0) && isatty(1);
@@ -540,18 +539,6 @@ int main(int ac, char **av)
name = av[optind];
conf_parse(name);
//zconfdump(stdout);
- if (sync_kconfig) {
- name = conf_get_configname();
- if (stat(name, &tmpstat)) {
- fprintf(stderr, "***\n"
- "*** Configuration file \"%s\" not found!\n"
- "***\n"
- "*** Please configure with \"menuconfig\", or use a\n"
- "*** pre-existing sample (see list with \"list-samples\").\n"
- "***\n", name);
- exit(1);
- }
- }
switch (input_mode) {
case defconfig:
diff --git a/kconfig/expr.h b/kconfig/expr.h
index 999edb6..8dde65b 100644
--- a/kconfig/expr.h
+++ b/kconfig/expr.h
@@ -172,7 +172,7 @@ struct symbol {
* int "BAZ Value"
* range 1..255
*
- * Please, also check zconf.y:print_symbol() when modifying the
+ * Please, also check parser.y:print_symbol() when modifying the
* list of property types!
*/
enum prop_type {
diff --git a/kconfig/zconf.l b/kconfig/lexer.l
index b2d0a3b..c9df1c8 100644
--- a/kconfig/zconf.l
+++ b/kconfig/lexer.l
@@ -15,7 +15,7 @@
#include <unistd.h>
#include "lkc.h"
-#include "zconf.tab.h"
+#include "parser.tab.h"
#define YY_DECL static int yylex1(void)
diff --git a/kconfig/lkc.h b/kconfig/lkc.h
index 531ff7c..d871539 100644
--- a/kconfig/lkc.h
+++ b/kconfig/lkc.h
@@ -90,7 +90,7 @@ void *xrealloc(void *p, size_t size);
char *xstrdup(const char *s);
char *xstrndup(const char *s, size_t n);
-/* zconf.l */
+/* lexer.l */
int yylex(void);
struct gstr {
diff --git a/kconfig/lxdialog/inputbox.c b/kconfig/lxdialog/inputbox.c
index 6119456..1dcfb28 100644
--- a/kconfig/lxdialog/inputbox.c
+++ b/kconfig/lxdialog/inputbox.c
@@ -113,7 +113,8 @@ do_resize:
case KEY_DOWN:
break;
case KEY_BACKSPACE:
- case 127:
+ case 8: /* ^H */
+ case 127: /* ^? */
if (pos) {
wattrset(dialog, dlg.inputbox.atr);
if (input_x == 0) {
diff --git a/kconfig/nconf.c b/kconfig/nconf.c
index fb6027a..96a6bac 100644
--- a/kconfig/nconf.c
+++ b/kconfig/nconf.c
@@ -1051,7 +1051,7 @@ static int do_match(int key, struct match_state *state, int *ans)
state->match_direction = FIND_NEXT_MATCH_UP;
*ans = get_mext_match(state->pattern,
state->match_direction);
- } else if (key == KEY_BACKSPACE || key == 127) {
+ } else if (key == KEY_BACKSPACE || key == 8 || key == 127) {
state->pattern[strlen(state->pattern)-1] = '\0';
adj_match_dir(&state->match_direction);
} else
diff --git a/kconfig/nconf.gui.c b/kconfig/nconf.gui.c
index 7be620a..77f525a 100644
--- a/kconfig/nconf.gui.c
+++ b/kconfig/nconf.gui.c
@@ -439,7 +439,8 @@ int dialog_inputbox(WINDOW *main_window,
case KEY_F(F_EXIT):
case KEY_F(F_BACK):
break;
- case 127:
+ case 8: /* ^H */
+ case 127: /* ^? */
case KEY_BACKSPACE:
if (cursor_position > 0) {
memmove(&result[cursor_position-1],
diff --git a/kconfig/zconf.y b/kconfig/parser.y
index 60936c7..60936c7 100644
--- a/kconfig/zconf.y
+++ b/kconfig/parser.y