Commit 36fee535 authored by Michal Marek's avatar Michal Marek

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

parents a61944c2 1ea3ad4e
...@@ -170,8 +170,8 @@ mconf-objs := mconf.o zconf.tab.o $(lxdialog) ...@@ -170,8 +170,8 @@ mconf-objs := mconf.o zconf.tab.o $(lxdialog)
nconf-objs := nconf.o zconf.tab.o nconf.gui.o nconf-objs := nconf.o zconf.tab.o nconf.gui.o
kxgettext-objs := kxgettext.o zconf.tab.o kxgettext-objs := kxgettext.o zconf.tab.o
qconf-cxxobjs := qconf.o qconf-cxxobjs := qconf.o
qconf-objs := kconfig_load.o zconf.tab.o qconf-objs := zconf.tab.o
gconf-objs := gconf.o kconfig_load.o zconf.tab.o gconf-objs := gconf.o zconf.tab.o
hostprogs-y := conf hostprogs-y := conf
...@@ -203,7 +203,7 @@ ifeq ($(gconf-target),1) ...@@ -203,7 +203,7 @@ ifeq ($(gconf-target),1)
hostprogs-y += gconf hostprogs-y += gconf
endif endif
clean-files := lkc_defs.h qconf.moc .tmp_qtcheck .tmp_gtkcheck clean-files := qconf.moc .tmp_qtcheck .tmp_gtkcheck
clean-files += zconf.tab.c lex.zconf.c zconf.hash.c gconf.glade.h clean-files += zconf.tab.c lex.zconf.c zconf.hash.c gconf.glade.h
clean-files += mconf qconf gconf nconf clean-files += mconf qconf gconf nconf
clean-files += config.pot linux.pot clean-files += config.pot linux.pot
...@@ -223,12 +223,12 @@ HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCC) ...@@ -223,12 +223,12 @@ HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCC)
HOSTCFLAGS_lex.zconf.o := -I$(src) HOSTCFLAGS_lex.zconf.o := -I$(src)
HOSTCFLAGS_zconf.tab.o := -I$(src) HOSTCFLAGS_zconf.tab.o := -I$(src)
HOSTLOADLIBES_qconf = $(KC_QT_LIBS) -ldl HOSTLOADLIBES_qconf = $(KC_QT_LIBS)
HOSTCXXFLAGS_qconf.o = $(KC_QT_CFLAGS) -D LKC_DIRECT_LINK HOSTCXXFLAGS_qconf.o = $(KC_QT_CFLAGS)
HOSTLOADLIBES_gconf = `pkg-config --libs gtk+-2.0 gmodule-2.0 libglade-2.0` -ldl HOSTLOADLIBES_gconf = `pkg-config --libs gtk+-2.0 gmodule-2.0 libglade-2.0`
HOSTCFLAGS_gconf.o = `pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0` \ HOSTCFLAGS_gconf.o = `pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0` \
-D LKC_DIRECT_LINK -Wno-missing-prototypes
HOSTLOADLIBES_mconf = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC)) HOSTLOADLIBES_mconf = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC))
...@@ -318,18 +318,11 @@ endif ...@@ -318,18 +318,11 @@ endif
$(obj)/zconf.tab.o: $(obj)/lex.zconf.c $(obj)/zconf.hash.c $(obj)/zconf.tab.o: $(obj)/lex.zconf.c $(obj)/zconf.hash.c
$(obj)/kconfig_load.o: $(obj)/lkc_defs.h $(obj)/qconf.o: $(obj)/qconf.moc
$(obj)/qconf.o: $(obj)/qconf.moc $(obj)/lkc_defs.h
$(obj)/gconf.o: $(obj)/lkc_defs.h
$(obj)/%.moc: $(src)/%.h $(obj)/%.moc: $(src)/%.h
$(KC_QT_MOC) -i $< -o $@ $(KC_QT_MOC) -i $< -o $@
$(obj)/lkc_defs.h: $(src)/lkc_proto.h
$(Q)sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/'
# Extract gconf menu items for I18N support # Extract gconf menu items for I18N support
$(obj)/gconf.glade.h: $(obj)/gconf.glade $(obj)/gconf.glade.h: $(obj)/gconf.glade
$(Q)intltool-extract --type=gettext/glade --srcdir=$(srctree) \ $(Q)intltool-extract --type=gettext/glade --srcdir=$(srctree) \
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/time.h> #include <sys/time.h>
#define LKC_DIRECT_LINK
#include "lkc.h" #include "lkc.h"
static void conf(struct menu *menu); static void conf(struct menu *menu);
...@@ -106,6 +105,7 @@ static int conf_askvalue(struct symbol *sym, const char *def) ...@@ -106,6 +105,7 @@ static int conf_askvalue(struct symbol *sym, const char *def)
return 0; return 0;
} }
check_stdin(); check_stdin();
/* fall through */
case oldaskconfig: case oldaskconfig:
fflush(stdout); fflush(stdout);
xfgets(line, 128, stdin); xfgets(line, 128, stdin);
...@@ -150,6 +150,7 @@ static int conf_string(struct menu *menu) ...@@ -150,6 +150,7 @@ static int conf_string(struct menu *menu)
def = NULL; def = NULL;
break; break;
} }
/* fall through */
default: default:
line[strlen(line)-1] = 0; line[strlen(line)-1] = 0;
def = line; def = line;
...@@ -304,6 +305,7 @@ static int conf_choice(struct menu *menu) ...@@ -304,6 +305,7 @@ static int conf_choice(struct menu *menu)
break; break;
} }
check_stdin(); check_stdin();
/* fall through */
case oldaskconfig: case oldaskconfig:
fflush(stdout); fflush(stdout);
xfgets(line, 128, stdin); xfgets(line, 128, stdin);
...@@ -369,6 +371,7 @@ static void conf(struct menu *menu) ...@@ -369,6 +371,7 @@ static void conf(struct menu *menu)
check_conf(menu); check_conf(menu);
return; return;
} }
/* fall through */
case P_COMMENT: case P_COMMENT:
prompt = menu_get_prompt(menu); prompt = menu_get_prompt(menu);
if (prompt) if (prompt)
......
...@@ -7,13 +7,13 @@ ...@@ -7,13 +7,13 @@
#include <ctype.h> #include <ctype.h>
#include <errno.h> #include <errno.h>
#include <fcntl.h> #include <fcntl.h>
#include <stdarg.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <time.h> #include <time.h>
#include <unistd.h> #include <unistd.h>
#define LKC_DIRECT_LINK
#include "lkc.h" #include "lkc.h"
static void conf_warning(const char *fmt, ...) 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) ...@@ -128,6 +128,7 @@ static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p)
sym->flags |= def_flags; sym->flags |= def_flags;
break; break;
} }
/* fall through */
case S_BOOLEAN: case S_BOOLEAN:
if (p[0] == 'y') { if (p[0] == 'y') {
sym->def[def].tri = yes; 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) ...@@ -140,7 +141,7 @@ static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p)
break; break;
} }
conf_warning("symbol value '%s' invalid for %s", p, sym->name); conf_warning("symbol value '%s' invalid for %s", p, sym->name);
break; return 1;
case S_OTHER: case S_OTHER:
if (*p != '"') { if (*p != '"') {
for (p2 = p; *p2 && !isspace(*p2); p2++) 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) ...@@ -148,6 +149,7 @@ static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p)
sym->type = S_STRING; sym->type = S_STRING;
goto done; goto done;
} }
/* fall through */
case S_STRING: case S_STRING:
if (*p++ != '"') if (*p++ != '"')
break; break;
...@@ -162,6 +164,7 @@ static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p) ...@@ -162,6 +164,7 @@ static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p)
conf_warning("invalid string found"); conf_warning("invalid string found");
return 1; return 1;
} }
/* fall through */
case S_INT: case S_INT:
case S_HEX: case S_HEX:
done: done:
...@@ -237,6 +240,7 @@ int conf_read_simple(const char *name, int def) ...@@ -237,6 +240,7 @@ int conf_read_simple(const char *name, int def)
case S_STRING: case S_STRING:
if (sym->def[def].val) if (sym->def[def].val)
free(sym->def[def].val); free(sym->def[def].val);
/* fall through */
default: default:
sym->def[def].val = NULL; sym->def[def].val = NULL;
sym->def[def].tri = no; sym->def[def].tri = no;
...@@ -363,6 +367,7 @@ int conf_read(const char *name) ...@@ -363,6 +367,7 @@ int conf_read(const char *name)
break; break;
if (!sym_is_choice(sym)) if (!sym_is_choice(sym))
goto sym_ok; goto sym_ok;
/* fall through */
default: default:
if (!strcmp(sym->curr.val, sym->def[S_DEF_USER].val)) if (!strcmp(sym->curr.val, sym->def[S_DEF_USER].val))
goto sym_ok; goto sym_ok;
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#define LKC_DIRECT_LINK
#include "lkc.h" #include "lkc.h"
#define DEBUG_EXPR 0 #define DEBUG_EXPR 0
......
...@@ -172,8 +172,6 @@ struct menu { ...@@ -172,8 +172,6 @@ struct menu {
#define MENU_CHANGED 0x0001 #define MENU_CHANGED 0x0001
#define MENU_ROOT 0x0002 #define MENU_ROOT 0x0002
#ifndef SWIG
extern struct file *file_list; extern struct file *file_list;
extern struct file *current_file; extern struct file *current_file;
struct file *lookup_file(const char *name); struct file *lookup_file(const char *name);
...@@ -218,7 +216,6 @@ static inline int expr_is_no(struct expr *e) ...@@ -218,7 +216,6 @@ static inline int expr_is_no(struct expr *e)
{ {
return e && (e->type == E_SYMBOL && e->left.sym == &symbol_no); return e && (e->type == E_SYMBOL && e->left.sym == &symbol_no);
} }
#endif
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -285,8 +285,6 @@ void init_left_tree(void) ...@@ -285,8 +285,6 @@ void init_left_tree(void)
static void renderer_edited(GtkCellRendererText * cell, static void renderer_edited(GtkCellRendererText * cell,
const gchar * path_string, const gchar * path_string,
const gchar * new_text, gpointer user_data); const gchar * new_text, gpointer user_data);
static void renderer_toggled(GtkCellRendererToggle * cellrenderertoggle,
gchar * arg1, gpointer user_data);
void init_right_tree(void) void init_right_tree(void)
{ {
...@@ -320,8 +318,6 @@ void init_right_tree(void) ...@@ -320,8 +318,6 @@ void init_right_tree(void)
"inconsistent", COL_BTNINC, "inconsistent", COL_BTNINC,
"visible", COL_BTNVIS, "visible", COL_BTNVIS,
"radio", COL_BTNRAD, NULL); "radio", COL_BTNRAD, NULL);
/*g_signal_connect(G_OBJECT(renderer), "toggled",
G_CALLBACK(renderer_toggled), NULL); */
renderer = gtk_cell_renderer_text_new(); renderer = gtk_cell_renderer_text_new();
gtk_tree_view_column_pack_start(GTK_TREE_VIEW_COLUMN(column), gtk_tree_view_column_pack_start(GTK_TREE_VIEW_COLUMN(column),
renderer, FALSE); renderer, FALSE);
...@@ -888,35 +884,6 @@ static void toggle_sym_value(struct menu *menu) ...@@ -888,35 +884,6 @@ static void toggle_sym_value(struct menu *menu)
display_tree_part(); //fixme: keep exp/coll display_tree_part(); //fixme: keep exp/coll
} }
static void renderer_toggled(GtkCellRendererToggle * cell,
gchar * path_string, gpointer user_data)
{
GtkTreePath *path, *sel_path = NULL;
GtkTreeIter iter, sel_iter;
GtkTreeSelection *sel;
struct menu *menu;
path = gtk_tree_path_new_from_string(path_string);
if (!gtk_tree_model_get_iter(model2, &iter, path))
return;
sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(tree2_w));
if (gtk_tree_selection_get_selected(sel, NULL, &sel_iter))
sel_path = gtk_tree_model_get_path(model2, &sel_iter);
if (!sel_path)
goto out1;
if (gtk_tree_path_compare(path, sel_path))
goto out2;
gtk_tree_model_get(model2, &iter, COL_MENU, &menu, -1);
toggle_sym_value(menu);
out2:
gtk_tree_path_free(sel_path);
out1:
gtk_tree_path_free(path);
}
static gint column2index(GtkTreeViewColumn * column) static gint column2index(GtkTreeViewColumn * column)
{ {
gint i; gint i;
...@@ -1172,6 +1139,7 @@ static gchar **fill_row(struct menu *menu) ...@@ -1172,6 +1139,7 @@ static gchar **fill_row(struct menu *menu)
row[COL_BTNVIS] = GINT_TO_POINTER(TRUE); row[COL_BTNVIS] = GINT_TO_POINTER(TRUE);
if (sym_is_choice(sym)) if (sym_is_choice(sym))
break; break;
/* fall through */
case S_TRISTATE: case S_TRISTATE:
val = sym_get_tristate_value(sym); val = sym_get_tristate_value(sym);
switch (val) { switch (val) {
...@@ -1506,10 +1474,6 @@ int main(int ac, char *av[]) ...@@ -1506,10 +1474,6 @@ int main(int ac, char *av[])
char *env; char *env;
gchar *glade_file; gchar *glade_file;
#ifndef LKC_DIRECT_LINK
kconfig_load();
#endif
bindtextdomain(PACKAGE, LOCALEDIR); bindtextdomain(PACKAGE, LOCALEDIR);
bind_textdomain_codeset(PACKAGE, "UTF-8"); bind_textdomain_codeset(PACKAGE, "UTF-8");
textdomain(PACKAGE); textdomain(PACKAGE);
......
#include <dlfcn.h>
#include <stdio.h>
#include <stdlib.h>
#include "lkc.h"
#define P(name,type,arg) type (*name ## _p) arg
#include "lkc_proto.h"
#undef P
void kconfig_load(void)
{
void *handle;
char *error;
handle = dlopen("./libkconfig.so", RTLD_LAZY);
if (!handle) {
handle = dlopen("./scripts/kconfig/libkconfig.so", RTLD_LAZY);
if (!handle) {
fprintf(stderr, "%s\n", dlerror());
exit(1);
}
}
#define P(name,type,arg) \
{ \
name ## _p = dlsym(handle, #name); \
if ((error = dlerror())) { \
fprintf(stderr, "%s\n", error); \
exit(1); \
} \
}
#include "lkc_proto.h"
#undef P
}
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#define LKC_DIRECT_LINK
#include "lkc.h" #include "lkc.h"
static char *escape(const char* text, char *bf, int len) static char *escape(const char* text, char *bf, int len)
......
...@@ -785,7 +785,6 @@ char *zconftext; ...@@ -785,7 +785,6 @@ char *zconftext;
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#define LKC_DIRECT_LINK
#include "lkc.h" #include "lkc.h"
#define START_STRSIZE 16 #define START_STRSIZE 16
......
...@@ -21,12 +21,7 @@ static inline char *bind_textdomain_codeset(const char *dn, char *c) { return c; ...@@ -21,12 +21,7 @@ static inline char *bind_textdomain_codeset(const char *dn, char *c) { return c;
extern "C" { extern "C" {
#endif #endif
#ifdef LKC_DIRECT_LINK
#define P(name,type,arg) extern type name arg #define P(name,type,arg) extern type name arg
#else
#include "lkc_defs.h"
#define P(name,type,arg) extern type (*name ## _p) arg
#endif
#include "lkc_proto.h" #include "lkc_proto.h"
#undef P #undef P
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
#include <unistd.h> #include <unistd.h>
#include <locale.h> #include <locale.h>
#define LKC_DIRECT_LINK
#include "lkc.h" #include "lkc.h"
#include "lxdialog/dialog.h" #include "lxdialog/dialog.h"
...@@ -845,6 +844,7 @@ int main(int ac, char **av) ...@@ -845,6 +844,7 @@ int main(int ac, char **av)
"\n\n")); "\n\n"));
return 1; return 1;
} }
/* fall through */
case -1: case -1:
printf(_("\n\n" printf(_("\n\n"
"*** End of the configuration.\n" "*** End of the configuration.\n"
......
...@@ -3,10 +3,11 @@ ...@@ -3,10 +3,11 @@
* Released under the terms of the GNU GPL v2.0. * Released under the terms of the GNU GPL v2.0.
*/ */
#include <ctype.h>
#include <stdarg.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#define LKC_DIRECT_LINK
#include "lkc.h" #include "lkc.h"
static const char nohelp_text[] = N_( static const char nohelp_text[] = N_(
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
*/ */
#define _GNU_SOURCE #define _GNU_SOURCE
#include <string.h> #include <string.h>
#define LKC_DIRECT_LINK
#include "lkc.h" #include "lkc.h"
#include "nconf.h" #include "nconf.h"
#include <ctype.h> #include <ctype.h>
......
...@@ -1745,10 +1745,6 @@ int main(int ac, char** av) ...@@ -1745,10 +1745,6 @@ int main(int ac, char** av)
bindtextdomain(PACKAGE, LOCALEDIR); bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE); textdomain(PACKAGE);
#ifndef LKC_DIRECT_LINK
kconfig_load();
#endif
progname = av[0]; progname = av[0];
configApp = new QApplication(ac, av); configApp = new QApplication(ac, av);
if (ac > 1 && av[1][0] == '-') { if (ac > 1 && av[1][0] == '-') {
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
#include <regex.h> #include <regex.h>
#include <sys/utsname.h> #include <sys/utsname.h>
#define LKC_DIRECT_LINK
#include "lkc.h" #include "lkc.h"
struct symbol symbol_yes = { struct symbol symbol_yes = {
......
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
* Released under the terms of the GNU GPL v2.0. * Released under the terms of the GNU GPL v2.0.
*/ */
#include <stdarg.h>
#include <stdlib.h>
#include <string.h> #include <string.h>
#include "lkc.h" #include "lkc.h"
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#define LKC_DIRECT_LINK
#include "lkc.h" #include "lkc.h"
#define START_STRSIZE 16 #define START_STRSIZE 16
......
...@@ -88,7 +88,6 @@ ...@@ -88,7 +88,6 @@
#include <string.h> #include <string.h>
#include <stdbool.h> #include <stdbool.h>
#define LKC_DIRECT_LINK
#include "lkc.h" #include "lkc.h"
#define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt) #define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt)
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
#include <string.h> #include <string.h>
#include <stdbool.h> #include <stdbool.h>
#define LKC_DIRECT_LINK
#include "lkc.h" #include "lkc.h"
#define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt) #define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment