2014-12-08 01:56:16

by Christoph Jaeger

[permalink] [raw]
Subject: [PATCH 0/3] remove undocumented type definition alias

This patchset removes support for the undocumented type definition keyword
'boolean', that is used in some config option definitions, in favor of the
much more widely used 'bool'. Both are semantically equivalent.

% git grep -w bool -- '*Kconfig*' | wc -l
7065
% git grep -w boolean -- '*Kconfig*' | wc -l
94

Having this alias is more confusing than helpful.

This change was suggested by Daniel Borkmann <[email protected]>.


Patch 3/3 is purely cosmetic and therefore optional.

Christoph Jaeger (3):
kconfig: regenerate parser
kconfig: remove undocumented type definition alias 'boolean'
kconfig: rename S_BOOLEAN to S_BOOL for consistency

arch/cris/arch-v32/drivers/Kconfig | 2 +-
arch/mips/pmcs-msp71xx/Kconfig | 6 +-
drivers/connector/Kconfig | 2 +-
drivers/hwmon/Kconfig | 2 +-
drivers/i2c/Kconfig | 4 +-
drivers/iio/Kconfig | 4 +-
drivers/isdn/hardware/mISDN/Kconfig | 2 +-
drivers/md/Kconfig | 4 +-
drivers/md/persistent-data/Kconfig | 2 +-
drivers/net/ethernet/ti/Kconfig | 4 +-
drivers/net/usb/Kconfig | 12 +-
drivers/net/wireless/rt2x00/Kconfig | 6 +-
drivers/pci/pcie/aer/Kconfig | 2 +-
drivers/rtc/Kconfig | 8 +-
drivers/spi/Kconfig | 6 +-
drivers/staging/board/Kconfig | 2 +-
drivers/staging/emxx_udc/Kconfig | 2 +-
drivers/staging/iio/Kconfig | 4 +-
drivers/tty/serial/Kconfig | 2 +-
drivers/usb/gadget/Kconfig | 26 +-
drivers/usb/gadget/legacy/Kconfig | 2 +-
drivers/usb/gadget/udc/Kconfig | 4 +-
drivers/usb/phy/Kconfig | 2 +-
init/Kconfig | 4 +-
lib/Kconfig | 30 +-
mm/Kconfig | 22 +-
net/Kconfig | 14 +-
net/sched/Kconfig | 2 +-
scripts/kconfig/confdata.c | 22 +-
scripts/kconfig/expr.c | 10 +-
scripts/kconfig/expr.h | 2 +-
scripts/kconfig/gconf.c | 4 +-
scripts/kconfig/mconf.c | 6 +-
scripts/kconfig/menu.c | 10 +-
scripts/kconfig/nconf.c | 4 +-
scripts/kconfig/qconf.cc | 10 +-
scripts/kconfig/symbol.c | 34 +-
scripts/kconfig/zconf.gperf | 5 +-
scripts/kconfig/zconf.hash.c_shipped | 53 +-
scripts/kconfig/zconf.tab.c_shipped | 1248 +++++++++++++++-------------------
scripts/kconfig/zconf.y | 6 +-
security/integrity/Kconfig | 4 +-
security/integrity/evm/Kconfig | 2 +-
43 files changed, 737 insertions(+), 865 deletions(-)

--
2.1.0


2014-12-08 01:56:29

by Christoph Jaeger

[permalink] [raw]
Subject: [PATCH 1/3] kconfig: regenerate parser

Regenerate the Kconfig parser with Bison 3.0.2 in preparation for a following
commit. Otherwise the changes caused by the more recent Bison version would be
intermingled with functional changes.

Signed-off-by: Christoph Jaeger <[email protected]>
---
scripts/kconfig/zconf.tab.c_shipped | 1244 ++++++++++++++++-------------------
1 file changed, 561 insertions(+), 683 deletions(-)

diff --git a/scripts/kconfig/zconf.tab.c_shipped b/scripts/kconfig/zconf.tab.c_shipped
index de5e84e..0864c7d 100644
--- a/scripts/kconfig/zconf.tab.c_shipped
+++ b/scripts/kconfig/zconf.tab.c_shipped
@@ -1,19 +1,19 @@
-/* A Bison parser, made by GNU Bison 2.5. */
+/* A Bison parser, made by GNU Bison 3.0.2. */

/* Bison implementation for Yacc-like parsers in C
-
- Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
-
+
+ Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */

@@ -26,7 +26,7 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */

@@ -44,7 +44,7 @@
#define YYBISON 1

/* Bison version. */
-#define YYBISON_VERSION "2.5"
+#define YYBISON_VERSION "3.0.2"

/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -58,18 +58,16 @@
/* Pull parsers. */
#define YYPULL 1

-/* Using locations. */
-#define YYLSP_NEEDED 0

/* Substitute the variable and function names. */
#define yyparse zconfparse
#define yylex zconflex
#define yyerror zconferror
-#define yylval zconflval
-#define yychar zconfchar
#define yydebug zconfdebug
#define yynerrs zconfnerrs

+#define yylval zconflval
+#define yychar zconfchar

/* Copy the first part of user declarations. */

@@ -108,10 +106,13 @@ static struct menu *current_menu, *current_entry;



-/* Enabling traces. */
-#ifndef YYDEBUG
-# define YYDEBUG 1
-#endif
+# ifndef YY_NULLPTR
+# if defined __cplusplus && 201103L <= __cplusplus
+# define YY_NULLPTR nullptr
+# else
+# define YY_NULLPTR 0
+# endif
+# endif

/* Enabling verbose error messages. */
#ifdef YYERROR_VERBOSE
@@ -121,58 +122,60 @@ static struct menu *current_menu, *current_entry;
# define YYERROR_VERBOSE 0
#endif

-/* Enabling the token table. */
-#ifndef YYTOKEN_TABLE
-# define YYTOKEN_TABLE 0
-#endif

+/* Debug traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 1
+#endif
+#if YYDEBUG
+extern int zconfdebug;
+#endif

-/* Tokens. */
+/* Token type. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- T_MAINMENU = 258,
- T_MENU = 259,
- T_ENDMENU = 260,
- T_SOURCE = 261,
- T_CHOICE = 262,
- T_ENDCHOICE = 263,
- T_COMMENT = 264,
- T_CONFIG = 265,
- T_MENUCONFIG = 266,
- T_HELP = 267,
- T_HELPTEXT = 268,
- T_IF = 269,
- T_ENDIF = 270,
- T_DEPENDS = 271,
- T_OPTIONAL = 272,
- T_PROMPT = 273,
- T_TYPE = 274,
- T_DEFAULT = 275,
- T_SELECT = 276,
- T_RANGE = 277,
- T_VISIBLE = 278,
- T_OPTION = 279,
- T_ON = 280,
- T_WORD = 281,
- T_WORD_QUOTE = 282,
- T_UNEQUAL = 283,
- T_CLOSE_PAREN = 284,
- T_OPEN_PAREN = 285,
- T_EOL = 286,
- T_OR = 287,
- T_AND = 288,
- T_EQUAL = 289,
- T_NOT = 290
- };
+ enum yytokentype
+ {
+ T_MAINMENU = 258,
+ T_MENU = 259,
+ T_ENDMENU = 260,
+ T_SOURCE = 261,
+ T_CHOICE = 262,
+ T_ENDCHOICE = 263,
+ T_COMMENT = 264,
+ T_CONFIG = 265,
+ T_MENUCONFIG = 266,
+ T_HELP = 267,
+ T_HELPTEXT = 268,
+ T_IF = 269,
+ T_ENDIF = 270,
+ T_DEPENDS = 271,
+ T_OPTIONAL = 272,
+ T_PROMPT = 273,
+ T_TYPE = 274,
+ T_DEFAULT = 275,
+ T_SELECT = 276,
+ T_RANGE = 277,
+ T_VISIBLE = 278,
+ T_OPTION = 279,
+ T_ON = 280,
+ T_WORD = 281,
+ T_WORD_QUOTE = 282,
+ T_UNEQUAL = 283,
+ T_CLOSE_PAREN = 284,
+ T_OPEN_PAREN = 285,
+ T_EOL = 286,
+ T_OR = 287,
+ T_AND = 288,
+ T_EQUAL = 289,
+ T_NOT = 290
+ };
#endif

-
-
+/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE
+typedef union YYSTYPE YYSTYPE;
+union YYSTYPE
{


@@ -184,14 +187,18 @@ typedef union YYSTYPE
const struct kconf_id *id;


-
-} YYSTYPE;
+};
# define YYSTYPE_IS_TRIVIAL 1
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
#endif


+extern YYSTYPE zconflval;
+
+int zconfparse (void);
+
+
+
/* Copy the second part of user declarations. */


@@ -212,11 +219,8 @@ typedef unsigned char yytype_uint8;

#ifdef YYTYPE_INT8
typedef YYTYPE_INT8 yytype_int8;
-#elif (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-typedef signed char yytype_int8;
#else
-typedef short int yytype_int8;
+typedef signed char yytype_int8;
#endif

#ifdef YYTYPE_UINT16
@@ -236,8 +240,7 @@ typedef short int yytype_int16;
# define YYSIZE_T __SIZE_TYPE__
# elif defined size_t
# define YYSIZE_T size_t
-# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+# elif ! defined YYSIZE_T
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
# else
@@ -251,38 +254,67 @@ typedef short int yytype_int16;
# if defined YYENABLE_NLS && YYENABLE_NLS
# if ENABLE_NLS
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
-# define YY_(msgid) dgettext ("bison-runtime", msgid)
+# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
# endif
# endif
# ifndef YY_
-# define YY_(msgid) msgid
+# define YY_(Msgid) Msgid
+# endif
+#endif
+
+#ifndef YY_ATTRIBUTE
+# if (defined __GNUC__ \
+ && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
+ || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
+# define YY_ATTRIBUTE(Spec) __attribute__(Spec)
+# else
+# define YY_ATTRIBUTE(Spec) /* empty */
+# endif
+#endif
+
+#ifndef YY_ATTRIBUTE_PURE
+# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
+#endif
+
+#ifndef YY_ATTRIBUTE_UNUSED
+# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
+#endif
+
+#if !defined _Noreturn \
+ && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
+# if defined _MSC_VER && 1200 <= _MSC_VER
+# define _Noreturn __declspec (noreturn)
+# else
+# define _Noreturn YY_ATTRIBUTE ((__noreturn__))
# endif
#endif

/* Suppress unused-variable warnings by "using" E. */
#if ! defined lint || defined __GNUC__
-# define YYUSE(e) ((void) (e))
+# define YYUSE(E) ((void) (E))
#else
-# define YYUSE(e) /* empty */
+# define YYUSE(E) /* empty */
#endif

-/* Identity function, used to suppress warnings about constant conditions. */
-#ifndef lint
-# define YYID(n) (n)
-#else
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static int
-YYID (int yyi)
+#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
+/* Suppress an incorrect diagnostic about yylval being uninitialized. */
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
+ _Pragma ("GCC diagnostic push") \
+ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
+ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
+ _Pragma ("GCC diagnostic pop")
#else
-static int
-YYID (yyi)
- int yyi;
+# define YY_INITIAL_VALUE(Value) Value
#endif
-{
- return yyi;
-}
+#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END
#endif
+#ifndef YY_INITIAL_VALUE
+# define YY_INITIAL_VALUE(Value) /* Nothing. */
+#endif
+

#if ! defined yyoverflow || YYERROR_VERBOSE

@@ -301,9 +333,9 @@ YYID (yyi)
# define alloca _alloca
# else
# define YYSTACK_ALLOC alloca
-# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+ /* Use EXIT_SUCCESS as a witness for stdlib.h. */
# ifndef EXIT_SUCCESS
# define EXIT_SUCCESS 0
# endif
@@ -313,8 +345,8 @@ YYID (yyi)
# endif

# ifdef YYSTACK_ALLOC
- /* Pacify GCC's `empty if-body' warning. */
-# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
+ /* Pacify GCC's 'empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
# ifndef YYSTACK_ALLOC_MAXIMUM
/* The OS might guarantee only one guard page at the bottom of the stack,
and a page size can be as small as 4096 bytes. So we cannot safely
@@ -330,7 +362,7 @@ YYID (yyi)
# endif
# if (defined __cplusplus && ! defined EXIT_SUCCESS \
&& ! ((defined YYMALLOC || defined malloc) \
- && (defined YYFREE || defined free)))
+ && (defined YYFREE || defined free)))
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
# ifndef EXIT_SUCCESS
# define EXIT_SUCCESS 0
@@ -338,15 +370,13 @@ YYID (yyi)
# endif
# ifndef YYMALLOC
# define YYMALLOC malloc
-# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+# if ! defined malloc && ! defined EXIT_SUCCESS
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# ifndef YYFREE
# define YYFREE free
-# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+# if ! defined free && ! defined EXIT_SUCCESS
void free (void *); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
@@ -356,7 +386,7 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */

#if (! defined yyoverflow \
&& (! defined __cplusplus \
- || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))

/* A type that is properly aligned for any stack member. */
union yyalloc
@@ -381,35 +411,35 @@ union yyalloc
elements in the stack, and YYPTR gives the new location of the
stack. Advance YYPTR to a properly aligned location for the next
stack. */
-# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
- do \
- { \
- YYSIZE_T yynewbytes; \
- YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
- Stack = &yyptr->Stack_alloc; \
- yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
- yyptr += yynewbytes / sizeof (*yyptr); \
- } \
- while (YYID (0))
+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
+ do \
+ { \
+ YYSIZE_T yynewbytes; \
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
+ Stack = &yyptr->Stack_alloc; \
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / sizeof (*yyptr); \
+ } \
+ while (0)

#endif

#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
-/* Copy COUNT objects from FROM to TO. The source and destination do
+/* Copy COUNT objects from SRC to DST. The source and destination do
not overlap. */
# ifndef YYCOPY
# if defined __GNUC__ && 1 < __GNUC__
-# define YYCOPY(To, From, Count) \
- __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+# define YYCOPY(Dst, Src, Count) \
+ __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
# else
-# define YYCOPY(To, From, Count) \
- do \
- { \
- YYSIZE_T yyi; \
- for (yyi = 0; yyi < (Count); yyi++) \
- (To)[yyi] = (From)[yyi]; \
- } \
- while (YYID (0))
+# define YYCOPY(Dst, Src, Count) \
+ do \
+ { \
+ YYSIZE_T yyi; \
+ for (yyi = 0; yyi < (Count); yyi++) \
+ (Dst)[yyi] = (Src)[yyi]; \
+ } \
+ while (0)
# endif
# endif
#endif /* !YYCOPY_NEEDED */
@@ -425,17 +455,19 @@ union yyalloc
#define YYNNTS 50
/* YYNRULES -- Number of rules. */
#define YYNRULES 118
-/* YYNRULES -- Number of states. */
+/* YYNSTATES -- Number of states. */
#define YYNSTATES 191

-/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
+/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
+ by yylex, with out-of-bounds checking. */
#define YYUNDEFTOK 2
#define YYMAXUTOK 290

-#define YYTRANSLATE(YYX) \
+#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)

-/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
+/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
+ as returned by yylex, without out-of-bounds checking. */
static const yytype_uint8 yytranslate[] =
{
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -471,65 +503,7 @@ static const yytype_uint8 yytranslate[] =
};

#if YYDEBUG
-/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
- YYRHS. */
-static const yytype_uint16 yyprhs[] =
-{
- 0, 0, 3, 6, 8, 11, 13, 14, 17, 20,
- 23, 26, 31, 36, 40, 42, 44, 46, 48, 50,
- 52, 54, 56, 58, 60, 62, 64, 66, 68, 72,
- 75, 79, 82, 86, 89, 90, 93, 96, 99, 102,
- 105, 108, 112, 117, 122, 127, 133, 137, 138, 142,
- 143, 146, 150, 153, 155, 159, 160, 163, 166, 169,
- 172, 175, 180, 184, 187, 192, 193, 196, 200, 202,
- 206, 207, 210, 213, 216, 220, 224, 228, 230, 234,
- 235, 238, 241, 244, 248, 252, 255, 258, 261, 262,
- 265, 268, 271, 276, 277, 280, 283, 286, 287, 290,
- 292, 294, 297, 300, 303, 305, 308, 309, 312, 314,
- 318, 322, 326, 329, 333, 337, 339, 341, 342
-};
-
-/* YYRHS -- A `-1'-separated list of the rules' RHS. */
-static const yytype_int8 yyrhs[] =
-{
- 37, 0, -1, 81, 38, -1, 38, -1, 63, 39,
- -1, 39, -1, -1, 39, 41, -1, 39, 55, -1,
- 39, 67, -1, 39, 80, -1, 39, 26, 1, 31,
- -1, 39, 40, 1, 31, -1, 39, 1, 31, -1,
- 16, -1, 18, -1, 19, -1, 21, -1, 17, -1,
- 22, -1, 20, -1, 23, -1, 31, -1, 61, -1,
- 71, -1, 44, -1, 46, -1, 69, -1, 26, 1,
- 31, -1, 1, 31, -1, 10, 26, 31, -1, 43,
- 47, -1, 11, 26, 31, -1, 45, 47, -1, -1,
- 47, 48, -1, 47, 49, -1, 47, 75, -1, 47,
- 73, -1, 47, 42, -1, 47, 31, -1, 19, 78,
- 31, -1, 18, 79, 82, 31, -1, 20, 83, 82,
- 31, -1, 21, 26, 82, 31, -1, 22, 84, 84,
- 82, 31, -1, 24, 50, 31, -1, -1, 50, 26,
- 51, -1, -1, 34, 79, -1, 7, 85, 31, -1,
- 52, 56, -1, 80, -1, 53, 58, 54, -1, -1,
- 56, 57, -1, 56, 75, -1, 56, 73, -1, 56,
- 31, -1, 56, 42, -1, 18, 79, 82, 31, -1,
- 19, 78, 31, -1, 17, 31, -1, 20, 26, 82,
- 31, -1, -1, 58, 41, -1, 14, 83, 81, -1,
- 80, -1, 59, 62, 60, -1, -1, 62, 41, -1,
- 62, 67, -1, 62, 55, -1, 3, 79, 81, -1,
- 4, 79, 31, -1, 64, 76, 74, -1, 80, -1,
- 65, 68, 66, -1, -1, 68, 41, -1, 68, 67,
- -1, 68, 55, -1, 6, 79, 31, -1, 9, 79,
- 31, -1, 70, 74, -1, 12, 31, -1, 72, 13,
- -1, -1, 74, 75, -1, 74, 31, -1, 74, 42,
- -1, 16, 25, 83, 31, -1, -1, 76, 77, -1,
- 76, 31, -1, 23, 82, -1, -1, 79, 82, -1,
- 26, -1, 27, -1, 5, 31, -1, 8, 31, -1,
- 15, 31, -1, 31, -1, 81, 31, -1, -1, 14,
- 83, -1, 84, -1, 84, 34, 84, -1, 84, 28,
- 84, -1, 30, 83, 29, -1, 35, 83, -1, 83,
- 32, 83, -1, 83, 33, 83, -1, 26, -1, 27,
- -1, -1, 26, -1
-};
-
-/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
+ /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
0, 103, 103, 103, 105, 105, 107, 109, 110, 111,
@@ -547,7 +521,7 @@ static const yytype_uint16 yyrline[] =
};
#endif

-#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+#if YYDEBUG || YYERROR_VERBOSE || 0
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] =
@@ -568,13 +542,13 @@ static const char *const yytname[] =
"menu_entry", "menu_end", "menu_stmt", "menu_block", "source_stmt",
"comment", "comment_stmt", "help_start", "help", "depends_list",
"depends", "visibility_list", "visible", "prompt_stmt_opt", "prompt",
- "end", "nl", "if_expr", "expr", "symbol", "word_opt", 0
+ "end", "nl", "if_expr", "expr", "symbol", "word_opt", YY_NULLPTR
};
#endif

# ifdef YYPRINT
-/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
- token YYLEX-NUM. */
+/* YYTOKNUM[NUM] -- (External) token number corresponding to the
+ (internal) symbol number NUM (which must be that of a token). */
static const yytype_uint16 yytoknum[] =
{
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
@@ -584,80 +558,18 @@ static const yytype_uint16 yytoknum[] =
};
# endif

-/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
-static const yytype_uint8 yyr1[] =
-{
- 0, 36, 37, 37, 38, 38, 39, 39, 39, 39,
- 39, 39, 39, 39, 40, 40, 40, 40, 40, 40,
- 40, 40, 41, 41, 41, 41, 41, 41, 42, 42,
- 43, 44, 45, 46, 47, 47, 47, 47, 47, 47,
- 47, 48, 48, 48, 48, 48, 49, 50, 50, 51,
- 51, 52, 53, 54, 55, 56, 56, 56, 56, 56,
- 56, 57, 57, 57, 57, 58, 58, 59, 60, 61,
- 62, 62, 62, 62, 63, 64, 65, 66, 67, 68,
- 68, 68, 68, 69, 70, 71, 72, 73, 74, 74,
- 74, 74, 75, 76, 76, 76, 77, 78, 78, 79,
- 79, 80, 80, 80, 81, 81, 82, 82, 83, 83,
- 83, 83, 83, 83, 83, 84, 84, 85, 85
-};
+#define YYPACT_NINF -90

-/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
-static const yytype_uint8 yyr2[] =
-{
- 0, 2, 2, 1, 2, 1, 0, 2, 2, 2,
- 2, 4, 4, 3, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 3, 2,
- 3, 2, 3, 2, 0, 2, 2, 2, 2, 2,
- 2, 3, 4, 4, 4, 5, 3, 0, 3, 0,
- 2, 3, 2, 1, 3, 0, 2, 2, 2, 2,
- 2, 4, 3, 2, 4, 0, 2, 3, 1, 3,
- 0, 2, 2, 2, 3, 3, 3, 1, 3, 0,
- 2, 2, 2, 3, 3, 2, 2, 2, 0, 2,
- 2, 2, 4, 0, 2, 2, 2, 0, 2, 1,
- 1, 2, 2, 2, 1, 2, 0, 2, 1, 3,
- 3, 3, 2, 3, 3, 1, 1, 0, 1
-};
+#define yypact_value_is_default(Yystate) \
+ (!!((Yystate) == (-90)))

-/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
- Performed when YYTABLE doesn't specify something else to do. Zero
- means the default is an error. */
-static const yytype_uint8 yydefact[] =
-{
- 6, 0, 104, 0, 3, 0, 6, 6, 99, 100,
- 0, 1, 0, 0, 0, 0, 117, 0, 0, 0,
- 0, 0, 0, 14, 18, 15, 16, 20, 17, 19,
- 21, 0, 22, 0, 7, 34, 25, 34, 26, 55,
- 65, 8, 70, 23, 93, 79, 9, 27, 88, 24,
- 10, 0, 105, 2, 74, 13, 0, 101, 0, 118,
- 0, 102, 0, 0, 0, 115, 116, 0, 0, 0,
- 108, 103, 0, 0, 0, 0, 0, 0, 0, 88,
- 0, 0, 75, 83, 51, 84, 30, 32, 0, 112,
- 0, 0, 67, 0, 0, 11, 12, 0, 0, 0,
- 0, 97, 0, 0, 0, 47, 0, 40, 39, 35,
- 36, 0, 38, 37, 0, 0, 97, 0, 59, 60,
- 56, 58, 57, 66, 54, 53, 71, 73, 69, 72,
- 68, 106, 95, 0, 94, 80, 82, 78, 81, 77,
- 90, 91, 89, 111, 113, 114, 110, 109, 29, 86,
- 0, 106, 0, 106, 106, 106, 0, 0, 0, 87,
- 63, 106, 0, 106, 0, 96, 0, 0, 41, 98,
- 0, 0, 106, 49, 46, 28, 0, 62, 0, 107,
- 92, 42, 43, 44, 0, 0, 48, 61, 64, 45,
- 50
-};
+#define YYTABLE_NINF -86

-/* YYDEFGOTO[NTERM-NUM]. */
-static const yytype_int16 yydefgoto[] =
-{
- -1, 3, 4, 5, 33, 34, 108, 35, 36, 37,
- 38, 74, 109, 110, 157, 186, 39, 40, 124, 41,
- 76, 120, 77, 42, 128, 43, 78, 6, 44, 45,
- 137, 46, 80, 47, 48, 49, 111, 112, 81, 113,
- 79, 134, 152, 153, 50, 7, 165, 69, 70, 60
-};
+#define yytable_value_is_error(Yytable_value) \
+ 0

-/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
- STATE-NUM. */
-#define YYPACT_NINF -90
+ /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+ STATE-NUM. */
static const yytype_int16 yypact[] =
{
4, 42, -90, 96, -90, 111, -90, 15, -90, -90,
@@ -682,7 +594,34 @@ static const yytype_int16 yypact[] =
-90
};

-/* YYPGOTO[NTERM-NUM]. */
+ /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
+ Performed when YYTABLE does not specify something else to do. Zero
+ means the default is an error. */
+static const yytype_uint8 yydefact[] =
+{
+ 6, 0, 104, 0, 3, 0, 6, 6, 99, 100,
+ 0, 1, 0, 0, 0, 0, 117, 0, 0, 0,
+ 0, 0, 0, 14, 18, 15, 16, 20, 17, 19,
+ 21, 0, 22, 0, 7, 34, 25, 34, 26, 55,
+ 65, 8, 70, 23, 93, 79, 9, 27, 88, 24,
+ 10, 0, 105, 2, 74, 13, 0, 101, 0, 118,
+ 0, 102, 0, 0, 0, 115, 116, 0, 0, 0,
+ 108, 103, 0, 0, 0, 0, 0, 0, 0, 88,
+ 0, 0, 75, 83, 51, 84, 30, 32, 0, 112,
+ 0, 0, 67, 0, 0, 11, 12, 0, 0, 0,
+ 0, 97, 0, 0, 0, 47, 0, 40, 39, 35,
+ 36, 0, 38, 37, 0, 0, 97, 0, 59, 60,
+ 56, 58, 57, 66, 54, 53, 71, 73, 69, 72,
+ 68, 106, 95, 0, 94, 80, 82, 78, 81, 77,
+ 90, 91, 89, 111, 113, 114, 110, 109, 29, 86,
+ 0, 106, 0, 106, 106, 106, 0, 0, 0, 87,
+ 63, 106, 0, 106, 0, 96, 0, 0, 41, 98,
+ 0, 0, 106, 49, 46, 28, 0, 62, 0, 107,
+ 92, 42, 43, 44, 0, 0, 48, 61, 64, 45,
+ 50
+};
+
+ /* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
-90, -90, 269, 271, -90, 23, -70, -90, -90, -90,
@@ -692,10 +631,19 @@ static const yytype_int16 yypgoto[] =
-90, -90, 169, -1, 27, -7, 118, -66, -89, -90
};

-/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
- positive, shift that token. If negative, reduce the rule which
- number is the opposite. If YYTABLE_NINF, syntax error. */
-#define YYTABLE_NINF -86
+ /* YYDEFGOTO[NTERM-NUM]. */
+static const yytype_int16 yydefgoto[] =
+{
+ -1, 3, 4, 5, 33, 34, 108, 35, 36, 37,
+ 38, 74, 109, 110, 157, 186, 39, 40, 124, 41,
+ 76, 120, 77, 42, 128, 43, 78, 6, 44, 45,
+ 137, 46, 80, 47, 48, 49, 111, 112, 81, 113,
+ 79, 134, 152, 153, 50, 7, 165, 69, 70, 60
+};
+
+ /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
+ positive, shift that token. If negative, reduce the rule whose
+ number is the opposite. If YYTABLE_NINF, syntax error. */
static const yytype_int16 yytable[] =
{
10, 88, 89, 54, 146, 147, 119, 1, 122, 164,
@@ -730,12 +678,6 @@ static const yytype_int16 yytable[] =
184
};

-#define yypact_value_is_default(yystate) \
- ((yystate) == (-90))
-
-#define yytable_value_is_error(yytable_value) \
- YYID (0)
-
static const yytype_int16 yycheck[] =
{
1, 67, 68, 10, 93, 94, 76, 3, 76, 14,
@@ -770,8 +712,8 @@ static const yytype_int16 yycheck[] =
172
};

-/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
- symbol of state STATE-NUM. */
+ /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+ symbol of state STATE-NUM. */
static const yytype_uint8 yystos[] =
{
0, 3, 31, 37, 38, 39, 63, 81, 26, 27,
@@ -796,94 +738,75 @@ static const yytype_uint8 yystos[] =
79
};

-#define yyerrok (yyerrstatus = 0)
-#define yyclearin (yychar = YYEMPTY)
-#define YYEMPTY (-2)
-#define YYEOF 0
-
-#define YYACCEPT goto yyacceptlab
-#define YYABORT goto yyabortlab
-#define YYERROR goto yyerrorlab
-
-
-/* Like YYERROR except do call yyerror. This remains here temporarily
- to ease the transition to the new meaning of YYERROR, for GCC.
- Once GCC version 2 has supplanted version 1, this can go. However,
- YYFAIL appears to be in use. Nevertheless, it is formally deprecated
- in Bison 2.4.2's NEWS entry, where a plan to phase it out is
- discussed. */
-
-#define YYFAIL goto yyerrlab
-#if defined YYFAIL
- /* This is here to suppress warnings from the GCC cpp's
- -Wunused-macros. Normally we don't worry about that warning, but
- some users do, and we want to make it easy for users to remove
- YYFAIL uses, which will produce warnings from Bison 2.5. */
-#endif
+ /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
+static const yytype_uint8 yyr1[] =
+{
+ 0, 36, 37, 37, 38, 38, 39, 39, 39, 39,
+ 39, 39, 39, 39, 40, 40, 40, 40, 40, 40,
+ 40, 40, 41, 41, 41, 41, 41, 41, 42, 42,
+ 43, 44, 45, 46, 47, 47, 47, 47, 47, 47,
+ 47, 48, 48, 48, 48, 48, 49, 50, 50, 51,
+ 51, 52, 53, 54, 55, 56, 56, 56, 56, 56,
+ 56, 57, 57, 57, 57, 58, 58, 59, 60, 61,
+ 62, 62, 62, 62, 63, 64, 65, 66, 67, 68,
+ 68, 68, 68, 69, 70, 71, 72, 73, 74, 74,
+ 74, 74, 75, 76, 76, 76, 77, 78, 78, 79,
+ 79, 80, 80, 80, 81, 81, 82, 82, 83, 83,
+ 83, 83, 83, 83, 83, 84, 84, 85, 85
+};

-#define YYRECOVERING() (!!yyerrstatus)
+ /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
+static const yytype_uint8 yyr2[] =
+{
+ 0, 2, 2, 1, 2, 1, 0, 2, 2, 2,
+ 2, 4, 4, 3, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 3, 2,
+ 3, 2, 3, 2, 0, 2, 2, 2, 2, 2,
+ 2, 3, 4, 4, 4, 5, 3, 0, 3, 0,
+ 2, 3, 2, 1, 3, 0, 2, 2, 2, 2,
+ 2, 4, 3, 2, 4, 0, 2, 3, 1, 3,
+ 0, 2, 2, 2, 3, 3, 3, 1, 3, 0,
+ 2, 2, 2, 3, 3, 2, 2, 2, 0, 2,
+ 2, 2, 4, 0, 2, 2, 2, 0, 2, 1,
+ 1, 2, 2, 2, 1, 2, 0, 2, 1, 3,
+ 3, 3, 2, 3, 3, 1, 1, 0, 1
+};

-#define YYBACKUP(Token, Value) \
-do \
- if (yychar == YYEMPTY && yylen == 1) \
- { \
- yychar = (Token); \
- yylval = (Value); \
- YYPOPSTACK (1); \
- goto yybackup; \
- } \
- else \
- { \
- yyerror (YY_("syntax error: cannot back up")); \
- YYERROR; \
- } \
-while (YYID (0))
-
-
-#define YYTERROR 1
-#define YYERRCODE 256
-
-
-/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
- If N is 0, then set CURRENT to the empty location which ends
- the previous symbol: RHS[0] (always defined). */
-
-#define YYRHSLOC(Rhs, K) ((Rhs)[K])
-#ifndef YYLLOC_DEFAULT
-# define YYLLOC_DEFAULT(Current, Rhs, N) \
- do \
- if (YYID (N)) \
- { \
- (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
- (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
- (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
- (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
- } \
- else \
- { \
- (Current).first_line = (Current).last_line = \
- YYRHSLOC (Rhs, 0).last_line; \
- (Current).first_column = (Current).last_column = \
- YYRHSLOC (Rhs, 0).last_column; \
- } \
- while (YYID (0))
-#endif

+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+#define YYEMPTY (-2)
+#define YYEOF 0

-/* This macro is provided for backward compatibility. */
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrorlab

-#ifndef YY_LOCATION_PRINT
-# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
-#endif

+#define YYRECOVERING() (!!yyerrstatus)
+
+#define YYBACKUP(Token, Value) \
+do \
+ if (yychar == YYEMPTY) \
+ { \
+ yychar = (Token); \
+ yylval = (Value); \
+ YYPOPSTACK (yylen); \
+ yystate = *yyssp; \
+ goto yybackup; \
+ } \
+ else \
+ { \
+ yyerror (YY_("syntax error: cannot back up")); \
+ YYERROR; \
+ } \
+while (0)
+
+/* Error token number */
+#define YYTERROR 1
+#define YYERRCODE 256

-/* YYLEX -- calling `yylex' with the right arguments. */

-#ifdef YYLEX_PARAM
-# define YYLEX yylex (YYLEX_PARAM)
-#else
-# define YYLEX yylex ()
-#endif

/* Enable debugging if requested. */
#if YYDEBUG
@@ -893,54 +816,46 @@ while (YYID (0))
# define YYFPRINTF fprintf
# endif

-# define YYDPRINTF(Args) \
-do { \
- if (yydebug) \
- YYFPRINTF Args; \
-} while (YYID (0))
+# define YYDPRINTF(Args) \
+do { \
+ if (yydebug) \
+ YYFPRINTF Args; \
+} while (0)

-# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
-do { \
- if (yydebug) \
- { \
- YYFPRINTF (stderr, "%s ", Title); \
- yy_symbol_print (stderr, \
- Type, Value); \
- YYFPRINTF (stderr, "\n"); \
- } \
-} while (YYID (0))
+/* This macro is provided for backward compatibility. */
+#ifndef YY_LOCATION_PRINT
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+#endif


-/*--------------------------------.
-| Print this symbol on YYOUTPUT. |
-`--------------------------------*/
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yy_symbol_print (stderr, \
+ Type, Value); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (0)
+
+
+/*----------------------------------------.
+| Print this symbol's value on YYOUTPUT. |
+`----------------------------------------*/

-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static void
yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
-#else
-static void
-yy_symbol_value_print (yyoutput, yytype, yyvaluep)
- FILE *yyoutput;
- int yytype;
- YYSTYPE const * const yyvaluep;
-#endif
{
+ FILE *yyo = yyoutput;
+ YYUSE (yyo);
if (!yyvaluep)
return;
# ifdef YYPRINT
if (yytype < YYNTOKENS)
YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
-# else
- YYUSE (yyoutput);
# endif
- switch (yytype)
- {
- default:
- break;
- }
+ YYUSE (yytype);
}


@@ -948,22 +863,11 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep)
| Print this symbol on YYOUTPUT. |
`--------------------------------*/

-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static void
yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
-#else
-static void
-yy_symbol_print (yyoutput, yytype, yyvaluep)
- FILE *yyoutput;
- int yytype;
- YYSTYPE const * const yyvaluep;
-#endif
{
- if (yytype < YYNTOKENS)
- YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
- else
- YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+ YYFPRINTF (yyoutput, "%s %s (",
+ yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);

yy_symbol_value_print (yyoutput, yytype, yyvaluep);
YYFPRINTF (yyoutput, ")");
@@ -974,16 +878,8 @@ yy_symbol_print (yyoutput, yytype, yyvaluep)
| TOP (included). |
`------------------------------------------------------------------*/

-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static void
yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
-#else
-static void
-yy_stack_print (yybottom, yytop)
- yytype_int16 *yybottom;
- yytype_int16 *yytop;
-#endif
{
YYFPRINTF (stderr, "Stack now");
for (; yybottom <= yytop; yybottom++)
@@ -994,49 +890,42 @@ yy_stack_print (yybottom, yytop)
YYFPRINTF (stderr, "\n");
}

-# define YY_STACK_PRINT(Bottom, Top) \
-do { \
- if (yydebug) \
- yy_stack_print ((Bottom), (Top)); \
-} while (YYID (0))
+# define YY_STACK_PRINT(Bottom, Top) \
+do { \
+ if (yydebug) \
+ yy_stack_print ((Bottom), (Top)); \
+} while (0)


/*------------------------------------------------.
| Report that the YYRULE is going to be reduced. |
`------------------------------------------------*/

-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
-#else
static void
-yy_reduce_print (yyvsp, yyrule)
- YYSTYPE *yyvsp;
- int yyrule;
-#endif
+yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
{
+ unsigned long int yylno = yyrline[yyrule];
int yynrhs = yyr2[yyrule];
int yyi;
- unsigned long int yylno = yyrline[yyrule];
YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
- yyrule - 1, yylno);
+ yyrule - 1, yylno);
/* The symbols being reduced. */
for (yyi = 0; yyi < yynrhs; yyi++)
{
YYFPRINTF (stderr, " $%d = ", yyi + 1);
- yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
- &(yyvsp[(yyi + 1) - (yynrhs)])
- );
+ yy_symbol_print (stderr,
+ yystos[yyssp[yyi + 1 - yynrhs]],
+ &(yyvsp[(yyi + 1) - (yynrhs)])
+ );
YYFPRINTF (stderr, "\n");
}
}

