History

Merge branch 'kconfig-trivial' of git://github.com/lacombar/linux-2.6 into kbuild/kconfig

Michal Marek committed 15 years ago

Commit 36fee532 parents a61944c 1ea3ad419 files · +26 −112Browse files

Showing the changes to scripts (19 of 19 files). Show all

Unified · Split

19 files
  1. scripts/kconfig/Makefile +8 −15
  2. scripts/kconfig/conf.c +4 −1
  3. scripts/kconfig/confdata.c +7 −2
  4. scripts/kconfig/expr.c +0 −1
  5. scripts/kconfig/expr.h +0 −3
  6. scripts/kconfig/gconf.c +1 −37
  7. scripts/kconfig/kconfig_load.c +0 −35
  8. scripts/kconfig/kxgettext.c +0 −1
  9. scripts/kconfig/lex.zconf.c_shipped +0 −1
  10. scripts/kconfig/lkc.h +0 −5
  11. scripts/kconfig/mconf.c +1 −1
  12. scripts/kconfig/menu.c +2 −1
  13. scripts/kconfig/nconf.c +1 −1
  14. scripts/kconfig/qconf.cc +0 −4
  15. scripts/kconfig/symbol.c +0 −1
  16. scripts/kconfig/util.c +2 −0
  17. scripts/kconfig/zconf.l +0 −1
  18. scripts/kconfig/zconf.tab.c_shipped +0 −1
  19. scripts/kconfig/zconf.y +0 −1
