]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
kconfig: split preprocessor prototypes into preprocess.h
authorMasahiro Yamada <masahiroy@kernel.org>
Fri, 2 Feb 2024 15:58:06 +0000 (00:58 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Mon, 19 Feb 2024 09:20:40 +0000 (18:20 +0900)
These are needed only for the parse stage. Move the prototypes into
a separate header to make sure they are not used after that.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
scripts/kconfig/lexer.l
scripts/kconfig/lkc_proto.h
scripts/kconfig/parser.y
scripts/kconfig/preprocess.c
scripts/kconfig/preprocess.h [new file with mode: 0644]

index 5f1bc33203073ec7748966f96fce7afae728a854..1bb372868ecf1d65f42f4bd68b7eeaa43ebf1053 100644 (file)
@@ -14,6 +14,8 @@
 #include <string.h>
 
 #include "lkc.h"
+#include "preprocess.h"
+
 #include "parser.tab.h"
 
 #define YY_DECL                static int yylex1(void)
index 85491d74a0942d40e546946ed4d14afa6bc04696..94299e42402fa7a8d58cc7a18c951b35ce8e1b65 100644 (file)
@@ -40,19 +40,6 @@ const char * sym_get_string_value(struct symbol *sym);
 
 const char * prop_get_type_name(enum prop_type type);
 
-/* preprocess.c */
-enum variable_flavor {
-       VAR_SIMPLE,
-       VAR_RECURSIVE,
-       VAR_APPEND,
-};
-void env_write_dep(struct gstr *gs);
-void variable_add(const char *name, const char *value,
-                 enum variable_flavor flavor);
-void variable_all_del(void);
-char *expand_dollar(const char **str);
-char *expand_one_token(const char **str);
-
 /* expr.c */
 void expr_print(struct expr *e, void (*fn)(void *, struct symbol *, const char *), void *data, int prevtoken);
 
index cfb82ba09037da539f3068777966313af1cbfa0a..ff68def09a2bfc34ce82a0b506f5c55489b1f25f 100644 (file)
@@ -13,6 +13,7 @@
 
 #include "lkc.h"
 #include "internal.h"
+#include "preprocess.h"
 
 #define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt)
 
index b9853d4a891c8b046bba114d44f3a5d439f4b66b..12665b981c3e50f1ca6d7f89784472b16782ac82 100644 (file)
@@ -11,6 +11,7 @@
 
 #include "list.h"
 #include "lkc.h"
+#include "preprocess.h"
 
 #define ARRAY_SIZE(arr)                (sizeof(arr) / sizeof((arr)[0]))
 
diff --git a/scripts/kconfig/preprocess.h b/scripts/kconfig/preprocess.h
new file mode 100644 (file)
index 0000000..a7e4a55
--- /dev/null
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+#ifndef PREPROCESS_H
+#define PREPROCESS_H
+
+enum variable_flavor {
+       VAR_SIMPLE,
+       VAR_RECURSIVE,
+       VAR_APPEND,
+};
+
+struct gstr;
+void env_write_dep(struct gstr *gs);
+void variable_add(const char *name, const char *value,
+                 enum variable_flavor flavor);
+void variable_all_del(void);
+char *expand_dollar(const char **str);
+char *expand_one_token(const char **str);
+
+#endif /* PREPROCESS_H */