-# define YY_REDUCE_PRINT(Rule) \
-do { \
- if (yydebug) \
- yy_reduce_print (yyvsp, Rule); \
-} while (YYID (0))
+# define YY_REDUCE_PRINT(Rule) \
+do { \
+ if (yydebug) \
+ yy_reduce_print (yyssp, yyvsp, Rule); \
+} while (0)

/* Nonzero means print parse trace. It is left uninitialized so that
multiple parsers can coexist. */
@@ -1050,7 +939,7 @@ int yydebug;


/* YYINITDEPTH -- initial size of the parser's stacks. */
-#ifndef YYINITDEPTH
+#ifndef YYINITDEPTH
# define YYINITDEPTH 200
#endif

@@ -1073,15 +962,8 @@ int yydebug;
# define yystrlen strlen
# else
/* Return the length of YYSTR. */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static YYSIZE_T
yystrlen (const char *yystr)
-#else
-static YYSIZE_T
-yystrlen (yystr)
- const char *yystr;
-#endif
{
YYSIZE_T yylen;
for (yylen = 0; yystr[yylen]; yylen++)
@@ -1097,16 +979,8 @@ yystrlen (yystr)
# else
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
YYDEST. */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static char *
yystpcpy (char *yydest, const char *yysrc)
-#else
-static char *
-yystpcpy (yydest, yysrc)
- char *yydest;
- const char *yysrc;
-#endif
{
char *yyd = yydest;
const char *yys = yysrc;
@@ -1136,27 +1010,27 @@ yytnamerr (char *yyres, const char *yystr)
char const *yyp = yystr;

for (;;)
- switch (*++yyp)
- {
- case '\'':
- case ',':
- goto do_not_strip_quotes;
-
- case '\\':
- if (*++yyp != '\\')
- goto do_not_strip_quotes;
- /* Fall through. */
- default:
- if (yyres)
- yyres[yyn] = *yyp;
- yyn++;
- break;
-
- case '"':
- if (yyres)
- yyres[yyn] = '\0';
- return yyn;
- }
+ switch (*++yyp)
+ {
+ case '\'':
+ case ',':
+ goto do_not_strip_quotes;
+
+ case '\\':
+ if (*++yyp != '\\')
+ goto do_not_strip_quotes;
+ /* Fall through. */
+ default:
+ if (yyres)
+ yyres[yyn] = *yyp;
+ yyn++;
+ break;
+
+ case '"':
+ if (yyres)
+ yyres[yyn] = '\0';
+ return yyn;
+ }
do_not_strip_quotes: ;
}

@@ -1179,12 +1053,11 @@ static int
yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
yytype_int16 *yyssp, int yytoken)
{
- YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
+ YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
YYSIZE_T yysize = yysize0;
- YYSIZE_T yysize1;
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
/* Internationalized format string. */
- const char *yyformat = 0;
+ const char *yyformat = YY_NULLPTR;
/* Arguments of yyformat. */
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
/* Number of reported tokens (one for the "unexpected", one per
@@ -1192,10 +1065,6 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
int yycount = 0;

/* There are many possibilities here to consider:
- - Assume YYFAIL is not used. It's too flawed to consider. See
- <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
- for details. YYERROR is fine as it does not invoke this
- function.
- If this state is a consistent state with a default action, then
the only way this function was invoked is if the default action
is an error action. In that case, don't check for expected
@@ -1244,11 +1113,13 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
break;
}
yyarg[yycount++] = yytname[yyx];
- yysize1 = yysize + yytnamerr (0, yytname[yyx]);
- if (! (yysize <= yysize1
- && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
- return 2;
- yysize = yysize1;
+ {
+ YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
+ if (! (yysize <= yysize1
+ && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+ return 2;
+ yysize = yysize1;
+ }
}
}
}
@@ -1268,10 +1139,12 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
# undef YYCASE_
}

- yysize1 = yysize + yystrlen (yyformat);
- if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
- return 2;
- yysize = yysize1;
+ {
+ YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
+ if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+ return 2;
+ yysize = yysize1;
+ }

if (*yymsg_alloc < yysize)
{
@@ -1308,78 +1181,58 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
| Release the memory associated to this symbol. |
`-----------------------------------------------*/

-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static void
yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
-#else
-static void
-yydestruct (yymsg, yytype, yyvaluep)
- const char *yymsg;
- int yytype;
- YYSTYPE *yyvaluep;
-#endif
{
YYUSE (yyvaluep);
-
if (!yymsg)
yymsg = "Deleting";
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);

+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
switch (yytype)
{
- case 53: /* "choice_entry" */
+ case 53: /* choice_entry */

- {
+ {
fprintf(stderr, "%s:%d: missing end statement for this entry\n",
- (yyvaluep->menu)->file->name, (yyvaluep->menu)->lineno);
- if (current_menu == (yyvaluep->menu))
+ ((*yyvaluep).menu)->file->name, ((*yyvaluep).menu)->lineno);
+ if (current_menu == ((*yyvaluep).menu))
menu_end_menu();
-};
+}
+
+ break;

- break;
- case 59: /* "if_entry" */
+ case 59: /* if_entry */

- {
+ {
fprintf(stderr, "%s:%d: missing end statement for this entry\n",
- (yyvaluep->menu)->file->name, (yyvaluep->menu)->lineno);
- if (current_menu == (yyvaluep->menu))
+ ((*yyvaluep).menu)->file->name, ((*yyvaluep).menu)->lineno);
+ if (current_menu == ((*yyvaluep).menu))
menu_end_menu();
-};
+}
+
+ break;

- break;
- case 65: /* "menu_entry" */
+ case 65: /* menu_entry */

- {
+ {
fprintf(stderr, "%s:%d: missing end statement for this entry\n",
- (yyvaluep->menu)->file->name, (yyvaluep->menu)->lineno);
- if (current_menu == (yyvaluep->menu))
+ ((*yyvaluep).menu)->file->name, ((*yyvaluep).menu)->lineno);
+ if (current_menu == ((*yyvaluep).menu))
menu_end_menu();
-};
+}
+
+ break;

- break;

default:
- break;
+ break;
}
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
}


-/* Prevent warnings from -Wmissing-prototypes. */
-#ifdef YYPARSE_PARAM
-#if defined __STDC__ || defined __cplusplus
-int yyparse (void *YYPARSE_PARAM);
-#else
-int yyparse ();
-#endif
-#else /* ! YYPARSE_PARAM */
-#if defined __STDC__ || defined __cplusplus
-int yyparse (void);
-#else
-int yyparse ();
-#endif
-#endif /* ! YYPARSE_PARAM */


/* The lookahead symbol. */
@@ -1387,7 +1240,6 @@ int yychar;

/* The semantic value of the lookahead symbol. */
YYSTYPE yylval;
-
/* Number of syntax errors so far. */
int yynerrs;

@@ -1396,37 +1248,18 @@ int yynerrs;
| yyparse. |
`----------*/

-#ifdef YYPARSE_PARAM
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-int
-yyparse (void *YYPARSE_PARAM)
-#else
-int
-yyparse (YYPARSE_PARAM)
- void *YYPARSE_PARAM;
-#endif
-#else /* ! YYPARSE_PARAM */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
int
yyparse (void)
-#else
-int
-yyparse ()
-
-#endif
-#endif
{
int yystate;
/* Number of tokens to shift before error messages enabled. */
int yyerrstatus;

/* The stacks and their tools:
- `yyss': related to states.
- `yyvs': related to semantic values.
+ 'yyss': related to states.
+ 'yyvs': related to semantic values.

- Refer to the stacks thru separate pointers, to allow yyoverflow
+ Refer to the stacks through separate pointers, to allow yyoverflow
to reallocate them elsewhere. */

/* The state stack. */
@@ -1444,7 +1277,7 @@ yyparse ()
int yyn;
int yyresult;
/* Lookahead token as an internal (translated) token number. */
- int yytoken;
+ int yytoken = 0;
/* The variables used to return semantic value and location from the
action routines. */
YYSTYPE yyval;
@@ -1462,9 +1295,8 @@ yyparse ()
Keep to zero when no symbol should be popped. */
int yylen = 0;

- yytoken = 0;
- yyss = yyssa;
- yyvs = yyvsa;
+ yyssp = yyss = yyssa;
+ yyvsp = yyvs = yyvsa;
yystacksize = YYINITDEPTH;

YYDPRINTF ((stderr, "Starting parse\n"));
@@ -1473,14 +1305,6 @@ yyparse ()
yyerrstatus = 0;
yynerrs = 0;
yychar = YYEMPTY; /* Cause a token to be read. */
-
- /* Initialize stack pointers.
- Waste one element of value and location stack
- so that they stay on the same level as the state stack.
- The wasted elements are never initialized. */
- yyssp = yyss;
- yyvsp = yyvs;
-
goto yysetstate;

/*------------------------------------------------------------.
@@ -1501,23 +1325,23 @@ yyparse ()

#ifdef yyoverflow
{
- /* Give user a chance to reallocate the stack. Use copies of
- these so that the &'s don't force the real ones into
- memory. */
- YYSTYPE *yyvs1 = yyvs;
- yytype_int16 *yyss1 = yyss;
-
- /* Each stack pointer address is followed by the size of the
- data in use in that stack, in bytes. This used to be a
- conditional around just the two extra args, but that might
- be undefined if yyoverflow is a macro. */
- yyoverflow (YY_("memory exhausted"),
- &yyss1, yysize * sizeof (*yyssp),
- &yyvs1, yysize * sizeof (*yyvsp),
- &yystacksize);
-
- yyss = yyss1;
- yyvs = yyvs1;
+ /* Give user a chance to reallocate the stack. Use copies of
+ these so that the &'s don't force the real ones into
+ memory. */
+ YYSTYPE *yyvs1 = yyvs;
+ yytype_int16 *yyss1 = yyss;
+
+ /* Each stack pointer address is followed by the size of the
+ data in use in that stack, in bytes. This used to be a
+ conditional around just the two extra args, but that might
+ be undefined if yyoverflow is a macro. */
+ yyoverflow (YY_("memory exhausted"),
+ &yyss1, yysize * sizeof (*yyssp),
+ &yyvs1, yysize * sizeof (*yyvsp),
+ &yystacksize);
+
+ yyss = yyss1;
+ yyvs = yyvs1;
}
#else /* no yyoverflow */
# ifndef YYSTACK_RELOCATE
@@ -1525,22 +1349,22 @@ yyparse ()
# else
/* Extend the stack our own way. */
if (YYMAXDEPTH <= yystacksize)
- goto yyexhaustedlab;
+ goto yyexhaustedlab;
yystacksize *= 2;
if (YYMAXDEPTH < yystacksize)
- yystacksize = YYMAXDEPTH;
+ yystacksize = YYMAXDEPTH;

{
- yytype_int16 *yyss1 = yyss;
- union yyalloc *yyptr =
- (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
- if (! yyptr)
- goto yyexhaustedlab;
- YYSTACK_RELOCATE (yyss_alloc, yyss);
- YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+ yytype_int16 *yyss1 = yyss;
+ union yyalloc *yyptr =
+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+ if (! yyptr)
+ goto yyexhaustedlab;
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# undef YYSTACK_RELOCATE
- if (yyss1 != yyssa)
- YYSTACK_FREE (yyss1);
+ if (yyss1 != yyssa)
+ YYSTACK_FREE (yyss1);
}
# endif
#endif /* no yyoverflow */
@@ -1549,10 +1373,10 @@ yyparse ()
yyvsp = yyvs + yysize - 1;

YYDPRINTF ((stderr, "Stack size increased to %lu\n",
- (unsigned long int) yystacksize));
+ (unsigned long int) yystacksize));

if (yyss + yystacksize - 1 <= yyssp)
- YYABORT;
+ YYABORT;
}

YYDPRINTF ((stderr, "Entering state %d\n", yystate));
@@ -1581,7 +1405,7 @@ yybackup:
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
- yychar = YYLEX;
+ yychar = yylex ();
}

if (yychar <= YYEOF)
@@ -1621,7 +1445,9 @@ yybackup:
yychar = YYEMPTY;

yystate = yyn;
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
*++yyvsp = yylval;
+ YY_IGNORE_MAYBE_UNINITIALIZED_END

goto yynewstate;

@@ -1644,7 +1470,7 @@ yyreduce:
yylen = yyr2[yyn];

/* If YYLEN is nonzero, implement the default value of the action:
- `$$ = $1'.
+ '$$ = $1'.

Otherwise, the following line sets YYVAL to garbage.
This behavior is undocumented and Bison
@@ -1660,43 +1486,50 @@ yyreduce:
case 10:

{ zconf_error("unexpected end statement"); }
+
break;

case 11:

- { zconf_error("unknown statement \"%s\"", (yyvsp[(2) - (4)].string)); }
+ { zconf_error("unknown statement \"%s\"", (yyvsp[-2].string)); }
+
break;

case 12:

{
- zconf_error("unexpected option \"%s\"", kconf_id_strings + (yyvsp[(2) - (4)].id)->name);
+ zconf_error("unexpected option \"%s\"", kconf_id_strings + (yyvsp[-2].id)->name);
}
+
break;

case 13:

{ zconf_error("invalid statement"); }
+
break;

case 28:

- { zconf_error("unknown option \"%s\"", (yyvsp[(1) - (3)].string)); }
+ { zconf_error("unknown option \"%s\"", (yyvsp[-2].string)); }
+
break;

case 29:

{ zconf_error("invalid option"); }
+
break;

case 30:

{
- struct symbol *sym = sym_lookup((yyvsp[(2) - (3)].string), 0);
+ struct symbol *sym = sym_lookup((yyvsp[-1].string), 0);
sym->flags |= SYMBOL_OPTIONAL;
menu_add_entry(sym);
- printd(DEBUG_PARSE, "%s:%d:config %s\n", zconf_curname(), zconf_lineno(), (yyvsp[(2) - (3)].string));
+ printd(DEBUG_PARSE, "%s:%d:config %s\n", zconf_curname(), zconf_lineno(), (yyvsp[-1].string));
}
+
break;

case 31:
@@ -1705,16 +1538,18 @@ yyreduce:
menu_end_entry();
printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno());
}
+
break;

case 32:

{
- struct symbol *sym = sym_lookup((yyvsp[(2) - (3)].string), 0);
+ struct symbol *sym = sym_lookup((yyvsp[-1].string), 0);
sym->flags |= SYMBOL_OPTIONAL;
menu_add_entry(sym);
- printd(DEBUG_PARSE, "%s:%d:menuconfig %s\n", zconf_curname(), zconf_lineno(), (yyvsp[(2) - (3)].string));
+ printd(DEBUG_PARSE, "%s:%d:menuconfig %s\n", zconf_curname(), zconf_lineno(), (yyvsp[-1].string));
}
+
break;

case 33:
@@ -1727,85 +1562,95 @@ yyreduce:
menu_end_entry();
printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno());
}
+
break;

case 41:

{
- menu_set_type((yyvsp[(1) - (3)].id)->stype);
+ menu_set_type((yyvsp[-2].id)->stype);
printd(DEBUG_PARSE, "%s:%d:type(%u)\n",
zconf_curname(), zconf_lineno(),
- (yyvsp[(1) - (3)].id)->stype);
+ (yyvsp[-2].id)->stype);
}
+
break;

case 42:

{
- menu_add_prompt(P_PROMPT, (yyvsp[(2) - (4)].string), (yyvsp[(3) - (4)].expr));
+ menu_add_prompt(P_PROMPT, (yyvsp[-2].string), (yyvsp[-1].expr));
printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno());
}
+
break;

case 43:

{
- menu_add_expr(P_DEFAULT, (yyvsp[(2) - (4)].expr), (yyvsp[(3) - (4)].expr));
- if ((yyvsp[(1) - (4)].id)->stype != S_UNKNOWN)
- menu_set_type((yyvsp[(1) - (4)].id)->stype);
+ menu_add_expr(P_DEFAULT, (yyvsp[-2].expr), (yyvsp[-1].expr));
+ if ((yyvsp[-3].id)->stype != S_UNKNOWN)
+ menu_set_type((yyvsp[-3].id)->stype);
printd(DEBUG_PARSE, "%s:%d:default(%u)\n",
zconf_curname(), zconf_lineno(),
- (yyvsp[(1) - (4)].id)->stype);
+ (yyvsp[-3].id)->stype);
}
+
break;

case 44:

{
- menu_add_symbol(P_SELECT, sym_lookup((yyvsp[(2) - (4)].string), 0), (yyvsp[(3) - (4)].expr));
+ menu_add_symbol(P_SELECT, sym_lookup((yyvsp[-2].string), 0), (yyvsp[-1].expr));
printd(DEBUG_PARSE, "%s:%d:select\n", zconf_curname(), zconf_lineno());
}
+
break;

case 45:

{
- menu_add_expr(P_RANGE, expr_alloc_comp(E_RANGE,(yyvsp[(2) - (5)].symbol), (yyvsp[(3) - (5)].symbol)), (yyvsp[(4) - (5)].expr));
+ menu_add_expr(P_RANGE, expr_alloc_comp(E_RANGE,(yyvsp[-3].symbol), (yyvsp[-2].symbol)), (yyvsp[-1].expr));
printd(DEBUG_PARSE, "%s:%d:range\n", zconf_curname(), zconf_lineno());
}
+
break;

case 48:

{
- const struct kconf_id *id = kconf_id_lookup((yyvsp[(2) - (3)].string), strlen((yyvsp[(2) - (3)].string)));
+ const struct kconf_id *id = kconf_id_lookup((yyvsp[-1].string), strlen((yyvsp[-1].string)));
if (id && id->flags & TF_OPTION)
- menu_add_option(id->token, (yyvsp[(3) - (3)].string));
+ menu_add_option(id->token, (yyvsp[0].string));
else
- zconfprint("warning: ignoring unknown option %s", (yyvsp[(2) - (3)].string));
- free((yyvsp[(2) - (3)].string));
+ zconfprint("warning: ignoring unknown option %s", (yyvsp[-1].string));
+ free((yyvsp[-1].string));
}
+
break;