scripts/kconfig/Makefile+8−15
@@ -170,8 +170,8 @@ mconf-objs := mconf.o zconf.tab.o $(lxdialog) · 169 unmodified lines
170170 nconf-objs := nconf.o zconf.tab.o nconf.gui.o
171171 kxgettext-objs := kxgettext.o zconf.tab.o
172172 qconf-cxxobjs := qconf.o
173−qconf-objs := kconfig_load.o zconf.tab.o
174−gconf-objs := gconf.o kconfig_load.o zconf.tab.o
173+qconf-objs := zconf.tab.o
174+gconf-objs := gconf.o zconf.tab.o
175175
176176 hostprogs-y := conf
177177
@@ -203,7 +203,7 @@ ifeq ($(gconf-target),1) · 25 unmodified lines
203203 hostprogs-y += gconf
204204 endif
205205
206−clean-files := lkc_defs.h qconf.moc .tmp_qtcheck .tmp_gtkcheck
206+clean-files := qconf.moc .tmp_qtcheck .tmp_gtkcheck
207207 clean-files += zconf.tab.c lex.zconf.c zconf.hash.c gconf.glade.h
208208 clean-files += mconf qconf gconf nconf
209209 clean-files += config.pot linux.pot
@@ -223,12 +223,12 @@ HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCC) · 13 unmodified lines
223223 HOSTCFLAGS_lex.zconf.o := -I$(src)
224224 HOSTCFLAGS_zconf.tab.o := -I$(src)
225225
226−HOSTLOADLIBES_qconf = $(KC_QT_LIBS) -ldl
227−HOSTCXXFLAGS_qconf.o = $(KC_QT_CFLAGS) -D LKC_DIRECT_LINK
226+HOSTLOADLIBES_qconf = $(KC_QT_LIBS)
227+HOSTCXXFLAGS_qconf.o = $(KC_QT_CFLAGS)
228228
229−HOSTLOADLIBES_gconf = `pkg-config --libs gtk+-2.0 gmodule-2.0 libglade-2.0` -ldl
229+HOSTLOADLIBES_gconf = `pkg-config --libs gtk+-2.0 gmodule-2.0 libglade-2.0`
230230 HOSTCFLAGS_gconf.o = `pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0` \
231− -D LKC_DIRECT_LINK
231+ -Wno-missing-prototypes
232232
233233 HOSTLOADLIBES_mconf = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC))
234234
@@ -318,18 +318,11 @@ endif · 83 unmodified lines
318318
319319 $(obj)/zconf.tab.o: $(obj)/lex.zconf.c $(obj)/zconf.hash.c
320320
321−$(obj)/kconfig_load.o: $(obj)/lkc_defs.h
322−
323−$(obj)/qconf.o: $(obj)/qconf.moc $(obj)/lkc_defs.h
324−
325−$(obj)/gconf.o: $(obj)/lkc_defs.h
321+$(obj)/qconf.o: $(obj)/qconf.moc
326322
327323 $(obj)/%.moc: $(src)/%.h
328324 $(KC_QT_MOC) -i $< -o $@
329325
330−$(obj)/lkc_defs.h: $(src)/lkc_proto.h
331− $(Q)sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/'
332−
333326 # Extract gconf menu items for I18N support
334327 $(obj)/gconf.glade.h: $(obj)/gconf.glade
335328 $(Q)intltool-extract --type=gettext/glade --srcdir=$(srctree) \
scripts/kconfig/conf.c+4−1
@@ -14,7 +14,6 @@ · 13 unmodified lines
1414 #include <sys/stat.h>
1515 #include <sys/time.h>
1616
17−#define LKC_DIRECT_LINK
1817 #include "lkc.h"
1918
2019 static void conf(struct menu *menu);
@@ -106,6 +105,7 @@ static int conf_askvalue(struct symbol *sym, const char *def) · 85 unmodified lines
106105 return 0;
107106 }
108107 check_stdin();
108+ /* fall through */
109109 case oldaskconfig:
110110 fflush(stdout);
111111 xfgets(line, 128, stdin);
@@ -150,6 +150,7 @@ static int conf_string(struct menu *menu) · 38 unmodified lines
150150 def = NULL;
151151 break;
152152 }
153+ /* fall through */
153154 default:
154155 line[strlen(line)-1] = 0;
155156 def = line;
@@ -304,6 +305,7 @@ static int conf_choice(struct menu *menu) · 148 unmodified lines
304305 break;
305306 }
306307 check_stdin();
308+ /* fall through */
307309 case oldaskconfig:
308310 fflush(stdout);
309311 xfgets(line, 128, stdin);
@@ -369,6 +371,7 @@ static void conf(struct menu *menu) · 59 unmodified lines
369371 check_conf(menu);
370372 return;
371373 }
374+ /* fall through */
372375 case P_COMMENT:
373376 prompt = menu_get_prompt(menu);
374377 if (prompt)
scripts/kconfig/confdata.c+7−2
@@ -7,13 +7,13 @@ · 6 unmodified lines
77 #include <ctype.h>
88 #include <errno.h>
99 #include <fcntl.h>
10+#include <stdarg.h>
1011 #include <stdio.h>
1112 #include <stdlib.h>
1213 #include <string.h>
1314 #include <time.h>
1415 #include <unistd.h>
1516
16−#define LKC_DIRECT_LINK
1717 #include "lkc.h"
1818
1919 static void conf_warning(const char *fmt, ...)
@@ -128,6 +128,7 @@ static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p) · 108 unmodified lines
128128 sym->flags |= def_flags;
129129 break;
130130 }
131+ /* fall through */
131132 case S_BOOLEAN:
132133 if (p[0] == 'y') {
133134 sym->def[def].tri = yes;
@@ -140,7 +141,7 @@ static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p) · 6 unmodified lines
140141 break;
141142 }
142143 conf_warning("symbol value '%s' invalid for %s", p, sym->name);
143− break;
144+ return 1;
144145 case S_OTHER:
145146 if (*p != '"') {
146147 for (p2 = p; *p2 && !isspace(*p2); p2++)
@@ -148,6 +149,7 @@ static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p) · 1 unmodified line
148149 sym->type = S_STRING;
149150 goto done;
150151 }
152+ /* fall through */
151153 case S_STRING:
152154 if (*p++ != '"')
153155 break;
@@ -162,6 +164,7 @@ static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p) · 8 unmodified lines
162164 conf_warning("invalid string found");
163165 return 1;
164166 }
167+ /* fall through */
165168 case S_INT:
166169 case S_HEX:
167170 done:
@@ -237,6 +240,7 @@ load: · 69 unmodified lines
237240 case S_STRING:
238241 if (sym->def[def].val)
239242 free(sym->def[def].val);
243+ /* fall through */
240244 default:
241245 sym->def[def].val = NULL;
242246 sym->def[def].tri = no;
@@ -363,6 +367,7 @@ int conf_read(const char *name) · 120 unmodified lines
363367 break;
364368 if (!sym_is_choice(sym))
365369 goto sym_ok;
370+ /* fall through */
366371 default:
367372 if (!strcmp(sym->curr.val, sym->def[S_DEF_USER].val))
368373 goto sym_ok;
scripts/kconfig/expr.c+0−1
@@ -7,7 +7,6 @@ · 6 unmodified lines
77 #include <stdlib.h>
88 #include <string.h>
99
10−#define LKC_DIRECT_LINK
1110 #include "lkc.h"
1211
1312 #define DEBUG_EXPR 0
scripts/kconfig/expr.h+0−3
@@ -172,8 +172,6 @@ struct menu { · 171 unmodified lines
172172 #define MENU_CHANGED 0x0001
173173 #define MENU_ROOT 0x0002
174174
175−#ifndef SWIG
176−
177175 extern struct file *file_list;
178176 extern struct file *current_file;
179177 struct file *lookup_file(const char *name);
@@ -218,7 +216,6 @@ static inline int expr_is_no(struct expr *e) · 38 unmodified lines
218216 {
219217 return e && (e->type == E_SYMBOL && e->left.sym == &symbol_no);
220218 }
221−#endif
222219
223220 #ifdef __cplusplus
224221 }
scripts/kconfig/gconf.c+1−37
@@ -285,8 +285,6 @@ void init_left_tree(void) · 284 unmodified lines
285285 static void renderer_edited(GtkCellRendererText * cell,
286286 const gchar * path_string,
287287 const gchar * new_text, gpointer user_data);
288−static void renderer_toggled(GtkCellRendererToggle * cellrenderertoggle,
289− gchar * arg1, gpointer user_data);
290288
291289 void init_right_tree(void)
292290 {
@@ -320,8 +318,6 @@ void init_right_tree(void) · 27 unmodified lines
320318 "inconsistent", COL_BTNINC,
321319 "visible", COL_BTNVIS,
322320 "radio", COL_BTNRAD, NULL);
323− /*g_signal_connect(G_OBJECT(renderer), "toggled",
324− G_CALLBACK(renderer_toggled), NULL); */
325321 renderer = gtk_cell_renderer_text_new();
326322 gtk_tree_view_column_pack_start(GTK_TREE_VIEW_COLUMN(column),
327323 renderer, FALSE);
@@ -888,35 +884,6 @@ static void toggle_sym_value(struct menu *menu) · 560 unmodified lines
888884 display_tree_part(); //fixme: keep exp/coll
889885 }
890886
891−static void renderer_toggled(GtkCellRendererToggle * cell,
892− gchar * path_string, gpointer user_data)
893−{
894− GtkTreePath *path, *sel_path = NULL;
895− GtkTreeIter iter, sel_iter;
896− GtkTreeSelection *sel;
897− struct menu *menu;
898−
899− path = gtk_tree_path_new_from_string(path_string);
900− if (!gtk_tree_model_get_iter(model2, &iter, path))
901− return;
902−
903− sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(tree2_w));
904− if (gtk_tree_selection_get_selected(sel, NULL, &sel_iter))
905− sel_path = gtk_tree_model_get_path(model2, &sel_iter);
906− if (!sel_path)
907− goto out1;
908− if (gtk_tree_path_compare(path, sel_path))
909− goto out2;
910−
911− gtk_tree_model_get(model2, &iter, COL_MENU, &menu, -1);
912− toggle_sym_value(menu);
913−
914− out2:
915− gtk_tree_path_free(sel_path);
916− out1:
917− gtk_tree_path_free(path);
918−}
919−
920887 static gint column2index(GtkTreeViewColumn * column)
921888 {
922889 gint i;
@@ -1172,6 +1139,7 @@ static gchar **fill_row(struct menu *menu) · 249 unmodified lines
11721139 row[COL_BTNVIS] = GINT_TO_POINTER(TRUE);
11731140 if (sym_is_choice(sym))
11741141 break;
1142+ /* fall through */
11751143 case S_TRISTATE:
11761144 val = sym_get_tristate_value(sym);
11771145 switch (val) {
@@ -1506,10 +1474,6 @@ int main(int ac, char *av[]) · 328 unmodified lines
15061474 char *env;
15071475 gchar *glade_file;
15081476
1509−#ifndef LKC_DIRECT_LINK
1510− kconfig_load();
1511−#endif
1512−
15131477 bindtextdomain(PACKAGE, LOCALEDIR);
15141478 bind_textdomain_codeset(PACKAGE, "UTF-8");
15151479 textdomain(PACKAGE);
scripts/kconfig/kconfig_load.c+0−35
@@ -1,35 +0,0 @@
1−#include <dlfcn.h>
2−#include <stdio.h>
3−#include <stdlib.h>
4−
5−#include "lkc.h"
6−
7−#define P(name,type,arg) type (*name ## _p) arg
8−#include "lkc_proto.h"
9−#undef P
10−
11−void kconfig_load(void)
12−{
13− void *handle;
14− char *error;
15−
16− handle = dlopen("./libkconfig.so", RTLD_LAZY);
17− if (!handle) {
18− handle = dlopen("./scripts/kconfig/libkconfig.so", RTLD_LAZY);
19− if (!handle) {
20− fprintf(stderr, "%s\n", dlerror());
21− exit(1);
22− }
23− }
24−
25−#define P(name,type,arg) \
26−{ \
27− name ## _p = dlsym(handle, #name); \
28− if ((error = dlerror())) { \
29− fprintf(stderr, "%s\n", error); \
30− exit(1); \
31− } \
32−}
33−#include "lkc_proto.h"
34−#undef P
35−}
scripts/kconfig/kxgettext.c+0−1
@@ -7,7 +7,6 @@ · 6 unmodified lines
77 #include <stdlib.h>
88 #include <string.h>
99
10−#define LKC_DIRECT_LINK
1110 #include "lkc.h"
1211
1312 static char *escape(const char* text, char *bf, int len)
scripts/kconfig/lex.zconf.c_shipped+0−1
@@ -785,7 +785,6 @@ char *zconftext; · 784 unmodified lines
785785 #include <string.h>
786786 #include <unistd.h>
787787
788−#define LKC_DIRECT_LINK
789788 #include "lkc.h"
790789
791790 #define START_STRSIZE 16
scripts/kconfig/lkc.h+0−5
@@ -21,12 +21,7 @@ static inline char *bind_textdomain_codeset(const char *dn, char *c) { return c; · 20 unmodified lines
2121 extern "C" {
2222 #endif
2323
24−#ifdef LKC_DIRECT_LINK
2524 #define P(name,type,arg) extern type name arg
26−#else
27−#include "lkc_defs.h"
28−#define P(name,type,arg) extern type (*name ## _p) arg
29−#endif
3025 #include "lkc_proto.h"
3126 #undef P
3227
scripts/kconfig/mconf.c+1−1
@@ -18,7 +18,6 @@ · 17 unmodified lines
1818 #include <unistd.h>
1919 #include <locale.h>
2020
21−#define LKC_DIRECT_LINK
2221 #include "lkc.h"
2322 #include "lxdialog/dialog.h"
2423
@@ -845,6 +844,7 @@ int main(int ac, char **av) · 820 unmodified lines
845844 "\n\n"));
846845 return 1;
847846 }
847+ /* fall through */
848848 case -1:
849849 printf(_("\n\n"
850850 "*** End of the configuration.\n"
scripts/kconfig/menu.c+2−1
@@ -3,10 +3,11 @@ · 2 unmodified lines
33 * Released under the terms of the GNU GPL v2.0.
44 */
55
6+#include <ctype.h>
7+#include <stdarg.h>
68 #include <stdlib.h>
79 #include <string.h>
810
9−#define LKC_DIRECT_LINK
1011 #include "lkc.h"
1112
1213 static const char nohelp_text[] = N_(
scripts/kconfig/nconf.c+1−1
@@ -7,7 +7,7 @@ · 6 unmodified lines
77 */
88 #define _GNU_SOURCE
99 #include <string.h>
10−#define LKC_DIRECT_LINK
10+
1111 #include "lkc.h"
1212 #include "nconf.h"
1313 #include <ctype.h>
scripts/kconfig/qconf.cc+0−4
@@ -1745,10 +1745,6 @@ int main(int ac, char** av) · 1744 unmodified lines
17451745 bindtextdomain(PACKAGE, LOCALEDIR);
17461746 textdomain(PACKAGE);
17471747
1748−#ifndef LKC_DIRECT_LINK
1749− kconfig_load();
1750−#endif
1751−
17521748 progname = av[0];
17531749 configApp = new QApplication(ac, av);
17541750 if (ac > 1 && av[1][0] == '-') {
scripts/kconfig/symbol.c+0−1
@@ -9,7 +9,6 @@ · 8 unmodified lines
99 #include <regex.h>
1010 #include <sys/utsname.h>
1111
12−#define LKC_DIRECT_LINK
1312 #include "lkc.h"
1413
1514 struct symbol symbol_yes = {
scripts/kconfig/util.c+2−0
@@ -5,6 +5,8 @@ · 4 unmodified lines
55 * Released under the terms of the GNU GPL v2.0.
66 */
77
8+#include <stdarg.h>
9+#include <stdlib.h>
810 #include <string.h>
911 #include "lkc.h"
1012
scripts/kconfig/zconf.l+0−1
@@ -14,7 +14,6 @@ · 13 unmodified lines
1414 #include <string.h>
1515 #include <unistd.h>
1616
17−#define LKC_DIRECT_LINK
1817 #include "lkc.h"
1918
2019 #define START_STRSIZE 16
scripts/kconfig/zconf.tab.c_shipped+0−1
@@ -88,7 +88,6 @@ · 87 unmodified lines
8888 #include <string.h>
8989 #include <stdbool.h>
9090
91−#define LKC_DIRECT_LINK
9291 #include "lkc.h"
9392
9493 #define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt)
scripts/kconfig/zconf.y+0−1
@@ -11,7 +11,6 @@ · 10 unmodified lines
1111 #include <string.h>
1212 #include <stdbool.h>
1313
14−#define LKC_DIRECT_LINK
1514 #include "lkc.h"
1615
1716 #define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt)