Showing the changes to scripts (19 of 19 files). Show all
Unified · Split
| @@ -170,8 +170,8 @@ mconf-objs := mconf.o zconf.tab.o $(lxdialog) · 169 unmodified lines | ||
| 170 | 170 | nconf-objs := nconf.o zconf.tab.o nconf.gui.o |
| 171 | 171 | kxgettext-objs := kxgettext.o zconf.tab.o |
| 172 | 172 | 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 | |
| 175 | 175 | |
| 176 | 176 | hostprogs-y := conf |
| 177 | 177 | |
| @@ -203,7 +203,7 @@ ifeq ($(gconf-target),1) · 25 unmodified lines | ||
| 203 | 203 | hostprogs-y += gconf |
| 204 | 204 | endif |
| 205 | 205 | |
| 206 | −clean-files := lkc_defs.h qconf.moc .tmp_qtcheck .tmp_gtkcheck | |
| 206 | +clean-files := qconf.moc .tmp_qtcheck .tmp_gtkcheck | |
| 207 | 207 | clean-files += zconf.tab.c lex.zconf.c zconf.hash.c gconf.glade.h |
| 208 | 208 | clean-files += mconf qconf gconf nconf |
| 209 | 209 | clean-files += config.pot linux.pot |
| @@ -223,12 +223,12 @@ HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCC) · 13 unmodified lines | ||
| 223 | 223 | HOSTCFLAGS_lex.zconf.o := -I$(src) |
| 224 | 224 | HOSTCFLAGS_zconf.tab.o := -I$(src) |
| 225 | 225 | |
| 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) | |
| 228 | 228 | |
| 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` | |
| 230 | 230 | HOSTCFLAGS_gconf.o = `pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0` \ |
| 231 | − -D LKC_DIRECT_LINK | |
| 231 | + -Wno-missing-prototypes | |
| 232 | 232 | |
| 233 | 233 | HOSTLOADLIBES_mconf = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC)) |
| 234 | 234 | |
| @@ -318,18 +318,11 @@ endif · 83 unmodified lines | ||
| 318 | 318 | |
| 319 | 319 | $(obj)/zconf.tab.o: $(obj)/lex.zconf.c $(obj)/zconf.hash.c |
| 320 | 320 | |
| 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 | |
| 326 | 322 | |
| 327 | 323 | $(obj)/%.moc: $(src)/%.h |
| 328 | 324 | $(KC_QT_MOC) -i $< -o $@ |
| 329 | 325 | |
| 330 | −$(obj)/lkc_defs.h: $(src)/lkc_proto.h | |
| 331 | − $(Q)sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/' | |
| 332 | − | |
| 333 | 326 | # Extract gconf menu items for I18N support |
| 334 | 327 | $(obj)/gconf.glade.h: $(obj)/gconf.glade |
| 335 | 328 | $(Q)intltool-extract --type=gettext/glade --srcdir=$(srctree) \ |
| @@ -14,7 +14,6 @@ · 13 unmodified lines | ||
| 14 | 14 | #include <sys/stat.h> |
| 15 | 15 | #include <sys/time.h> |
| 16 | 16 | |
| 17 | −#define LKC_DIRECT_LINK | |
| 18 | 17 | #include "lkc.h" |
| 19 | 18 | |
| 20 | 19 | static void conf(struct menu *menu); |
| @@ -106,6 +105,7 @@ static int conf_askvalue(struct symbol *sym, const char *def) · 85 unmodified lines | ||
| 106 | 105 | return 0; |
| 107 | 106 | } |
| 108 | 107 | check_stdin(); |
| 108 | + /* fall through */ | |
| 109 | 109 | case oldaskconfig: |
| 110 | 110 | fflush(stdout); |
| 111 | 111 | xfgets(line, 128, stdin); |
| @@ -150,6 +150,7 @@ static int conf_string(struct menu *menu) · 38 unmodified lines | ||
| 150 | 150 | def = NULL; |
| 151 | 151 | break; |
| 152 | 152 | } |
| 153 | + /* fall through */ | |
| 153 | 154 | default: |
| 154 | 155 | line[strlen(line)-1] = 0; |
| 155 | 156 | def = line; |
| @@ -304,6 +305,7 @@ static int conf_choice(struct menu *menu) · 148 unmodified lines | ||
| 304 | 305 | break; |
| 305 | 306 | } |
| 306 | 307 | check_stdin(); |
| 308 | + /* fall through */ | |
| 307 | 309 | case oldaskconfig: |
| 308 | 310 | fflush(stdout); |
| 309 | 311 | xfgets(line, 128, stdin); |
| @@ -369,6 +371,7 @@ static void conf(struct menu *menu) · 59 unmodified lines | ||
| 369 | 371 | check_conf(menu); |
| 370 | 372 | return; |
| 371 | 373 | } |
| 374 | + /* fall through */ | |
| 372 | 375 | case P_COMMENT: |
| 373 | 376 | prompt = menu_get_prompt(menu); |
| 374 | 377 | if (prompt) |
| @@ -7,13 +7,13 @@ · 6 unmodified lines | ||
| 7 | 7 | #include <ctype.h> |
| 8 | 8 | #include <errno.h> |
| 9 | 9 | #include <fcntl.h> |
| 10 | +#include <stdarg.h> | |
| 10 | 11 | #include <stdio.h> |
| 11 | 12 | #include <stdlib.h> |
| 12 | 13 | #include <string.h> |
| 13 | 14 | #include <time.h> |
| 14 | 15 | #include <unistd.h> |
| 15 | 16 | |
| 16 | −#define LKC_DIRECT_LINK | |
| 17 | 17 | #include "lkc.h" |
| 18 | 18 | |
| 19 | 19 | 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 | ||
| 128 | 128 | sym->flags |= def_flags; |
| 129 | 129 | break; |
| 130 | 130 | } |
| 131 | + /* fall through */ | |
| 131 | 132 | case S_BOOLEAN: |
| 132 | 133 | if (p[0] == 'y') { |
| 133 | 134 | 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 | ||
| 140 | 141 | break; |
| 141 | 142 | } |
| 142 | 143 | conf_warning("symbol value '%s' invalid for %s", p, sym->name); |
| 143 | − break; | |
| 144 | + return 1; | |
| 144 | 145 | case S_OTHER: |
| 145 | 146 | if (*p != '"') { |
| 146 | 147 | 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 | ||
| 148 | 149 | sym->type = S_STRING; |
| 149 | 150 | goto done; |
| 150 | 151 | } |
| 152 | + /* fall through */ | |
| 151 | 153 | case S_STRING: |
| 152 | 154 | if (*p++ != '"') |
| 153 | 155 | break; |
| @@ -162,6 +164,7 @@ static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p) · 8 unmodified lines | ||
| 162 | 164 | conf_warning("invalid string found"); |
| 163 | 165 | return 1; |
| 164 | 166 | } |
| 167 | + /* fall through */ | |
| 165 | 168 | case S_INT: |
| 166 | 169 | case S_HEX: |
| 167 | 170 | done: |
| @@ -237,6 +240,7 @@ load: · 69 unmodified lines | ||
| 237 | 240 | case S_STRING: |
| 238 | 241 | if (sym->def[def].val) |
| 239 | 242 | free(sym->def[def].val); |
| 243 | + /* fall through */ | |
| 240 | 244 | default: |
| 241 | 245 | sym->def[def].val = NULL; |
| 242 | 246 | sym->def[def].tri = no; |
| @@ -363,6 +367,7 @@ int conf_read(const char *name) · 120 unmodified lines | ||
| 363 | 367 | break; |
| 364 | 368 | if (!sym_is_choice(sym)) |
| 365 | 369 | goto sym_ok; |
| 370 | + /* fall through */ | |
| 366 | 371 | default: |
| 367 | 372 | if (!strcmp(sym->curr.val, sym->def[S_DEF_USER].val)) |
| 368 | 373 | goto sym_ok; |
| @@ -7,7 +7,6 @@ · 6 unmodified lines | ||
| 7 | 7 | #include <stdlib.h> |
| 8 | 8 | #include <string.h> |
| 9 | 9 | |
| 10 | −#define LKC_DIRECT_LINK | |
| 11 | 10 | #include "lkc.h" |
| 12 | 11 | |
| 13 | 12 | #define DEBUG_EXPR 0 |
| @@ -172,8 +172,6 @@ struct menu { · 171 unmodified lines | ||
| 172 | 172 | #define MENU_CHANGED 0x0001 |
| 173 | 173 | #define MENU_ROOT 0x0002 |
| 174 | 174 | |
| 175 | −#ifndef SWIG | |
| 176 | − | |
| 177 | 175 | extern struct file *file_list; |
| 178 | 176 | extern struct file *current_file; |
| 179 | 177 | struct file *lookup_file(const char *name); |
| @@ -218,7 +216,6 @@ static inline int expr_is_no(struct expr *e) · 38 unmodified lines | ||
| 218 | 216 | { |
| 219 | 217 | return e && (e->type == E_SYMBOL && e->left.sym == &symbol_no); |
| 220 | 218 | } |
| 221 | −#endif | |
| 222 | 219 | |
| 223 | 220 | #ifdef __cplusplus |
| 224 | 221 | } |
| @@ -285,8 +285,6 @@ void init_left_tree(void) · 284 unmodified lines | ||
| 285 | 285 | static void renderer_edited(GtkCellRendererText * cell, |
| 286 | 286 | const gchar * path_string, |
| 287 | 287 | const gchar * new_text, gpointer user_data); |
| 288 | −static void renderer_toggled(GtkCellRendererToggle * cellrenderertoggle, | |
| 289 | − gchar * arg1, gpointer user_data); | |
| 290 | 288 | |
| 291 | 289 | void init_right_tree(void) |
| 292 | 290 | { |
| @@ -320,8 +318,6 @@ void init_right_tree(void) · 27 unmodified lines | ||
| 320 | 318 | "inconsistent", COL_BTNINC, |
| 321 | 319 | "visible", COL_BTNVIS, |
| 322 | 320 | "radio", COL_BTNRAD, NULL); |
| 323 | − /*g_signal_connect(G_OBJECT(renderer), "toggled", | |
| 324 | − G_CALLBACK(renderer_toggled), NULL); */ | |
| 325 | 321 | renderer = gtk_cell_renderer_text_new(); |
| 326 | 322 | gtk_tree_view_column_pack_start(GTK_TREE_VIEW_COLUMN(column), |
| 327 | 323 | renderer, FALSE); |
| @@ -888,35 +884,6 @@ static void toggle_sym_value(struct menu *menu) · 560 unmodified lines | ||
| 888 | 884 | display_tree_part(); //fixme: keep exp/coll |
| 889 | 885 | } |
| 890 | 886 | |
| 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 | − | |
| 920 | 887 | static gint column2index(GtkTreeViewColumn * column) |
| 921 | 888 | { |
| 922 | 889 | gint i; |
| @@ -1172,6 +1139,7 @@ static gchar **fill_row(struct menu *menu) · 249 unmodified lines | ||
| 1172 | 1139 | row[COL_BTNVIS] = GINT_TO_POINTER(TRUE); |
| 1173 | 1140 | if (sym_is_choice(sym)) |
| 1174 | 1141 | break; |
| 1142 | + /* fall through */ | |
| 1175 | 1143 | case S_TRISTATE: |
| 1176 | 1144 | val = sym_get_tristate_value(sym); |
| 1177 | 1145 | switch (val) { |
| @@ -1506,10 +1474,6 @@ int main(int ac, char *av[]) · 328 unmodified lines | ||
| 1506 | 1474 | char *env; |
| 1507 | 1475 | gchar *glade_file; |
| 1508 | 1476 | |
| 1509 | −#ifndef LKC_DIRECT_LINK | |
| 1510 | − kconfig_load(); | |
| 1511 | −#endif | |
| 1512 | − | |
| 1513 | 1477 | bindtextdomain(PACKAGE, LOCALEDIR); |
| 1514 | 1478 | bind_textdomain_codeset(PACKAGE, "UTF-8"); |
| 1515 | 1479 | textdomain(PACKAGE); |
| @@ -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 | −} | |
| @@ -7,7 +7,6 @@ · 6 unmodified lines | ||
| 7 | 7 | #include <stdlib.h> |
| 8 | 8 | #include <string.h> |
| 9 | 9 | |
| 10 | −#define LKC_DIRECT_LINK | |
| 11 | 10 | #include "lkc.h" |
| 12 | 11 | |
| 13 | 12 | static char *escape(const char* text, char *bf, int len) |
| @@ -785,7 +785,6 @@ char *zconftext; · 784 unmodified lines | ||
| 785 | 785 | #include <string.h> |
| 786 | 786 | #include <unistd.h> |
| 787 | 787 | |
| 788 | −#define LKC_DIRECT_LINK | |
| 789 | 788 | #include "lkc.h" |
| 790 | 789 | |
| 791 | 790 | #define START_STRSIZE 16 |
| @@ -21,12 +21,7 @@ static inline char *bind_textdomain_codeset(const char *dn, char *c) { return c; · 20 unmodified lines | ||
| 21 | 21 | extern "C" { |
| 22 | 22 | #endif |
| 23 | 23 | |
| 24 | −#ifdef LKC_DIRECT_LINK | |
| 25 | 24 | #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 | |
| 30 | 25 | #include "lkc_proto.h" |
| 31 | 26 | #undef P |
| 32 | 27 | |
| @@ -18,7 +18,6 @@ · 17 unmodified lines | ||
| 18 | 18 | #include <unistd.h> |
| 19 | 19 | #include <locale.h> |
| 20 | 20 | |
| 21 | −#define LKC_DIRECT_LINK | |
| 22 | 21 | #include "lkc.h" |
| 23 | 22 | #include "lxdialog/dialog.h" |
| 24 | 23 | |
| @@ -845,6 +844,7 @@ int main(int ac, char **av) · 820 unmodified lines | ||
| 845 | 844 | "\n\n")); |
| 846 | 845 | return 1; |
| 847 | 846 | } |
| 847 | + /* fall through */ | |
| 848 | 848 | case -1: |
| 849 | 849 | printf(_("\n\n" |
| 850 | 850 | "*** End of the configuration.\n" |
| @@ -3,10 +3,11 @@ · 2 unmodified lines | ||
| 3 | 3 | * Released under the terms of the GNU GPL v2.0. |
| 4 | 4 | */ |
| 5 | 5 | |
| 6 | +#include <ctype.h> | |
| 7 | +#include <stdarg.h> | |
| 6 | 8 | #include <stdlib.h> |
| 7 | 9 | #include <string.h> |
| 8 | 10 | |
| 9 | −#define LKC_DIRECT_LINK | |
| 10 | 11 | #include "lkc.h" |
| 11 | 12 | |
| 12 | 13 | static const char nohelp_text[] = N_( |
| @@ -7,7 +7,7 @@ · 6 unmodified lines | ||
| 7 | 7 | */ |
| 8 | 8 | #define _GNU_SOURCE |
| 9 | 9 | #include <string.h> |
| 10 | −#define LKC_DIRECT_LINK | |
| 10 | + | |
| 11 | 11 | #include "lkc.h" |
| 12 | 12 | #include "nconf.h" |
| 13 | 13 | #include <ctype.h> |
| @@ -1745,10 +1745,6 @@ int main(int ac, char** av) · 1744 unmodified lines | ||
| 1745 | 1745 | bindtextdomain(PACKAGE, LOCALEDIR); |
| 1746 | 1746 | textdomain(PACKAGE); |
| 1747 | 1747 | |
| 1748 | −#ifndef LKC_DIRECT_LINK | |
| 1749 | − kconfig_load(); | |
| 1750 | −#endif | |
| 1751 | − | |
| 1752 | 1748 | progname = av[0]; |
| 1753 | 1749 | configApp = new QApplication(ac, av); |
| 1754 | 1750 | if (ac > 1 && av[1][0] == '-') { |
| @@ -9,7 +9,6 @@ · 8 unmodified lines | ||
| 9 | 9 | #include <regex.h> |
| 10 | 10 | #include <sys/utsname.h> |
| 11 | 11 | |
| 12 | −#define LKC_DIRECT_LINK | |
| 13 | 12 | #include "lkc.h" |
| 14 | 13 | |
| 15 | 14 | struct symbol symbol_yes = { |
| @@ -5,6 +5,8 @@ · 4 unmodified lines | ||
| 5 | 5 | * Released under the terms of the GNU GPL v2.0. |
| 6 | 6 | */ |
| 7 | 7 | |
| 8 | +#include <stdarg.h> | |
| 9 | +#include <stdlib.h> | |
| 8 | 10 | #include <string.h> |
| 9 | 11 | #include "lkc.h" |
| 10 | 12 | |
| @@ -14,7 +14,6 @@ · 13 unmodified lines | ||
| 14 | 14 | #include <string.h> |
| 15 | 15 | #include <unistd.h> |
| 16 | 16 | |
| 17 | −#define LKC_DIRECT_LINK | |
| 18 | 17 | #include "lkc.h" |
| 19 | 18 | |
| 20 | 19 | #define START_STRSIZE 16 |
| @@ -88,7 +88,6 @@ · 87 unmodified lines | ||
| 88 | 88 | #include <string.h> |
| 89 | 89 | #include <stdbool.h> |
| 90 | 90 | |
| 91 | −#define LKC_DIRECT_LINK | |
| 92 | 91 | #include "lkc.h" |
| 93 | 92 | |
| 94 | 93 | #define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt) |
| @@ -11,7 +11,6 @@ · 10 unmodified lines | ||
| 11 | 11 | #include <string.h> |
| 12 | 12 | #include <stdbool.h> |
| 13 | 13 | |
| 14 | −#define LKC_DIRECT_LINK | |
| 15 | 14 | #include "lkc.h" |
| 16 | 15 | |
| 17 | 16 | #define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt) |