case 49:

{ (yyval.string) = NULL; }
+
break;

case 50:

- { (yyval.string) = (yyvsp[(2) - (2)].string); }
+ { (yyval.string) = (yyvsp[0].string); }
+
break;

case 51:

{
- struct symbol *sym = sym_lookup((yyvsp[(2) - (3)].string), SYMBOL_CHOICE);
+ struct symbol *sym = sym_lookup((yyvsp[-1].string), SYMBOL_CHOICE);
sym->flags |= SYMBOL_AUTO;
menu_add_entry(sym);
menu_add_expr(P_CHOICE, NULL, NULL);
printd(DEBUG_PARSE, "%s:%d:choice\n", zconf_curname(), zconf_lineno());
}
+
break;

case 52:
@@ -1813,37 +1658,41 @@ yyreduce:
{
(yyval.menu) = menu_add_menu();
}
+
break;

case 53:

{
- if (zconf_endtoken((yyvsp[(1) - (1)].id), T_CHOICE, T_ENDCHOICE)) {
+ if (zconf_endtoken((yyvsp[0].id), T_CHOICE, T_ENDCHOICE)) {
menu_end_menu();
printd(DEBUG_PARSE, "%s:%d:endchoice\n", zconf_curname(), zconf_lineno());
}
}
+
break;

case 61:

{
- menu_add_prompt(P_PROMPT, (yyvsp[(2) - (4)].string), (yyvsp[(3) - (4)].expr));
+ menu_add_prompt(P_PROMPT, (yyvsp[-2].string), (yyvsp[-1].expr));
printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno());
}
+
break;

case 62:

{
- if ((yyvsp[(1) - (3)].id)->stype == S_BOOLEAN || (yyvsp[(1) - (3)].id)->stype == S_TRISTATE) {
- menu_set_type((yyvsp[(1) - (3)].id)->stype);
+ if ((yyvsp[-2].id)->stype == S_BOOLEAN || (yyvsp[-2].id)->stype == S_TRISTATE) {
+ menu_set_type((yyvsp[-2].id)->stype);
printd(DEBUG_PARSE, "%s:%d:type(%u)\n",
zconf_curname(), zconf_lineno(),
- (yyvsp[(1) - (3)].id)->stype);
+ (yyvsp[-2].id)->stype);
} else
YYERROR;
}
+
break;

case 63:
@@ -1852,18 +1701,20 @@ yyreduce:
current_entry->sym->flags |= SYMBOL_OPTIONAL;
printd(DEBUG_PARSE, "%s:%d:optional\n", zconf_curname(), zconf_lineno());
}
+
break;

case 64:

{
- if ((yyvsp[(1) - (4)].id)->stype == S_UNKNOWN) {
- menu_add_symbol(P_DEFAULT, sym_lookup((yyvsp[(2) - (4)].string), 0), (yyvsp[(3) - (4)].expr));
+ if ((yyvsp[-3].id)->stype == S_UNKNOWN) {
+ menu_add_symbol(P_DEFAULT, sym_lookup((yyvsp[-2].string), 0), (yyvsp[-1].expr));
printd(DEBUG_PARSE, "%s:%d:default\n",
zconf_curname(), zconf_lineno());
} else
YYERROR;
}
+
break;

case 67:
@@ -1871,35 +1722,39 @@ yyreduce:
{
printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno());
menu_add_entry(NULL);
- menu_add_dep((yyvsp[(2) - (3)].expr));
+ menu_add_dep((yyvsp[-1].expr));
(yyval.menu) = menu_add_menu();
}
+
break;

case 68:

{
- if (zconf_endtoken((yyvsp[(1) - (1)].id), T_IF, T_ENDIF)) {
+ if (zconf_endtoken((yyvsp[0].id), T_IF, T_ENDIF)) {
menu_end_menu();
printd(DEBUG_PARSE, "%s:%d:endif\n", zconf_curname(), zconf_lineno());
}
}
+
break;

case 74:

{
- menu_add_prompt(P_MENU, (yyvsp[(2) - (3)].string), NULL);
+ menu_add_prompt(P_MENU, (yyvsp[-1].string), NULL);
}
+
break;

case 75:

{
menu_add_entry(NULL);
- menu_add_prompt(P_MENU, (yyvsp[(2) - (3)].string), NULL);
+ menu_add_prompt(P_MENU, (yyvsp[-1].string), NULL);
printd(DEBUG_PARSE, "%s:%d:menu\n", zconf_curname(), zconf_lineno());
}
+
break;

case 76:
@@ -1907,33 +1762,37 @@ yyreduce:
{
(yyval.menu) = menu_add_menu();
}
+
break;

case 77:

{
- if (zconf_endtoken((yyvsp[(1) - (1)].id), T_MENU, T_ENDMENU)) {
+ if (zconf_endtoken((yyvsp[0].id), T_MENU, T_ENDMENU)) {
menu_end_menu();
printd(DEBUG_PARSE, "%s:%d:endmenu\n", zconf_curname(), zconf_lineno());
}
}
+
break;

case 83:

{
- printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), (yyvsp[(2) - (3)].string));
- zconf_nextfile((yyvsp[(2) - (3)].string));
+ printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), (yyvsp[-1].string));
+ zconf_nextfile((yyvsp[-1].string));
}
+
break;

case 84:

{
menu_add_entry(NULL);
- menu_add_prompt(P_COMMENT, (yyvsp[(2) - (3)].string), NULL);
+ menu_add_prompt(P_COMMENT, (yyvsp[-1].string), NULL);
printd(DEBUG_PARSE, "%s:%d:comment\n", zconf_curname(), zconf_lineno());
}
+
break;

case 85:
@@ -1941,6 +1800,7 @@ yyreduce:
{
menu_end_entry();
}
+
break;

case 86:
@@ -1949,110 +1809,130 @@ yyreduce:
printd(DEBUG_PARSE, "%s:%d:help\n", zconf_curname(), zconf_lineno());
zconf_starthelp();
}
+
break;

case 87:

{
- current_entry->help = (yyvsp[(2) - (2)].string);
+ current_entry->help = (yyvsp[0].string);
}
+
break;

case 92:

{
- menu_add_dep((yyvsp[(3) - (4)].expr));
+ menu_add_dep((yyvsp[-1].expr));
printd(DEBUG_PARSE, "%s:%d:depends on\n", zconf_curname(), zconf_lineno());
}
+
break;

case 96:

{
- menu_add_visibility((yyvsp[(2) - (2)].expr));
+ menu_add_visibility((yyvsp[0].expr));
}
+
break;

case 98:

{
- menu_add_prompt(P_PROMPT, (yyvsp[(1) - (2)].string), (yyvsp[(2) - (2)].expr));
+ menu_add_prompt(P_PROMPT, (yyvsp[-1].string), (yyvsp[0].expr));
}
+
break;

case 101:

- { (yyval.id) = (yyvsp[(1) - (2)].id); }
+ { (yyval.id) = (yyvsp[-1].id); }
+
break;

case 102:

- { (yyval.id) = (yyvsp[(1) - (2)].id); }
+ { (yyval.id) = (yyvsp[-1].id); }
+
break;

case 103:

- { (yyval.id) = (yyvsp[(1) - (2)].id); }
+ { (yyval.id) = (yyvsp[-1].id); }
+
break;

case 106:

{ (yyval.expr) = NULL; }
+
break;

case 107:

- { (yyval.expr) = (yyvsp[(2) - (2)].expr); }
+ { (yyval.expr) = (yyvsp[0].expr); }
+
break;

case 108:

- { (yyval.expr) = expr_alloc_symbol((yyvsp[(1) - (1)].symbol)); }
+ { (yyval.expr) = expr_alloc_symbol((yyvsp[0].symbol)); }
+
break;

case 109:

- { (yyval.expr) = expr_alloc_comp(E_EQUAL, (yyvsp[(1) - (3)].symbol), (yyvsp[(3) - (3)].symbol)); }
+ { (yyval.expr) = expr_alloc_comp(E_EQUAL, (yyvsp[-2].symbol), (yyvsp[0].symbol)); }
+
break;

case 110:

- { (yyval.expr) = expr_alloc_comp(E_UNEQUAL, (yyvsp[(1) - (3)].symbol), (yyvsp[(3) - (3)].symbol)); }
+ { (yyval.expr) = expr_alloc_comp(E_UNEQUAL, (yyvsp[-2].symbol), (yyvsp[0].symbol)); }
+
break;

case 111:

- { (yyval.expr) = (yyvsp[(2) - (3)].expr); }
+ { (yyval.expr) = (yyvsp[-1].expr); }
+
break;

case 112:

- { (yyval.expr) = expr_alloc_one(E_NOT, (yyvsp[(2) - (2)].expr)); }
+ { (yyval.expr) = expr_alloc_one(E_NOT, (yyvsp[0].expr)); }
+
break;

case 113:

- { (yyval.expr) = expr_alloc_two(E_OR, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
+ { (yyval.expr) = expr_alloc_two(E_OR, (yyvsp[-2].expr), (yyvsp[0].expr)); }
+
break;

case 114:

- { (yyval.expr) = expr_alloc_two(E_AND, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
+ { (yyval.expr) = expr_alloc_two(E_AND, (yyvsp[-2].expr), (yyvsp[0].expr)); }
+
break;

case 115:

- { (yyval.symbol) = sym_lookup((yyvsp[(1) - (1)].string), 0); free((yyvsp[(1) - (1)].string)); }
+ { (yyval.symbol) = sym_lookup((yyvsp[0].string), 0); free((yyvsp[0].string)); }
+
break;

case 116:

- { (yyval.symbol) = sym_lookup((yyvsp[(1) - (1)].string), SYMBOL_CONST); free((yyvsp[(1) - (1)].string)); }
+ { (yyval.symbol) = sym_lookup((yyvsp[0].string), SYMBOL_CONST); free((yyvsp[0].string)); }
+
break;

case 117:

{ (yyval.string) = NULL; }
+
break;


@@ -2078,7 +1958,7 @@ yyreduce:

*++yyvsp = yyval;

- /* Now `shift' the result of the reduction. Determine what state
+ /* Now 'shift' the result of the reduction. Determine what state
that goes to, based on the state we popped back to and the rule
number reduced by. */

@@ -2093,9 +1973,9 @@ yyreduce:
goto yynewstate;


-/*------------------------------------.
-| yyerrlab -- here on detecting error |
-`------------------------------------*/
+/*--------------------------------------.
+| yyerrlab -- here on detecting error. |
+`--------------------------------------*/
yyerrlab:
/* Make sure we have latest lookahead translation. See comments at
user semantic actions for why this is necessary. */
@@ -2146,20 +2026,20 @@ yyerrlab:
if (yyerrstatus == 3)
{
/* If just tried and failed to reuse lookahead token after an
- error, discard it. */
+ error, discard it. */

if (yychar <= YYEOF)
- {
- /* Return failure if at end of input. */
- if (yychar == YYEOF)
- YYABORT;
- }
+ {
+ /* Return failure if at end of input. */
+ if (yychar == YYEOF)
+ YYABORT;
+ }
else
- {
- yydestruct ("Error: discarding",
- yytoken, &yylval);
- yychar = YYEMPTY;
- }
+ {
+ yydestruct ("Error: discarding",
+ yytoken, &yylval);
+ yychar = YYEMPTY;
+ }
}

/* Else will try to reuse lookahead token after shifting the error
@@ -2178,7 +2058,7 @@ yyerrorlab:
if (/*CONSTCOND*/ 0)
goto yyerrorlab;

- /* Do not reclaim the symbols of the rule which action triggered
+ /* Do not reclaim the symbols of the rule whose action triggered
this YYERROR. */
YYPOPSTACK (yylen);
yylen = 0;
@@ -2191,35 +2071,37 @@ yyerrorlab:
| yyerrlab1 -- common code for both syntax error and YYERROR. |
`-------------------------------------------------------------*/
yyerrlab1:
- yyerrstatus = 3; /* Each real token shifted decrements this. */
+ yyerrstatus = 3; /* Each real token shifted decrements this. */

for (;;)
{
yyn = yypact[yystate];
if (!yypact_value_is_default (yyn))
- {
- yyn += YYTERROR;
- if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
- {
- yyn = yytable[yyn];
- if (0 < yyn)
- break;
- }
- }
+ {
+ yyn += YYTERROR;
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+ {
+ yyn = yytable[yyn];
+ if (0 < yyn)
+ break;
+ }
+ }

/* Pop the current state because it cannot handle the error token. */
if (yyssp == yyss)
- YYABORT;
+ YYABORT;


yydestruct ("Error: popping",
- yystos[yystate], yyvsp);
+ yystos[yystate], yyvsp);
YYPOPSTACK (1);
yystate = *yyssp;
YY_STACK_PRINT (yyss, yyssp);
}

+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
*++yyvsp = yylval;
+ YY_IGNORE_MAYBE_UNINITIALIZED_END


/* Shift the error token. */
@@ -2243,7 +2125,7 @@ yyabortlab:
yyresult = 1;
goto yyreturn;

-#if !defined(yyoverflow) || YYERROR_VERBOSE
+#if !defined yyoverflow || YYERROR_VERBOSE
/*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here. |
`-------------------------------------------------*/
@@ -2262,14 +2144,14 @@ yyreturn:
yydestruct ("Cleanup: discarding lookahead",
yytoken, &yylval);
}
- /* Do not reclaim the symbols of the rule which action triggered
+ /* Do not reclaim the symbols of the rule whose action triggered
this YYABORT or YYACCEPT. */
YYPOPSTACK (yylen);
YY_STACK_PRINT (yyss, yyssp);
while (yyssp != yyss)
{
yydestruct ("Cleanup: popping",
- yystos[*yyssp], yyvsp);
+ yystos[*yyssp], yyvsp);
YYPOPSTACK (1);
}
#ifndef yyoverflow
@@ -2280,14 +2162,11 @@ yyreturn:
if (yymsg != yymsgbuf)
YYSTACK_FREE (yymsg);
#endif
- /* Make sure YYID is used. */
- return YYID (yyresult);
+ return yyresult;
}



-
-
void conf_parse(const char *name)
{
struct symbol *sym;
@@ -2535,4 +2414,3 @@ void zconfdump(FILE *out)
#include "expr.c"
#include "symbol.c"
#include "menu.c"
-
--
2.1.0

2014-12-08 01:56:54

by Christoph Jaeger

[permalink] [raw]
Subject: [PATCH 3/3] kconfig: rename S_BOOLEAN to S_BOOL for consistency

Rename S_BOOLEAN to S_BOOL so that it reflects the actual string as
S_TRISTATE, S_INT, etc., do. No functional changes.

Signed-off-by: Christoph Jaeger <[email protected]>
---
scripts/kconfig/confdata.c | 20 ++++++++++----------
scripts/kconfig/expr.c | 10 +++++-----
scripts/kconfig/expr.h | 2 +-
scripts/kconfig/gconf.c | 4 ++--
scripts/kconfig/mconf.c | 4 ++--
scripts/kconfig/menu.c | 4 ++--
scripts/kconfig/nconf.c | 4 ++--
scripts/kconfig/qconf.cc | 10 +++++-----
scripts/kconfig/symbol.c | 32 ++++++++++++++++----------------
scripts/kconfig/zconf.gperf | 4 ++--
scripts/kconfig/zconf.hash.c_shipped | 4 ++--
scripts/kconfig/zconf.tab.c_shipped | 4 ++--
scripts/kconfig/zconf.y | 4 ++--
13 files changed, 53 insertions(+), 53 deletions(-)

diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index 412e66c..6fbcf07 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -129,7 +129,7 @@ static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p)
break;
}
/* fall through */
- case S_BOOLEAN:
+ case S_BOOL:
if (p[0] == 'y') {
sym->def[def].tri = yes;
sym->flags |= def_flags;
@@ -329,13 +329,13 @@ load:
} else {
sym = sym_lookup(line + 2 + strlen(CONFIG_), 0);
if (sym->type == S_UNKNOWN)
- sym->type = S_BOOLEAN;
+ sym->type = S_BOOL;
}
if (sym->flags & def_flags) {
conf_warning("override: reassigning to symbol %s", sym->name);
}
switch (sym->type) {
- case S_BOOLEAN:
+ case S_BOOL:
case S_TRISTATE:
sym->def[def].tri = no;
sym->flags |= def_flags;
@@ -421,7 +421,7 @@ int conf_read(const char *name)
if (sym_has_value(sym) && (sym->flags & SYMBOL_WRITE)) {
/* check that calculated value agrees with saved value */
switch (sym->type) {
- case S_BOOLEAN:
+ case S_BOOL:
case S_TRISTATE:
if (sym->def[S_DEF_USER].tri != sym_get_tristate_value(sym))
break;
@@ -483,7 +483,7 @@ kconfig_print_symbol(FILE *fp, struct symbol *sym, const char *value, void *arg)
{

switch (sym->type) {
- case S_BOOLEAN:
+ case S_BOOL:
case S_TRISTATE:
if (*value == 'n') {
bool skip_unset = (arg != NULL);
@@ -537,7 +537,7 @@ header_print_symbol(FILE *fp, struct symbol *sym, const char *value, void *arg)
{

switch (sym->type) {
- case S_BOOLEAN:
+ case S_BOOL:
case S_TRISTATE: {
const char *suffix = "";

@@ -706,7 +706,7 @@ int conf_write_defconfig(const char *filename)
cs = prop_get_symbol(sym_get_choice_prop(sym));
ds = sym_choice_default(cs);
if (!sym_is_optional(cs) && sym == ds) {
- if ((sym->type == S_BOOLEAN) &&
+ if ((sym->type == S_BOOL) &&
sym_get_tristate_value(sym) == yes)
goto next_menu;
}
@@ -859,7 +859,7 @@ static int conf_split_config(void)
* so compare them...
*/
switch (sym->type) {
- case S_BOOLEAN:
+ case S_BOOL:
case S_TRISTATE:
if (sym_get_tristate_value(sym) ==
sym->def[S_DEF_AUTO].tri)
@@ -881,7 +881,7 @@ static int conf_split_config(void)
* is allowed as new value.
*/
switch (sym->type) {
- case S_BOOLEAN:
+ case S_BOOL:
case S_TRISTATE:
if (sym_get_tristate_value(sym) == no)
continue;
@@ -1167,7 +1167,7 @@ bool conf_set_all_new_symbols(enum conf_def_mode mode)
if (sym_has_value(sym) || (sym->flags & SYMBOL_VALID))
continue;
switch (sym_get_type(sym)) {
- case S_BOOLEAN:
+ case S_BOOL:
case S_TRISTATE:
has_changed = true;
switch (mode) {
diff --git a/scripts/kconfig/expr.c b/scripts/kconfig/expr.c
index d662652..62b1790 100644
--- a/scripts/kconfig/expr.c
+++ b/scripts/kconfig/expr.c
@@ -369,7 +369,7 @@ static struct expr *expr_join_or(struct expr *e1, struct expr *e2)
sym2 = e2->left.sym;
if (sym1 != sym2)
return NULL;
- if (sym1->type != S_BOOLEAN && sym1->type != S_TRISTATE)
+ if (sym1->type != S_BOOL && sym1->type != S_TRISTATE)
return NULL;
if (sym1->type == S_TRISTATE) {
if (e1->type == E_EQUAL && e2->type == E_EQUAL &&
@@ -391,7 +391,7 @@ static struct expr *expr_join_or(struct expr *e1, struct expr *e2)
return expr_alloc_comp(E_UNEQUAL, sym1, &symbol_yes);
}
}
- if (sym1->type == S_BOOLEAN && sym1 == sym2) {
+ if (sym1->type == S_BOOL && sym1 == sym2) {
if ((e1->type == E_NOT && e1->left.expr->type == E_SYMBOL && e2->type == E_SYMBOL) ||
(e2->type == E_NOT && e2->left.expr->type == E_SYMBOL && e1->type == E_SYMBOL))
return expr_alloc_symbol(&symbol_yes);
@@ -433,7 +433,7 @@ static struct expr *expr_join_and(struct expr *e1, struct expr *e2)
sym2 = e2->left.sym;
if (sym1 != sym2)
return NULL;
- if (sym1->type != S_BOOLEAN && sym1->type != S_TRISTATE)
+ if (sym1->type != S_BOOL && sym1->type != S_TRISTATE)
return NULL;

if ((e1->type == E_SYMBOL && e2->type == E_EQUAL && e2->right.sym == &symbol_yes) ||
@@ -652,7 +652,7 @@ struct expr *expr_transform(struct expr *e)

switch (e->type) {
case E_EQUAL:
- if (e->left.sym->type != S_BOOLEAN)
+ if (e->left.sym->type != S_BOOL)
break;
if (e->right.sym == &symbol_no) {
e->type = E_NOT;
@@ -674,7 +674,7 @@ struct expr *expr_transform(struct expr *e)
}
break;
case E_UNEQUAL:
- if (e->left.sym->type != S_BOOLEAN)
+ if (e->left.sym->type != S_BOOL)
break;
if (e->right.sym == &symbol_no) {
e->type = E_SYMBOL;
diff --git a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h
index 412ea8a..8ce0d00 100644
--- a/scripts/kconfig/expr.h
+++ b/scripts/kconfig/expr.h
@@ -60,7 +60,7 @@ struct symbol_value {
};

enum symbol_type {
- S_UNKNOWN, S_BOOLEAN, S_TRISTATE, S_INT, S_HEX, S_STRING, S_OTHER
+ S_UNKNOWN, S_BOOL, S_TRISTATE, S_INT, S_HEX, S_STRING, S_OTHER
};

/* enum values are used as index to symbol.def[] */
diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c
index d0a35b2..b431beb 100644
--- a/scripts/kconfig/gconf.c
+++ b/scripts/kconfig/gconf.c
@@ -845,7 +845,7 @@ static void change_sym_value(struct menu *menu, gint col)
return;

switch (sym_get_type(sym)) {
- case S_BOOLEAN:
+ case S_BOOL:
case S_TRISTATE:
if (!sym_tristate_within_range(sym, newval))
newval = yes;
@@ -1133,7 +1133,7 @@ static gchar **fill_row(struct menu *menu)

stype = sym_get_type(sym);
switch (stype) {
- case S_BOOLEAN:
+ case S_BOOL:
if (GPOINTER_TO_INT(row[COL_PIXVIS]) == FALSE)
row[COL_BTNVIS] = GINT_TO_POINTER(TRUE);
if (sym_is_choice(sym))
diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c
index 03fddd5..e792ddb 100644
--- a/scripts/kconfig/mconf.c
+++ b/scripts/kconfig/mconf.c
@@ -539,7 +539,7 @@ static void build_conf(struct menu *menu)
val = sym_get_tristate_value(sym);
if (sym_is_changable(sym)) {
switch (type) {
- case S_BOOLEAN:
+ case S_BOOL:
item_make("[%c]", val == no ? ' ' : '*');
break;
case S_TRISTATE:
@@ -587,7 +587,7 @@ static void build_conf(struct menu *menu)
item_set_data(menu);
} else {
switch (type) {
- case S_BOOLEAN:
+ case S_BOOL:
if (sym_is_changable(sym))
item_make("[%c]", val == no ? ' ' : '*');
else
diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index f3594fa..69c48b4 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/menu.c
@@ -253,12 +253,12 @@ static void sym_check_prop(struct symbol *sym)
break;
case P_SELECT:
sym2 = prop_get_symbol(prop);
- if (sym->type != S_BOOLEAN && sym->type != S_TRISTATE)
+ if (sym->type != S_BOOL && sym->type != S_TRISTATE)
prop_warn(prop,
"config symbol '%s' uses select, but is "
"neither bool nor tristate", sym->name);
else if (sym2->type != S_UNKNOWN &&
- sym2->type != S_BOOLEAN &&
+ sym2->type != S_BOOL &&
sym2->type != S_TRISTATE)
prop_warn(prop,
"'%s' has wrong type. 'select' only "
diff --git a/scripts/kconfig/nconf.c b/scripts/kconfig/nconf.c
index 984489e..4e28cbe 100644
--- a/scripts/kconfig/nconf.c
+++ b/scripts/kconfig/nconf.c
@@ -803,7 +803,7 @@ static void build_conf(struct menu *menu)
val = sym_get_tristate_value(sym);
if (sym_is_changable(sym)) {
switch (type) {
- case S_BOOLEAN:
+ case S_BOOL:
item_make(menu, 't', "[%c]",
val == no ? ' ' : '*');
break;
@@ -854,7 +854,7 @@ static void build_conf(struct menu *menu)
item_make(menu, ':', " ");
} else {
switch (type) {
- case S_BOOLEAN:
+ case S_BOOL:
if (sym_is_changable(sym))
item_make(menu, 't', "[%c]",
val == no ? ' ' : '*');
diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index 9d3b04b..cd205ff 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -165,7 +165,7 @@ void ConfigItem::updateMenu(void)

type = sym_get_type(sym);
switch (type) {
- case S_BOOLEAN:
+ case S_BOOL:
case S_TRISTATE:
char ch;

@@ -179,7 +179,7 @@ void ConfigItem::updateMenu(void)
expr = sym_get_tristate_value(sym);
switch (expr) {
case yes:
- if (sym_is_choice_value(sym) && type == S_BOOLEAN)
+ if (sym_is_choice_value(sym) && type == S_BOOL)
setPixmap(promptColIdx, list->choiceYesPix);
else
setPixmap(promptColIdx, list->symbolYesPix);
@@ -192,7 +192,7 @@ void ConfigItem::updateMenu(void)
ch = 'M';
break;
default:
- if (sym_is_choice_value(sym) && type == S_BOOLEAN)
+ if (sym_is_choice_value(sym) && type == S_BOOL)
setPixmap(promptColIdx, list->choiceNoPix);
else
setPixmap(promptColIdx, list->symbolNoPix);
@@ -499,7 +499,7 @@ void ConfigList::setValue(ConfigItem* item, tristate val)

type = sym_get_type(sym);
switch (type) {
- case S_BOOLEAN:
+ case S_BOOL:
case S_TRISTATE:
oldval = sym_get_tristate_value(sym);

@@ -530,7 +530,7 @@ void ConfigList::changeValue(ConfigItem* item)

type = sym_get_type(sym);
switch (type) {
- case S_BOOLEAN:
+ case S_BOOL:
case S_TRISTATE:
oldexpr = sym_get_tristate_value(sym);
newexpr = sym_toggle_tristate_value(sym);
diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
index d855325..bdcfc61 100644
--- a/scripts/kconfig/symbol.c
+++ b/scripts/kconfig/symbol.c
@@ -66,9 +66,9 @@ enum symbol_type sym_get_type(struct symbol *sym)

if (type == S_TRISTATE) {
if (sym_is_choice_value(sym) && sym->visible == yes)
- type = S_BOOLEAN;
+ type = S_BOOL;
else if (modules_val == no)
- type = S_BOOLEAN;
+ type = S_BOOL;
}
return type;
}
@@ -76,7 +76,7 @@ enum symbol_type sym_get_type(struct symbol *sym)
const char *sym_type_name(enum symbol_type type)
{
switch (type) {
- case S_BOOLEAN:
+ case S_BOOL:
return "bool";
case S_TRISTATE:
return "tristate";
@@ -218,7 +218,7 @@ static void sym_calc_visibility(struct symbol *sym)
tri = no;
if (sym->rev_dep.expr)
tri = expr_calc_value(sym->rev_dep.expr);
- if (tri == mod && sym_get_type(sym) == S_BOOLEAN)
+ if (tri == mod && sym_get_type(sym) == S_BOOL)
tri = yes;
if (sym->rev_dep.tri != tri) {
sym->rev_dep.tri = tri;
@@ -319,7 +319,7 @@ void sym_calc_value(struct symbol *sym)
case S_STRING:
newval = symbol_empty.curr;
break;
- case S_BOOLEAN:
+ case S_BOOL:
case S_TRISTATE:
newval = symbol_no.curr;
break;
@@ -337,7 +337,7 @@ void sym_calc_value(struct symbol *sym)
sym->curr = newval;

switch (sym_get_type(sym)) {
- case S_BOOLEAN:
+ case S_BOOL:
case S_TRISTATE:
if (sym_is_choice_value(sym) && sym->visible == yes) {
prop = sym_get_choice_prop(sym);
@@ -379,7 +379,7 @@ void sym_calc_value(struct symbol *sym)
}
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_BOOL)
newval.tri = yes;
break;
case S_STRING:
@@ -478,10 +478,10 @@ bool sym_tristate_within_range(struct symbol *sym, tristate val)
if (sym->visible == no)
return false;

- if (type != S_BOOLEAN && type != S_TRISTATE)
+ if (type != S_BOOL && type != S_TRISTATE)
return false;

- if (type == S_BOOLEAN && val == mod)
+ if (type == S_BOOL && val == mod)
return false;
if (sym->visible <= sym->rev_dep.tri)
return false;
@@ -578,7 +578,7 @@ bool sym_string_valid(struct symbol *sym, const char *str)
return false;
} while ((ch = *str++));
return true;
- case S_BOOLEAN:
+ case S_BOOL:
case S_TRISTATE:
switch (str[0]) {
case 'y': case 'Y':
@@ -618,7 +618,7 @@ bool sym_string_within_range(struct symbol *sym, const char *str)
val = strtoll(str, NULL, 16);
return val >= sym_get_range_val(prop->expr->left.sym, 16) &&
val <= sym_get_range_val(prop->expr->right.sym, 16);
- case S_BOOLEAN:
+ case S_BOOL:
case S_TRISTATE:
switch (str[0]) {
case 'y': case 'Y':
@@ -641,7 +641,7 @@ bool sym_set_string_value(struct symbol *sym, const char *newval)
int size;

switch (sym->type) {
- case S_BOOLEAN:
+ case S_BOOL:
case S_TRISTATE:
switch (newval[0]) {
case 'y': case 'Y':
@@ -706,7 +706,7 @@ const char *sym_get_string_default(struct symbol *sym)
prop = sym_get_default_prop(sym);
if (prop != NULL) {
switch (sym->type) {
- case S_BOOLEAN:
+ case S_BOOL:
case S_TRISTATE:
/* The visibility may limit the value from yes => mod */
val = EXPR_AND(expr_calc_value(prop->expr), prop->visible.tri);
@@ -734,11 +734,11 @@ const char *sym_get_string_default(struct symbol *sym)
val = yes;

/* transpose mod to yes if type is bool */
- if (sym->type == S_BOOLEAN && val == mod)
+ if (sym->type == S_BOOL && val == mod)
val = yes;

switch (sym->type) {
- case S_BOOLEAN:
+ case S_BOOL:
case S_TRISTATE:
switch (val) {
case no: return "n";
@@ -762,7 +762,7 @@ const char *sym_get_string_value(struct symbol *sym)
tristate val;

switch (sym->type) {
- case S_BOOLEAN:
+ case S_BOOL:
case S_TRISTATE:
val = sym_get_tristate_value(sym);
switch (val) {
diff --git a/scripts/kconfig/zconf.gperf b/scripts/kconfig/zconf.gperf
index d8fcf97..990c929 100644
--- a/scripts/kconfig/zconf.gperf
+++ b/scripts/kconfig/zconf.gperf
@@ -30,8 +30,8 @@ default, T_DEFAULT, TF_COMMAND, S_UNKNOWN
prompt, T_PROMPT, TF_COMMAND
tristate, T_TYPE, TF_COMMAND, S_TRISTATE
def_tristate, T_DEFAULT, TF_COMMAND, S_TRISTATE
-bool, T_TYPE, TF_COMMAND, S_BOOLEAN
-def_bool, T_DEFAULT, TF_COMMAND, S_BOOLEAN
+bool, T_TYPE, TF_COMMAND, S_BOOL
+def_bool, T_DEFAULT, TF_COMMAND, S_BOOL
int, T_TYPE, TF_COMMAND, S_INT
hex, T_TYPE, TF_COMMAND, S_HEX
string, T_TYPE, TF_COMMAND, S_STRING
diff --git a/scripts/kconfig/zconf.hash.c_shipped b/scripts/kconfig/zconf.hash.c_shipped
index c29b2a3..e627643 100644
--- a/scripts/kconfig/zconf.hash.c_shipped
+++ b/scripts/kconfig/zconf.hash.c_shipped
@@ -198,7 +198,7 @@ kconf_id_lookup (register const char *str, register unsigned int len)
#line 32 "scripts/kconfig/zconf.gperf"
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str12, T_DEFAULT, TF_COMMAND, S_TRISTATE},
#line 34 "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_BOOL},
#line 44 "scripts/kconfig/zconf.gperf"
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str14, T_OPT_DEFCONFIG_LIST,TF_OPTION},
{-1}, {-1},
@@ -207,7 +207,7 @@ kconf_id_lookup (register const char *str, register unsigned int len)
#line 28 "scripts/kconfig/zconf.gperf"
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str18, T_OPTIONAL, TF_COMMAND},
#line 33 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str19, T_TYPE, TF_COMMAND, S_BOOLEAN},
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str19, T_TYPE, TF_COMMAND, S_BOOL},
{-1},
#line 41 "scripts/kconfig/zconf.gperf"
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str21, T_OPTION, TF_COMMAND},
diff --git a/scripts/kconfig/zconf.tab.c_shipped b/scripts/kconfig/zconf.tab.c_shipped
index acdf6e3..a44c458 100644
--- a/scripts/kconfig/zconf.tab.c_shipped
+++ b/scripts/kconfig/zconf.tab.c_shipped
@@ -1684,7 +1684,7 @@ yyreduce:
case 62:

{
- if ((yyvsp[-2].id)->stype == S_BOOLEAN || (yyvsp[-2].id)->stype == S_TRISTATE) {
+ if ((yyvsp[-2].id)->stype == S_BOOL || (yyvsp[-2].id)->stype == S_TRISTATE) {
menu_set_type((yyvsp[-2].id)->stype);
printd(DEBUG_PARSE, "%s:%d:type(%u)\n",
zconf_curname(), zconf_lineno(),
@@ -2289,7 +2289,7 @@ static void print_symbol(FILE *out, struct menu *menu)
else
fprintf(out, "\nconfig %s\n", sym->name);
switch (sym->type) {
- case S_BOOLEAN:
+ case S_BOOL:
fputs(" bool\n", out);
break;
case S_TRISTATE:
diff --git a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y
index adb8828..f50b4db 100644
--- a/scripts/kconfig/zconf.y
+++ b/scripts/kconfig/zconf.y
@@ -281,7 +281,7 @@ choice_option: T_PROMPT prompt if_expr T_EOL

choice_option: T_TYPE prompt_stmt_opt T_EOL
{
- if ($1->stype == S_BOOLEAN || $1->stype == S_TRISTATE) {
+ if ($1->stype == S_BOOL || $1->stype == S_TRISTATE) {
menu_set_type($1->stype);
printd(DEBUG_PARSE, "%s:%d:type(%u)\n",
zconf_curname(), zconf_lineno(),
@@ -606,7 +606,7 @@ static void print_symbol(FILE *out, struct menu *menu)
else
fprintf(out, "\nconfig %s\n", sym->name);
switch (sym->type) {
- case S_BOOLEAN:
+ case S_BOOL:
fputs(" bool\n", out);
break;
case S_TRISTATE:
--
2.1.0

2014-12-08 01:57:11

by Christoph Jaeger

[permalink] [raw]
Subject: [PATCH 2/3] kconfig: remove undocumented type definition alias 'boolean'

Having an undocumented alias for type definitions of boolean config options is
more confusing than helpful. Remove support for the keyword 'boolean' in favor
of 'bool' and convert all its users.

While at it, fix some minor grammar issues in warning messages.

Suggested-by: Daniel Borkmann <[email protected]>
Signed-off-by: Christoph Jaeger <[email protected]>
---
arch/cris/arch-v32/drivers/Kconfig | 2 +-
arch/mips/pmcs-msp71xx/Kconfig | 6 ++---
drivers/connector/Kconfig | 2 +-
drivers/hwmon/Kconfig | 2 +-
drivers/i2c/Kconfig | 4 +--
drivers/iio/Kconfig | 4 +--
drivers/isdn/hardware/mISDN/Kconfig | 2 +-
drivers/md/Kconfig | 4 +--
drivers/md/persistent-data/Kconfig | 2 +-
drivers/net/ethernet/ti/Kconfig | 4 +--
drivers/net/usb/Kconfig | 12 ++++-----
drivers/net/wireless/rt2x00/Kconfig | 6 ++---
drivers/pci/pcie/aer/Kconfig | 2 +-
drivers/rtc/Kconfig | 8 +++---
drivers/spi/Kconfig | 6 ++---
drivers/staging/board/Kconfig | 2 +-
drivers/staging/emxx_udc/Kconfig | 2 +-
drivers/staging/iio/Kconfig | 4 +--
drivers/tty/serial/Kconfig | 2 +-
drivers/usb/gadget/Kconfig | 26 +++++++++---------
drivers/usb/gadget/legacy/Kconfig | 2 +-
drivers/usb/gadget/udc/Kconfig | 4 +--
drivers/usb/phy/Kconfig | 2 +-
init/Kconfig | 4 +--
lib/Kconfig | 30 ++++++++++-----------
mm/Kconfig | 22 ++++++++--------
net/Kconfig | 14 +++++-----
net/sched/Kconfig | 2 +-
scripts/kconfig/confdata.c | 2 +-
scripts/kconfig/mconf.c | 2 +-
scripts/kconfig/menu.c | 6 ++---
scripts/kconfig/symbol.c | 2 +-
scripts/kconfig/zconf.gperf | 1 -
scripts/kconfig/zconf.hash.c_shipped | 51 ++++++++++++++++--------------------
scripts/kconfig/zconf.tab.c_shipped | 2 +-
scripts/kconfig/zconf.y | 2 +-
security/integrity/Kconfig | 4 +--
security/integrity/evm/Kconfig | 2 +-
38 files changed, 125 insertions(+), 131 deletions(-)

diff --git a/arch/cris/arch-v32/drivers/Kconfig b/arch/cris/arch-v32/drivers/Kconfig
index 15a9ed1..441e2a1 100644
--- a/arch/cris/arch-v32/drivers/Kconfig
+++ b/arch/cris/arch-v32/drivers/Kconfig
@@ -363,7 +363,7 @@ config ETRAX_SPI_MMC
# For the parts that can't be a module (due to restrictions in
# framework elsewhere).
config ETRAX_SPI_MMC_BOARD
- boolean
+ bool
default n

# While the board info is MMC_SPI only, the drivers are written to be
diff --git a/arch/mips/pmcs-msp71xx/Kconfig b/arch/mips/pmcs-msp71xx/Kconfig
index 6073ca4..4190093 100644
--- a/arch/mips/pmcs-msp71xx/Kconfig
+++ b/arch/mips/pmcs-msp71xx/Kconfig
@@ -36,14 +36,14 @@ config PMC_MSP7120_FPGA
endchoice

config MSP_HAS_USB
- boolean
+ bool
depends on PMC_MSP

config MSP_ETH
- boolean
+ bool
select MSP_HAS_MAC
depends on PMC_MSP

config MSP_HAS_MAC
- boolean
+ bool
depends on PMC_MSP
diff --git a/drivers/connector/Kconfig b/drivers/connector/Kconfig
index 6e6730f..3de5f3a 100644
--- a/drivers/connector/Kconfig
+++ b/drivers/connector/Kconfig
@@ -12,7 +12,7 @@ menuconfig CONNECTOR
if CONNECTOR

config PROC_EVENTS
- boolean "Report process events to userspace"
+ bool "Report process events to userspace"
depends on CONNECTOR=y
default y
---help---
diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
index 5286d7c..a423bfa 100644
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
@@ -1583,7 +1583,7 @@ config SENSORS_W83795
will be called w83795.

config SENSORS_W83795_FANCTRL
- boolean "Include automatic fan control support (DANGEROUS)"
+ bool "Include automatic fan control support (DANGEROUS)"
depends on SENSORS_W83795
default n
help
diff --git a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig
index b51a402..55a1636 100644
--- a/drivers/i2c/Kconfig
+++ b/drivers/i2c/Kconfig
@@ -35,11 +35,11 @@ config ACPI_I2C_OPREGION
if I2C

config I2C_BOARDINFO
- boolean
+ bool
default y

config I2C_COMPAT
- boolean "Enable compatibility bits for old user-space"
+ bool "Enable compatibility bits for old user-space"
default y
help
Say Y here if you intend to run lm-sensors 3.1.1 or older, or any
diff --git a/drivers/iio/Kconfig b/drivers/iio/Kconfig
index 345395e..397c8df 100644
--- a/drivers/iio/Kconfig
+++ b/drivers/iio/Kconfig
@@ -21,7 +21,7 @@ config IIO_BUFFER
if IIO_BUFFER

config IIO_BUFFER_CB
-boolean "IIO callback buffer used for push in-kernel interfaces"
+ bool "IIO callback buffer used for push in-kernel interfaces"
help
Should be selected by any drivers that do in-kernel push
usage. That is, those where the data is pushed to the consumer.
@@ -44,7 +44,7 @@ config IIO_TRIGGERED_BUFFER
endif # IIO_BUFFER

config IIO_TRIGGER
- boolean "Enable triggered sampling support"
+ bool "Enable triggered sampling support"
help
Provides IIO core support for triggers. Currently these
are used to initialize capture of samples to push into
diff --git a/drivers/isdn/hardware/mISDN/Kconfig b/drivers/isdn/hardware/mISDN/Kconfig
index b8611e3..09df54f 100644
--- a/drivers/isdn/hardware/mISDN/Kconfig
+++ b/drivers/isdn/hardware/mISDN/Kconfig
@@ -24,7 +24,7 @@ config MISDN_HFCMULTI
* HFC-E1 (E1 interface for 2Mbit ISDN)

config MISDN_HFCMULTI_8xx
- boolean "Support for XHFC embedded board in HFC multiport driver"
+ bool "Support for XHFC embedded board in HFC multiport driver"
depends on MISDN
depends on MISDN_HFCMULTI
depends on 8xx
diff --git a/drivers/md/Kconfig b/drivers/md/Kconfig
index 5bdedf6..1cd9cf8 100644
--- a/drivers/md/Kconfig
+++ b/drivers/md/Kconfig
@@ -177,7 +177,7 @@ config MD_FAULTY
source "drivers/md/bcache/Kconfig"

config BLK_DEV_DM_BUILTIN
- boolean
+ bool

config BLK_DEV_DM
tristate "Device mapper support"
@@ -196,7 +196,7 @@ config BLK_DEV_DM
If unsure, say N.

config DM_DEBUG
- boolean "Device mapper debugging support"
+ bool "Device mapper debugging support"
depends on BLK_DEV_DM
---help---
Enable this for messages that may help debug device-mapper problems.
diff --git a/drivers/md/persistent-data/Kconfig b/drivers/md/persistent-data/Kconfig
index 0c2dec7..78c74bb 100644
--- a/drivers/md/persistent-data/Kconfig
+++ b/drivers/md/persistent-data/Kconfig
@@ -8,7 +8,7 @@ config DM_PERSISTENT_DATA
device-mapper targets such as the thin provisioning target.

config DM_DEBUG_BLOCK_STACK_TRACING
- boolean "Keep stack trace of persistent data block lock holders"
+ bool "Keep stack trace of persistent data block lock holders"
depends on STACKTRACE_SUPPORT && DM_PERSISTENT_DATA
select STACKTRACE
---help---
diff --git a/drivers/net/ethernet/ti/Kconfig b/drivers/net/ethernet/ti/Kconfig
index 5d8cb79..9720bd9 100644
--- a/drivers/net/ethernet/ti/Kconfig
+++ b/drivers/net/ethernet/ti/Kconfig
@@ -50,7 +50,7 @@ config TI_DAVINCI_CPDMA
will be called davinci_cpdma. This is recommended.

config TI_CPSW_PHY_SEL
- boolean "TI CPSW Switch Phy sel Support"
+ bool "TI CPSW Switch Phy sel Support"
depends on TI_CPSW
---help---
This driver supports configuring of the phy mode connected to
@@ -71,7 +71,7 @@ config TI_CPSW
will be called cpsw.

config TI_CPTS
- boolean "TI Common Platform Time Sync (CPTS) Support"
+ bool "TI Common Platform Time Sync (CPTS) Support"
depends on TI_CPSW
select PTP_1588_CLOCK
---help---
diff --git a/drivers/net/usb/Kconfig b/drivers/net/usb/Kconfig
index 37eed4d..3bd9678 100644
--- a/drivers/net/usb/Kconfig
+++ b/drivers/net/usb/Kconfig
@@ -397,14 +397,14 @@ config USB_NET_CDC_SUBSET
not generally have permanently assigned Ethernet addresses.

config USB_ALI_M5632
- boolean "ALi M5632 based 'USB 2.0 Data Link' cables"
+ bool "ALi M5632 based 'USB 2.0 Data Link' cables"
depends on USB_NET_CDC_SUBSET
help
Choose this option if you're using a host-to-host cable
based on this design, which supports USB 2.0 high speed.

config USB_AN2720
- boolean "AnchorChips 2720 based cables (Xircom PGUNET, ...)"
+ bool "AnchorChips 2720 based cables (Xircom PGUNET, ...)"
depends on USB_NET_CDC_SUBSET
help
Choose this option if you're using a host-to-host cable
@@ -412,7 +412,7 @@ config USB_AN2720
Cypress brand.

config USB_BELKIN
- boolean "eTEK based host-to-host cables (Advance, Belkin, ...)"
+ bool "eTEK based host-to-host cables (Advance, Belkin, ...)"
depends on USB_NET_CDC_SUBSET
default y
help
@@ -421,7 +421,7 @@ config USB_BELKIN
microcontroller, with LEDs that indicate traffic.

config USB_ARMLINUX
- boolean "Embedded ARM Linux links (iPaq, ...)"
+ bool "Embedded ARM Linux links (iPaq, ...)"
depends on USB_NET_CDC_SUBSET
default y
help
@@ -438,14 +438,14 @@ config USB_ARMLINUX
this simpler protocol by installing a different kernel.

config USB_EPSON2888
- boolean "Epson 2888 based firmware (DEVELOPMENT)"
+ bool "Epson 2888 based firmware (DEVELOPMENT)"
depends on USB_NET_CDC_SUBSET
help
Choose this option to support the usb networking links used
by some sample firmware from Epson.

config USB_KC2190
- boolean "KT Technology KC2190 based cables (InstaNet)"
+ bool "KT Technology KC2190 based cables (InstaNet)"
depends on USB_NET_CDC_SUBSET
help
Choose this option if you're using a host-to-host cable
diff --git a/drivers/net/wireless/rt2x00/Kconfig b/drivers/net/wireless/rt2x00/Kconfig
index 006b8bc..2b4ef25 100644
--- a/drivers/net/wireless/rt2x00/Kconfig
+++ b/drivers/net/wireless/rt2x00/Kconfig
@@ -243,14 +243,14 @@ config RT2X00_LIB
select AVERAGE

config RT2X00_LIB_FIRMWARE
- boolean
+ bool
select FW_LOADER

config RT2X00_LIB_CRYPTO
- boolean
+ bool

config RT2X00_LIB_LEDS
- boolean
+ bool
default y if (RT2X00_LIB=y && LEDS_CLASS=y) || (RT2X00_LIB=m && LEDS_CLASS!=n)

config RT2X00_LIB_DEBUGFS
diff --git a/drivers/pci/pcie/aer/Kconfig b/drivers/pci/pcie/aer/Kconfig
index 3894402..7d1437b 100644
--- a/drivers/pci/pcie/aer/Kconfig
+++ b/drivers/pci/pcie/aer/Kconfig
@@ -3,7 +3,7 @@
#

config PCIEAER
- boolean "Root Port Advanced Error Reporting support"
+ bool "Root Port Advanced Error Reporting support"
depends on PCIEPORTBUS
select RAS
default y
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index 6dd12dd..8c3592a 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -65,7 +65,7 @@ config RTC_DEBUG
comment "RTC interfaces"

config RTC_INTF_SYSFS
- boolean "/sys/class/rtc/rtcN (sysfs)"
+ bool "/sys/class/rtc/rtcN (sysfs)"
depends on SYSFS
default RTC_CLASS
help
@@ -75,7 +75,7 @@ config RTC_INTF_SYSFS
If unsure, say Y.

config RTC_INTF_PROC
- boolean "/proc/driver/rtc (procfs for rtcN)"
+ bool "/proc/driver/rtc (procfs for rtcN)"
depends on PROC_FS
default RTC_CLASS
help
@@ -88,7 +88,7 @@ config RTC_INTF_PROC
If unsure, say Y.

config RTC_INTF_DEV
- boolean "/dev/rtcN (character devices)"
+ bool "/dev/rtcN (character devices)"
default RTC_CLASS
help
Say yes here if you want to use your RTCs using the /dev
@@ -447,7 +447,7 @@ config RTC_DRV_DM355EVM
Supports the RTC firmware in the MSP430 on the DM355 EVM.

config RTC_DRV_TWL92330
- boolean "TI TWL92330/Menelaus"
+ bool "TI TWL92330/Menelaus"
depends on MENELAUS
help
If you say yes here you get support for the RTC on the
diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
index 84e7c9e..14953c3 100644
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
@@ -29,7 +29,7 @@ menuconfig SPI
if SPI

config SPI_DEBUG
- boolean "Debug support for SPI drivers"
+ bool "Debug support for SPI drivers"
depends on DEBUG_KERNEL
help
Say "yes" to enable debug messaging (like dev_dbg and pr_debug),
@@ -40,8 +40,8 @@ config SPI_DEBUG
#

config SPI_MASTER
-# boolean "SPI Master Support"
- boolean
+# bool "SPI Master Support"
+ bool
default SPI
help
If your system has an master-capable SPI controller (which
diff --git a/drivers/staging/board/Kconfig b/drivers/staging/board/Kconfig
index 7eda0b8..0a89ad1 100644
--- a/drivers/staging/board/Kconfig
+++ b/drivers/staging/board/Kconfig
@@ -1,5 +1,5 @@
config STAGING_BOARD
- boolean "Staging Board Support"
+ bool "Staging Board Support"
depends on OF_ADDRESS
depends on BROKEN
help
diff --git a/drivers/staging/emxx_udc/Kconfig b/drivers/staging/emxx_udc/Kconfig
index 9bc6d3d..cc34020 100644
--- a/drivers/staging/emxx_udc/Kconfig
+++ b/drivers/staging/emxx_udc/Kconfig
@@ -1,5 +1,5 @@
config USB_EMXX
- boolean "EMXX USB Function Device Controller"
+ bool "EMXX USB Function Device Controller"
depends on USB_GADGET && (ARCH_SHMOBILE || (ARM && COMPILE_TEST))
help
The Emma Mobile series of SoCs from Renesas Electronics and
diff --git a/drivers/staging/iio/Kconfig b/drivers/staging/iio/Kconfig
index fa38be0..2418302 100644
--- a/drivers/staging/iio/Kconfig
+++ b/drivers/staging/iio/Kconfig
@@ -30,13 +30,13 @@ config IIO_SIMPLE_DUMMY
if IIO_SIMPLE_DUMMY

config IIO_SIMPLE_DUMMY_EVENTS
- boolean "Event generation support"
+ bool "Event generation support"
select IIO_DUMMY_EVGEN
help
Add some dummy events to the simple dummy driver.

config IIO_SIMPLE_DUMMY_BUFFER
- boolean "Buffered capture support"
+ bool "Buffered capture support"
select IIO_BUFFER
select IIO_KFIFO_BUF
help
diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
index 649b784..fc80a50 100644
--- a/drivers/tty/serial/Kconfig
+++ b/drivers/tty/serial/Kconfig
@@ -498,7 +498,7 @@ config SERIAL_MFD_HSU
select SERIAL_CORE

config SERIAL_MFD_HSU_CONSOLE
- boolean "Medfile HSU serial console support"
+ bool "Medfile HSU serial console support"
depends on SERIAL_MFD_HSU=y
select SERIAL_CORE_CONSOLE

diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
index c4880fc..c9e269d 100644
--- a/drivers/usb/gadget/Kconfig
+++ b/drivers/usb/gadget/Kconfig
@@ -45,7 +45,7 @@ menuconfig USB_GADGET
if USB_GADGET

config USB_GADGET_DEBUG
- boolean "Debugging messages (DEVELOPMENT)"
+ bool "Debugging messages (DEVELOPMENT)"
depends on DEBUG_KERNEL
help
Many controller and gadget drivers will print some debugging
@@ -73,7 +73,7 @@ config USB_GADGET_VERBOSE
production build.

config USB_GADGET_DEBUG_FILES
- boolean "Debugging information files (DEVELOPMENT)"
+ bool "Debugging information files (DEVELOPMENT)"
depends on PROC_FS
help
Some of the drivers in the "gadget" framework can expose
@@ -84,7 +84,7 @@ config USB_GADGET_DEBUG_FILES
here. If in doubt, or to conserve kernel memory, say "N".

config USB_GADGET_DEBUG_FS
- boolean "Debugging information files in debugfs (DEVELOPMENT)"
+ bool "Debugging information files in debugfs (DEVELOPMENT)"
depends on DEBUG_FS
help
Some of the drivers in the "gadget" framework can expose
@@ -224,7 +224,7 @@ config USB_CONFIGFS
For more information see Documentation/usb/gadget_configfs.txt.

config USB_CONFIGFS_SERIAL
- boolean "Generic serial bulk in/out"
+ bool "Generic serial bulk in/out"
depends on USB_CONFIGFS
depends on TTY
select USB_U_SERIAL
@@ -233,7 +233,7 @@ config USB_CONFIGFS_SERIAL
The function talks to the Linux-USB generic serial driver.

config USB_CONFIGFS_ACM
- boolean "Abstract Control Model (CDC ACM)"
+ bool "Abstract Control Model (CDC ACM)"
depends on USB_CONFIGFS
depends on TTY
select USB_U_SERIAL
@@ -243,7 +243,7 @@ config USB_CONFIGFS_ACM
MS-Windows hosts or with the Linux-USB "cdc-acm" driver.

config USB_CONFIGFS_OBEX
- boolean "Object Exchange Model (CDC OBEX)"
+ bool "Object Exchange Model (CDC OBEX)"
depends on USB_CONFIGFS
depends on TTY
select USB_U_SERIAL
@@ -253,7 +253,7 @@ config USB_CONFIGFS_OBEX
since the kernel itself doesn't implement the OBEX protocol.

config USB_CONFIGFS_NCM
- boolean "Network Control Model (CDC NCM)"
+ bool "Network Control Model (CDC NCM)"
depends on USB_CONFIGFS
depends on NET
select USB_U_ETHER
@@ -264,7 +264,7 @@ config USB_CONFIGFS_NCM
different alignment possibilities.

config USB_CONFIGFS_ECM
- boolean "Ethernet Control Model (CDC ECM)"
+ bool "Ethernet Control Model (CDC ECM)"
depends on USB_CONFIGFS
depends on NET
select USB_U_ETHER
@@ -276,7 +276,7 @@ config USB_CONFIGFS_ECM
supported by firmware for smart network devices.

config USB_CONFIGFS_ECM_SUBSET
- boolean "Ethernet Control Model (CDC ECM) subset"
+ bool "Ethernet Control Model (CDC ECM) subset"
depends on USB_CONFIGFS
depends on NET
select USB_U_ETHER
@@ -317,7 +317,7 @@ config USB_CONFIGFS_EEM
the host is the same (a usbX device), so the differences are minimal.

config USB_CONFIGFS_PHONET
- boolean "Phonet protocol"
+ bool "Phonet protocol"
depends on USB_CONFIGFS
depends on NET
depends on PHONET
@@ -327,7 +327,7 @@ config USB_CONFIGFS_PHONET
The Phonet protocol implementation for USB device.

config USB_CONFIGFS_MASS_STORAGE
- boolean "Mass storage"
+ bool "Mass storage"
depends on USB_CONFIGFS
depends on BLOCK
select USB_F_MASS_STORAGE
@@ -338,7 +338,7 @@ config USB_CONFIGFS_MASS_STORAGE
specified as a module parameter or sysfs option.

config USB_CONFIGFS_F_LB_SS
- boolean "Loopback and sourcesink function (for testing)"
+ bool "Loopback and sourcesink function (for testing)"
depends on USB_CONFIGFS
select USB_F_SS_LB
help
@@ -351,7 +351,7 @@ config USB_CONFIGFS_F_LB_SS
and its driver through a basic set of functional tests.

config USB_CONFIGFS_F_FS
- boolean "Function filesystem (FunctionFS)"
+ bool "Function filesystem (FunctionFS)"
depends on USB_CONFIGFS
select USB_F_FS
help
diff --git a/drivers/usb/gadget/legacy/Kconfig b/drivers/usb/gadget/legacy/Kconfig
index 24392d2..e9020cc 100644
--- a/drivers/usb/gadget/legacy/Kconfig
+++ b/drivers/usb/gadget/legacy/Kconfig
@@ -40,7 +40,7 @@ config USB_ZERO
dynamically linked module called "g_zero".

config USB_ZERO_HNPTEST
- boolean "HNP Test Device"
+ bool "HNP Test Device"
depends on USB_ZERO && USB_OTG
help
You can configure this device to enumerate using the device
diff --git a/drivers/usb/gadget/udc/Kconfig b/drivers/usb/gadget/udc/Kconfig
index 217365d..ef956aa 100644
--- a/drivers/usb/gadget/udc/Kconfig
+++ b/drivers/usb/gadget/udc/Kconfig
@@ -198,7 +198,7 @@ config USB_S3C2410
S3C2440 processors.

config USB_S3C2410_DEBUG
- boolean "S3C2410 udc debug messages"
+ bool "S3C2410 udc debug messages"
depends on USB_S3C2410

config USB_S3C_HSUDC
@@ -285,7 +285,7 @@ config USB_NET2272
gadget drivers to also be dynamically linked.

config USB_NET2272_DMA
- boolean "Support external DMA controller"
+ bool "Support external DMA controller"
depends on USB_NET2272 && HAS_DMA
help
The NET2272 part can optionally support an external DMA
diff --git a/drivers/usb/phy/Kconfig b/drivers/usb/phy/Kconfig
index 0cd1f44..5b14d65 100644
--- a/drivers/usb/phy/Kconfig
+++ b/drivers/usb/phy/Kconfig
@@ -119,7 +119,7 @@ config TAHVO_USB

config TAHVO_USB_HOST_BY_DEFAULT
depends on TAHVO_USB
- boolean "Device in USB host mode by default"
+ bool "Device in USB host mode by default"
help
Say Y here, if you want the device to enter USB host mode
by default on bootup.
diff --git a/init/Kconfig b/init/Kconfig
index 2081a4d..10101dc 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -921,7 +921,7 @@ config NUMA_BALANCING
This system will be inactive on UMA systems.

menuconfig CGROUPS
- boolean "Control Group support"
+ bool "Control Group support"
select KERNFS
help
This option adds support for grouping sets of processes together, for
@@ -1775,7 +1775,7 @@ config SLABINFO
default y

config RT_MUTEXES
- boolean
+ bool

config BASE_SMALL
int
diff --git a/lib/Kconfig b/lib/Kconfig
index 54cf309..75da4d3 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -14,7 +14,7 @@ config BITREVERSE
tristate

config RATIONAL
- boolean
+ bool

config GENERIC_STRNCPY_FROM_USER
bool
@@ -39,14 +39,14 @@ config GENERIC_IOMAP
select GENERIC_PCI_IOMAP

config GENERIC_IO
- boolean
+ bool
default n

config STMP_DEVICE
bool

config PERCPU_RWSEM
- boolean
+ bool

config ARCH_USE_CMPXCHG_LOCKREF
bool
@@ -257,7 +257,7 @@ config DECOMPRESS_LZ4
# Generic allocator support is selected if needed
#
config GENERIC_ALLOCATOR
- boolean
+ bool

#
# reed solomon support is select'ed if needed
@@ -266,16 +266,16 @@ config REED_SOLOMON
tristate

config REED_SOLOMON_ENC8
- boolean
+ bool

config REED_SOLOMON_DEC8
- boolean
+ bool

config REED_SOLOMON_ENC16
- boolean
+ bool

config REED_SOLOMON_DEC16
- boolean
+ bool

#
# BCH support is selected if needed
@@ -284,7 +284,7 @@ config BCH
tristate

config BCH_CONST_PARAMS
- boolean
+ bool
help
Drivers may select this option to force specific constant
values for parameters 'm' (Galois field order) and 't'
@@ -320,7 +320,7 @@ config BCH_CONST_T
# Textsearch support is select'ed if needed
#
config TEXTSEARCH
- boolean
+ bool

config TEXTSEARCH_KMP
tristate
@@ -332,10 +332,10 @@ config TEXTSEARCH_FSM
tristate

config BTREE
- boolean
+ bool

config INTERVAL_TREE
- boolean
+ bool
help
Simple, embeddable, interval-tree. Can find the start of an
overlapping range in log(n) time and then iterate over all
@@ -363,18 +363,18 @@ config ASSOCIATIVE_ARRAY
for more information.

config HAS_IOMEM
- boolean
+ bool
depends on !NO_IOMEM
select GENERIC_IO
default y

config HAS_IOPORT_MAP
- boolean
+ bool
depends on HAS_IOMEM && !NO_IOPORT_MAP
default y

config HAS_DMA
- boolean
+ bool
depends on !NO_DMA
default y

diff --git a/mm/Kconfig b/mm/Kconfig
index 1d1ae6b..3953f41 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -129,28 +129,28 @@ config SPARSEMEM_VMEMMAP
efficient option when sufficient kernel resources are available.

config HAVE_MEMBLOCK
- boolean
+ bool

config HAVE_MEMBLOCK_NODE_MAP
- boolean
+ bool

config HAVE_MEMBLOCK_PHYS_MAP
- boolean
+ bool

config HAVE_GENERIC_RCU_GUP
- boolean
+ bool

config ARCH_DISCARD_MEMBLOCK
- boolean
+ bool

config NO_BOOTMEM
- boolean
+ bool

config MEMORY_ISOLATION
- boolean
+ bool

config MOVABLE_NODE
- boolean "Enable to assign a node which has only movable memory"
+ bool "Enable to assign a node which has only movable memory"
depends on HAVE_MEMBLOCK
depends on NO_BOOTMEM
depends on X86_64
@@ -228,12 +228,12 @@ config SPLIT_PTLOCK_CPUS
default "4"

config ARCH_ENABLE_SPLIT_PMD_PTLOCK
- boolean
+ bool

#
# support for memory balloon
config MEMORY_BALLOON
- boolean
+ bool

#
# support for memory balloon compaction
@@ -276,7 +276,7 @@ config MIGRATION
allocation instead of reclaiming.

config ARCH_ENABLE_HUGEPAGE_MIGRATION
- boolean
+ bool

config PHYS_ADDR_T_64BIT
def_bool 64BIT || ARCH_PHYS_ADDR_T_64BIT
diff --git a/net/Kconfig b/net/Kconfig
index 99815b5..49e3a54 100644
--- a/net/Kconfig
+++ b/net/Kconfig
@@ -230,18 +230,18 @@ source "net/mpls/Kconfig"
source "net/hsr/Kconfig"

config RPS
- boolean
+ bool
depends on SMP && SYSFS
default y

config RFS_ACCEL
- boolean
+ bool
depends on RPS
select CPU_RMAP
default y

config XPS
- boolean
+ bool
depends on SMP
default y

@@ -253,18 +253,18 @@ config CGROUP_NET_PRIO
a per-interface basis.

config CGROUP_NET_CLASSID
- boolean "Network classid cgroup"
+ bool "Network classid cgroup"
depends on CGROUPS
---help---
Cgroup subsystem for use as general purpose socket classid marker that is
being used in cls_cgroup and for netfilter matching.

config NET_RX_BUSY_POLL
- boolean
+ bool
default y

config BQL
- boolean
+ bool
depends on SYSFS
select DQL
default y
@@ -281,7 +281,7 @@ config BPF_JIT
this feature changing /proc/sys/net/core/bpf_jit_enable

config NET_FLOW_LIMIT
- boolean
+ bool
depends on RPS
default y
---help---
diff --git a/net/sched/Kconfig b/net/sched/Kconfig
index a1a8e29..1014127 100644
--- a/net/sched/Kconfig
+++ b/net/sched/Kconfig
@@ -347,7 +347,7 @@ config NET_SCH_PLUG
comment "Classification"

config NET_CLS
- boolean
+ bool

config NET_CLS_BASIC
tristate "Elementary classification (BASIC)"
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index f88d90f..412e66c 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -1116,7 +1116,7 @@ void set_all_choice_values(struct symbol *csym)
bool conf_set_all_new_symbols(enum conf_def_mode mode)
{
struct symbol *sym, *csym;
- int i, cnt, pby, pty, ptm; /* pby: probability of boolean = y
+ int i, cnt, pby, pty, ptm; /* pby: probability of bool = y
* pty: probability of tristate = y
* ptm: probability of tristate = m
*/
diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c
index 14cea74..03fddd5 100644
--- a/scripts/kconfig/mconf.c
+++ b/scripts/kconfig/mconf.c
@@ -246,7 +246,7 @@ search_help[] = N_(
" Selected by: BAR [=n]\n"
"-----------------------------------------------------------------\n"
"o The line 'Type:' shows the type of the configuration option for\n"
- " this symbol (boolean, tristate, string, ...)\n"
+ " this symbol (bool, tristate, string, ...)\n"
"o The line 'Prompt:' shows the text used in the menu structure for\n"
" this symbol\n"
"o The 'Defined at' line tells at what file / line number the symbol\n"
diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index a26cc5d..f3594fa 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/menu.c
@@ -256,14 +256,14 @@ static void sym_check_prop(struct symbol *sym)
if (sym->type != S_BOOLEAN && sym->type != S_TRISTATE)
prop_warn(prop,
"config symbol '%s' uses select, but is "
- "not boolean or tristate", sym->name);
+ "neither bool nor tristate", sym->name);
else if (sym2->type != S_UNKNOWN &&
sym2->type != S_BOOLEAN &&
sym2->type != S_TRISTATE)
prop_warn(prop,
"'%s' has wrong type. 'select' only "
- "accept arguments of boolean and "
- "tristate type", sym2->name);
+ "accepts arguments of type bool and "
+ "tristate", sym2->name);
break;
case P_RANGE:
if (sym->type != S_INT && sym->type != S_HEX)
diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
index 7caabdb..d855325 100644
--- a/scripts/kconfig/symbol.c
+++ b/scripts/kconfig/symbol.c
@@ -77,7 +77,7 @@ const char *sym_type_name(enum symbol_type type)
{
switch (type) {
case S_BOOLEAN:
- return "boolean";
+ return "bool";
case S_TRISTATE:
return "tristate";
case S_INT:
diff --git a/scripts/kconfig/zconf.gperf b/scripts/kconfig/zconf.gperf
index b6ac02d..d8fcf97 100644
--- a/scripts/kconfig/zconf.gperf
+++ b/scripts/kconfig/zconf.gperf
@@ -31,7 +31,6 @@ prompt, T_PROMPT, TF_COMMAND
tristate, T_TYPE, TF_COMMAND, S_TRISTATE
def_tristate, T_DEFAULT, TF_COMMAND, S_TRISTATE
bool, T_TYPE, TF_COMMAND, S_BOOLEAN
-boolean, T_TYPE, TF_COMMAND, S_BOOLEAN
def_bool, T_DEFAULT, TF_COMMAND, S_BOOLEAN
int, T_TYPE, TF_COMMAND, S_INT
hex, T_TYPE, TF_COMMAND, S_HEX
diff --git a/scripts/kconfig/zconf.hash.c_shipped b/scripts/kconfig/zconf.hash.c_shipped
index c77a8ef..c29b2a3 100644
--- a/scripts/kconfig/zconf.hash.c_shipped
+++ b/scripts/kconfig/zconf.hash.c_shipped
@@ -55,7 +55,7 @@ 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, 5, 25, 25,
+ 73, 73, 73, 73, 73, 73, 73, 5, 5, 25,
0, 0, 0, 5, 0, 0, 73, 73, 5, 0,
10, 5, 45, 73, 20, 20, 0, 15, 15, 73,
20, 5, 73, 73, 73, 73, 73, 73, 73, 73,
@@ -101,6 +101,7 @@ struct kconf_id_strings_t
char kconf_id_strings_str14[sizeof("defconfig_list")];
char kconf_id_strings_str17[sizeof("on")];
char kconf_id_strings_str18[sizeof("optional")];
+ char kconf_id_strings_str19[sizeof("bool")];
char kconf_id_strings_str21[sizeof("option")];
char kconf_id_strings_str22[sizeof("endmenu")];
char kconf_id_strings_str23[sizeof("mainmenu")];
@@ -113,12 +114,10 @@ struct kconf_id_strings_t
char kconf_id_strings_str33[sizeof("env")];
char kconf_id_strings_str35[sizeof("range")];
char kconf_id_strings_str36[sizeof("choice")];
- char kconf_id_strings_str39[sizeof("bool")];
char kconf_id_strings_str41[sizeof("source")];
char kconf_id_strings_str42[sizeof("visible")];
char kconf_id_strings_str43[sizeof("hex")];
char kconf_id_strings_str46[sizeof("config")];
- char kconf_id_strings_str47[sizeof("boolean")];
char kconf_id_strings_str51[sizeof("string")];
char kconf_id_strings_str54[sizeof("help")];
char kconf_id_strings_str56[sizeof("prompt")];
@@ -137,6 +136,7 @@ static const struct kconf_id_strings_t kconf_id_strings_contents =
"defconfig_list",
"on",
"optional",
+ "bool",
"option",
"endmenu",
"mainmenu",
@@ -149,12 +149,10 @@ static const struct kconf_id_strings_t kconf_id_strings_contents =
"env",
"range",
"choice",
- "bool",
"source",
"visible",
"hex",
"config",
- "boolean",
"string",
"help",
"prompt",
@@ -172,7 +170,7 @@ kconf_id_lookup (register const char *str, register unsigned int len)
{
enum
{
- TOTAL_KEYWORDS = 33,
+ TOTAL_KEYWORDS = 32,
MIN_WORD_LENGTH = 2,
MAX_WORD_LENGTH = 14,
MIN_HASH_VALUE = 2,
@@ -184,7 +182,7 @@ kconf_id_lookup (register const char *str, register unsigned int len)
{-1}, {-1},
#line 25 "scripts/kconfig/zconf.gperf"
{(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 35 "scripts/kconfig/zconf.gperf"
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str3, T_TYPE, TF_COMMAND, S_INT},
{-1},
#line 26 "scripts/kconfig/zconf.gperf"
@@ -199,17 +197,19 @@ kconf_id_lookup (register const char *str, register unsigned int len)
{-1}, {-1},
#line 32 "scripts/kconfig/zconf.gperf"
{(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 34 "scripts/kconfig/zconf.gperf"
{(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 44 "scripts/kconfig/zconf.gperf"
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str14, T_OPT_DEFCONFIG_LIST,TF_OPTION},
{-1}, {-1},
-#line 43 "scripts/kconfig/zconf.gperf"
+#line 42 "scripts/kconfig/zconf.gperf"
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str17, T_ON, TF_PARAM},
#line 28 "scripts/kconfig/zconf.gperf"
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str18, T_OPTIONAL, TF_COMMAND},
- {-1}, {-1},
-#line 42 "scripts/kconfig/zconf.gperf"
+#line 33 "scripts/kconfig/zconf.gperf"
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str19, T_TYPE, TF_COMMAND, S_BOOLEAN},
+ {-1},
+#line 41 "scripts/kconfig/zconf.gperf"
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str21, T_OPTION, TF_COMMAND},
#line 17 "scripts/kconfig/zconf.gperf"
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str22, T_ENDMENU, TF_COMMAND},
@@ -219,41 +219,36 @@ kconf_id_lookup (register const char *str, register unsigned int len)
#line 23 "scripts/kconfig/zconf.gperf"
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str25, T_MENUCONFIG, TF_COMMAND},
{-1},
-#line 44 "scripts/kconfig/zconf.gperf"
+#line 43 "scripts/kconfig/zconf.gperf"
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str27, T_OPT_MODULES, TF_OPTION},
-#line 47 "scripts/kconfig/zconf.gperf"
+#line 46 "scripts/kconfig/zconf.gperf"
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str28, T_OPT_ALLNOCONFIG_Y,TF_OPTION},
#line 16 "scripts/kconfig/zconf.gperf"
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str29, T_MENU, TF_COMMAND},
{-1},
-#line 39 "scripts/kconfig/zconf.gperf"
+#line 38 "scripts/kconfig/zconf.gperf"
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str31, T_SELECT, TF_COMMAND},
#line 21 "scripts/kconfig/zconf.gperf"
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str32, T_COMMENT, TF_COMMAND},
-#line 46 "scripts/kconfig/zconf.gperf"
+#line 45 "scripts/kconfig/zconf.gperf"
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str33, T_OPT_ENV, TF_OPTION},
{-1},
-#line 40 "scripts/kconfig/zconf.gperf"
+#line 39 "scripts/kconfig/zconf.gperf"
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str35, T_RANGE, TF_COMMAND},
#line 19 "scripts/kconfig/zconf.gperf"
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str36, T_CHOICE, TF_COMMAND},
- {-1}, {-1},
-#line 33 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str39, T_TYPE, TF_COMMAND, S_BOOLEAN},
- {-1},
+ {-1}, {-1}, {-1}, {-1},
#line 18 "scripts/kconfig/zconf.gperf"
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str41, T_SOURCE, TF_COMMAND},
-#line 41 "scripts/kconfig/zconf.gperf"
+#line 40 "scripts/kconfig/zconf.gperf"
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str42, T_VISIBLE, TF_COMMAND},
-#line 37 "scripts/kconfig/zconf.gperf"
+#line 36 "scripts/kconfig/zconf.gperf"
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str43, T_TYPE, TF_COMMAND, S_HEX},
{-1}, {-1},
#line 22 "scripts/kconfig/zconf.gperf"
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str46, T_CONFIG, TF_COMMAND},
-#line 34 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str47, T_TYPE, TF_COMMAND, S_BOOLEAN},
- {-1}, {-1}, {-1},
-#line 38 "scripts/kconfig/zconf.gperf"
+ {-1}, {-1}, {-1}, {-1},
+#line 37 "scripts/kconfig/zconf.gperf"
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str51, T_TYPE, TF_COMMAND, S_STRING},
{-1}, {-1},
#line 24 "scripts/kconfig/zconf.gperf"
@@ -285,5 +280,5 @@ kconf_id_lookup (register const char *str, register unsigned int len)
}
return 0;
}
-#line 48 "scripts/kconfig/zconf.gperf"
+#line 47 "scripts/kconfig/zconf.gperf"

diff --git a/scripts/kconfig/zconf.tab.c_shipped b/scripts/kconfig/zconf.tab.c_shipped
index 0864c7d..acdf6e3 100644
--- a/scripts/kconfig/zconf.tab.c_shipped
+++ b/scripts/kconfig/zconf.tab.c_shipped
@@ -2290,7 +2290,7 @@ static void print_symbol(FILE *out, struct menu *menu)
fprintf(out, "\nconfig %s\n", sym->name);
switch (sym->type) {
case S_BOOLEAN:
- fputs(" boolean\n", out);
+ fputs(" bool\n", out);
break;
case S_TRISTATE:
fputs(" tristate\n", out);
diff --git a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y
index 0f683cf..adb8828 100644
--- a/scripts/kconfig/zconf.y
+++ b/scripts/kconfig/zconf.y
@@ -607,7 +607,7 @@ static void print_symbol(FILE *out, struct menu *menu)
fprintf(out, "\nconfig %s\n", sym->name);
switch (sym->type) {
case S_BOOLEAN:
- fputs(" boolean\n", out);
+ fputs(" bool\n", out);
break;
case S_TRISTATE:
fputs(" tristate\n", out);
diff --git a/security/integrity/Kconfig b/security/integrity/Kconfig
index b76235a..73c457b 100644
--- a/security/integrity/Kconfig
+++ b/security/integrity/Kconfig
@@ -16,7 +16,7 @@ config INTEGRITY
if INTEGRITY

config INTEGRITY_SIGNATURE
- boolean "Digital signature verification using multiple keyrings"
+ bool "Digital signature verification using multiple keyrings"
depends on KEYS
default n
select SIGNATURE
@@ -30,7 +30,7 @@ config INTEGRITY_SIGNATURE
usually only added from initramfs.

config INTEGRITY_ASYMMETRIC_KEYS
- boolean "Enable asymmetric keys support"
+ bool "Enable asymmetric keys support"
depends on INTEGRITY_SIGNATURE
default n
select ASYMMETRIC_KEY_TYPE
diff --git a/security/integrity/evm/Kconfig b/security/integrity/evm/Kconfig
index df586fa..bf19723 100644
--- a/security/integrity/evm/Kconfig
+++ b/security/integrity/evm/Kconfig
@@ -1,5 +1,5 @@
config EVM
- boolean "EVM support"
+ bool "EVM support"
select KEYS
select ENCRYPTED_KEYS
select CRYPTO_HMAC
--
2.1.0

2014-12-08 18:51:06

by Paul Bolle

[permalink] [raw]
Subject: Re: [PATCH 2/3] kconfig: remove undocumented type definition alias 'boolean'

On Sun, 2014-12-07 at 20:49 -0500, Christoph Jaeger wrote:
> Having an undocumented alias for type definitions of boolean config options is
> more confusing than helpful. Remove support for the keyword 'boolean' in favor
> of 'bool' and convert all its users.
>
> While at it, fix some minor grammar issues in warning messages.
>
> Suggested-by: Daniel Borkmann <[email protected]>
> Signed-off-by: Christoph Jaeger <[email protected]>

This doesn't apply on next-20141208. What tree did you base this on?

Thanks,


Paul Bolle

2014-12-08 19:14:05

by Paul Bolle

[permalink] [raw]
Subject: Re: [PATCH 2/3] kconfig: remove undocumented type definition alias 'boolean'

On Mon, 2014-12-08 at 19:51 +0100, Paul Bolle wrote:
> This doesn't apply on next-20141208. What tree did you base this on?

I got it to apply on next-20141208 by dropping the hunk for
arch/cris/arch-v32/drivers/Kconfig and by making (trivial) context
changes to the hunks for init/Kconfig and net/Kconfig.

(My experience with actual maintainers is that they won't bother to do
that. Anyhow, Kconfig is basically unmaintained. And I don't know which
tree one should base ones Kconfig patches on.)

I'll muddle along...


Paul Bolle

2014-12-08 19:17:07

by Daniel Borkmann

[permalink] [raw]
Subject: Re: [PATCH 2/3] kconfig: remove undocumented type definition alias 'boolean'

On 12/08/2014 08:13 PM, Paul Bolle wrote:
> On Mon, 2014-12-08 at 19:51 +0100, Paul Bolle wrote:
>> This doesn't apply on next-20141208. What tree did you base this on?
>
> I got it to apply on next-20141208 by dropping the hunk for
> arch/cris/arch-v32/drivers/Kconfig and by making (trivial) context
> changes to the hunks for init/Kconfig and net/Kconfig.
>
> (My experience with actual maintainers is that they won't bother to do
> that. Anyhow, Kconfig is basically unmaintained. And I don't know which
> tree one should base ones Kconfig patches on.)

Well, I guess if in doubt then this could go into Andrew's tree. :)

> I'll muddle along...
>
>
> Paul Bolle
>

2014-12-08 19:41:31

by Paul Bolle

[permalink] [raw]
Subject: Re: [PATCH 2/3] kconfig: remove undocumented type definition alias 'boolean'

On Mon, 2014-12-08 at 20:16 +0100, Daniel Borkmann wrote:
> On 12/08/2014 08:13 PM, Paul Bolle wrote:
> > On Mon, 2014-12-08 at 19:51 +0100, Paul Bolle wrote:
> >> This doesn't apply on next-20141208. What tree did you base this on?
> >
> > I got it to apply on next-20141208 by dropping the hunk for
> > arch/cris/arch-v32/drivers/Kconfig and by making (trivial) context
> > changes to the hunks for init/Kconfig and net/Kconfig.
> >
> > (My experience with actual maintainers is that they won't bother to do
> > that. Anyhow, Kconfig is basically unmaintained. And I don't know which
> > tree one should base ones Kconfig patches on.)
>
> Well, I guess if in doubt then this could go into Andrew's tree. :)
>
> > I'll muddle along...

Checking this on the in tree defconfig files gave me a few hundred, it
seems, errors like:
net/switchdev/Kconfig:7: syntax error
net/switchdev/Kconfig:6: unknown option "boolean"
drivers/hwmon/pmbus/Kconfig:61: syntax error
drivers/hwmon/pmbus/Kconfig:60: unknown option "boolean"
drivers/usb/gadget/Kconfig:373: syntax error
drivers/usb/gadget/Kconfig:372: unknown option "boolean"
drivers/usb/gadget/Kconfig:386: syntax error
drivers/usb/gadget/Kconfig:385: unknown option "boolean"
drivers/usb/gadget/Kconfig:404: syntax error
drivers/usb/gadget/Kconfig:403: unknown option "boolean"
drivers/usb/gadget/Kconfig:418: syntax error
drivers/usb/gadget/Kconfig:417: unknown option "boolean"
make[1]: *** [oldconfig] Error 1
make: *** [oldconfig] Error 2

I assume these are uses of "boolean" added by trees merged in
next-20141208 after the tree that you based your patch on.

Well, it seems the treewide "boolean" cleanup should be done first.
Removing support for "boolean" could than be a second, separate step.
Just to ease review.

Thanks,


Paul Bolle

2014-12-08 20:21:05

by Paul Bolle

[permalink] [raw]
Subject: Re: [PATCH 0/3] remove undocumented type definition alias

On Sun, 2014-12-07 at 20:49 -0500, Christoph Jaeger wrote:
> This patchset removes support for the undocumented type definition keyword
> 'boolean', that is used in some config option definitions, in favor of the
> much more widely used 'bool'. Both are semantically equivalent.
>
> % git grep -w bool -- '*Kconfig*' | wc -l
> 7065
> % git grep -w boolean -- '*Kconfig*' | wc -l
> 94

(Side note: I _always_ use: $SOME_GIT_GREP $(git ls-files "*Kconfig*").
Have I been typing too much all those years?)

> Having this alias is more confusing than helpful.

Agree. (boolean is a better keyword than bool. Changing 7065 lines
instead of 94 for that reason alone would be overdoing it.)

> This change was suggested by Daniel Borkmann <[email protected]>.
>
>
> Patch 3/3 is purely cosmetic and therefore optional.
>
> Christoph Jaeger (3):
> kconfig: regenerate parser
> kconfig: remove undocumented type definition alias 'boolean'
> kconfig: rename S_BOOLEAN to S_BOOL for consistency

For the record. I tested these three patches, on top of next-20141208,
with this bit of perl:

use 5.016;
use warnings;
use autodie;

exit main ( @ARGV );

sub main {
my ($tree) = @ARGV;

open( my $git_ls_tree, "-|", "git", "ls-tree", "-r", $tree );
my $slurp = do { local $/ = undef; <$git_ls_tree> };
my @lines = split( /\n/, $slurp );
foreach my $line ( @lines ) {
my ( @tmp ) = split( /\s/, $line );
if ($tmp[3] =~ 'defconfig$' ) {
my $arch;
my $defconfig = $tmp[3];
($arch = $tmp[3]) =~ s/arch\/(\w+)\/.*/$1/;

`cp $defconfig .config`;
`yes "" | make ARCH=$arch oldconfig`;
my $out = `md5sum .config`;
my (@tmp) = split( /\s/, $out );
say( $tmp[0] );
}
}
close( $git_ls_tree );

0;
}

Note how I have trouble following my own whitespace rules. If someone
spots a flaw in this approach I'm all ears.

I'll add further feedback on the patches themselves.

Thanks,


Paul Bolle

2014-12-08 20:28:31

by Paul Bolle

[permalink] [raw]
Subject: Re: [PATCH 1/3] kconfig: regenerate parser

On Sun, 2014-12-07 at 20:49 -0500, Christoph Jaeger wrote:
> Regenerate the Kconfig parser with Bison 3.0.2 in preparation for a following

Nit: could you please add the exact command line too?

> commit. Otherwise the changes caused by the more recent Bison version would be
> intermingled with functional changes.
>
> Signed-off-by: Christoph Jaeger <[email protected]>
> ---

Are there any downsides to regenerating using, what looks like, a
current version of bison? I'm not aware there are.

I've tested this on all 463 defconfig files in next-20141208. None of
the generated .config files changed. So this patch is:
Tested-by: Paul Bolle <[email protected]>


Paul Bolle

2014-12-08 20:36:24

by Paul Bolle

[permalink] [raw]
Subject: Re: [PATCH 2/3] kconfig: remove undocumented type definition alias 'boolean'

On Mon, 2014-12-08 at 20:41 +0100, Paul Bolle wrote:
> On Mon, 2014-12-08 at 20:16 +0100, Daniel Borkmann wrote:
> > On 12/08/2014 08:13 PM, Paul Bolle wrote:
> > > On Mon, 2014-12-08 at 19:51 +0100, Paul Bolle wrote:
> > >> This doesn't apply on next-20141208. What tree did you base this on?
> > >
> > > I got it to apply on next-20141208 by dropping the hunk for
> > > arch/cris/arch-v32/drivers/Kconfig and by making (trivial) context
> > > changes to the hunks for init/Kconfig and net/Kconfig.
> > >
> > > (My experience with actual maintainers is that they won't bother to do
> > > that. Anyhow, Kconfig is basically unmaintained. And I don't know which
> > > tree one should base ones Kconfig patches on.)
> >
> > Well, I guess if in doubt then this could go into Andrew's tree. :)
> >
> > > I'll muddle along...
>
> Checking this on the in tree defconfig files gave me a few hundred, it
> seems, errors like:
> net/switchdev/Kconfig:7: syntax error
> net/switchdev/Kconfig:6: unknown option "boolean"
> drivers/hwmon/pmbus/Kconfig:61: syntax error
> drivers/hwmon/pmbus/Kconfig:60: unknown option "boolean"
> drivers/usb/gadget/Kconfig:373: syntax error
> drivers/usb/gadget/Kconfig:372: unknown option "boolean"
> drivers/usb/gadget/Kconfig:386: syntax error
> drivers/usb/gadget/Kconfig:385: unknown option "boolean"
> drivers/usb/gadget/Kconfig:404: syntax error
> drivers/usb/gadget/Kconfig:403: unknown option "boolean"
> drivers/usb/gadget/Kconfig:418: syntax error
> drivers/usb/gadget/Kconfig:417: unknown option "boolean"
> make[1]: *** [oldconfig] Error 1
> make: *** [oldconfig] Error 2
>
> I assume these are uses of "boolean" added by trees merged in
> next-20141208 after the tree that you based your patch on.

Changing these last uses of "boolean" did the trick.

> Well, it seems the treewide "boolean" cleanup should be done first.
> Removing support for "boolean" could than be a second, separate step.
> Just to ease review.

This appears to have no effect on the .config files I generated for the
defconfig files in next-20141208. (After porting the patch and changing
those last booleans to bool, that is.) So that's good.

If you'd resend as two patches on top of linux-next, I might add an
Acked-by: or a Tested-by:.

Thanks,


Paul Bolle

2014-12-08 20:43:18

by Paul Bolle

[permalink] [raw]
Subject: Re: [PATCH 3/3] kconfig: rename S_BOOLEAN to S_BOOL for consistency

On Sun, 2014-12-07 at 20:49 -0500, Christoph Jaeger wrote:
> Rename S_BOOLEAN to S_BOOL so that it reflects the actual string as
> S_TRISTATE, S_INT, etc., do. No functional changes.
>
> Signed-off-by: Christoph Jaeger <[email protected]>

If you resend this series, and take in account my comments on 2/3, feel
free to add:
Acked-by: Paul Bolle <[email protected]>

to this patch.

Thanks,


Paul Bolle

2014-12-08 21:15:06

by Paul Bolle

[permalink] [raw]
Subject: Re: [PATCH 2/3] kconfig: remove undocumented type definition alias 'boolean'

On Mon, 2014-12-08 at 21:36 +0100, Paul Bolle wrote:
> On Mon, 2014-12-08 at 20:41 +0100, Paul Bolle wrote:
> > Well, it seems the treewide "boolean" cleanup should be done first.
> > Removing support for "boolean" could than be a second, separate step.
> > Just to ease review.
>
> This appears to have no effect on the .config files I generated for the
> defconfig files in next-20141208. (After porting the patch and changing
> those last booleans to bool, that is.) So that's good.
>
> If you'd resend as two patches on top of linux-next, I might add an
> Acked-by: or a Tested-by:.

My last mail on this series. To make sure the tree stays buildable that
second patch to drop support for 'boolean' should only be applied a
release or two after the cleanup patch has been applied. Otherwise we're
bound to run into fun build errors in linux-next, and even mainline, for
quite a few commits, aren't we? One tree still using boolean is all it
takes...


Paul Bolle

2014-12-09 11:49:29

by Daniel Borkmann

[permalink] [raw]
Subject: Re: [PATCH 2/3] kconfig: remove undocumented type definition alias 'boolean'

On 12/08/2014 10:15 PM, Paul Bolle wrote:
> On Mon, 2014-12-08 at 21:36 +0100, Paul Bolle wrote:
>> On Mon, 2014-12-08 at 20:41 +0100, Paul Bolle wrote:
>>> Well, it seems the treewide "boolean" cleanup should be done first.
>>> Removing support for "boolean" could than be a second, separate step.
>>> Just to ease review.
>>
>> This appears to have no effect on the .config files I generated for the
>> defconfig files in next-20141208. (After porting the patch and changing
>> those last booleans to bool, that is.) So that's good.
>>
>> If you'd resend as two patches on top of linux-next, I might add an
>> Acked-by: or a Tested-by:.
>
> My last mail on this series. To make sure the tree stays buildable that
> second patch to drop support for 'boolean' should only be applied a
> release or two after the cleanup patch has been applied. Otherwise we're
> bound to run into fun build errors in linux-next, and even mainline, for
> quite a few commits, aren't we? One tree still using boolean is all it
> takes...

Sounds like a good plan, thanks a lot for looking into it, Paul!

Meanwhile, also checkpatch.pl could emit a deprecate warning in case
a patch carries Kconfig code with 'boolean' in it, but I leave that
up to Christoph to decide. ;)

2014-12-09 23:14:08

by Christoph Jaeger

[permalink] [raw]
Subject: Re: [PATCH 2/3] kconfig: remove undocumented type definition alias 'boolean'

On Tue, Dec 09, 2014 at 12:49:17PM +0100, Daniel Borkmann wrote:
> On 12/08/2014 10:15 PM, Paul Bolle wrote:
> >On Mon, 2014-12-08 at 21:36 +0100, Paul Bolle wrote:
> >>On Mon, 2014-12-08 at 20:41 +0100, Paul Bolle wrote:
> >>>Well, it seems the treewide "boolean" cleanup should be done first.
> >>>Removing support for "boolean" could than be a second, separate step.
> >>>Just to ease review.
> >>
> >>This appears to have no effect on the .config files I generated for the
> >>defconfig files in next-20141208. (After porting the patch and changing
> >>those last booleans to bool, that is.) So that's good.
> >>
> >>If you'd resend as two patches on top of linux-next, I might add an
> >>Acked-by: or a Tested-by:.
> >
> >My last mail on this series. To make sure the tree stays buildable that
> >second patch to drop support for 'boolean' should only be applied a
> >release or two after the cleanup patch has been applied. Otherwise we're
> >bound to run into fun build errors in linux-next, and even mainline, for
> >quite a few commits, aren't we? One tree still using boolean is all it
> >takes...
>
> Sounds like a good plan, thanks a lot for looking into it, Paul!
>
> Meanwhile, also checkpatch.pl could emit a deprecate warning in case
> a patch carries Kconfig code with 'boolean' in it, but I leave that
> up to Christoph to decide. ;)

Agree. Thanks for reviewing and testing!

I'll resend a series on top of linux-next that takes all of your suggestions
into account.

Thanks,
Chris