Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 71368 Details for
Bug 99810
unable to make *config in linux 2.6.12 without gettext
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
2.6.13 i18n Reversal Patch
misc-2.6.13-rev-i18n.patch (text/plain), 34.18 KB, created by
Joshua Kinard
on 2005-10-24 17:38:22 UTC
(
hide
)
Description:
2.6.13 i18n Reversal Patch
Filename:
MIME Type:
Creator:
Joshua Kinard
Created:
2005-10-24 17:38:22 UTC
Size:
34.18 KB
patch
obsolete
>diff -Naurp linux-2.6.13.1.orig/scripts/kconfig/Makefile linux-2.6.13.1/scripts/kconfig/Makefile >--- linux-2.6.13.1.orig/scripts/kconfig/Makefile 2005-09-09 22:42:58.000000000 -0400 >+++ linux-2.6.13.1/scripts/kconfig/Makefile 2005-09-12 00:08:45.000000000 -0400 >@@ -2,7 +2,7 @@ > # Kernel configuration targets > # These targets are used from top-level makefile > >-.PHONY: oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config >+.PHONY: oldconfig xconfig gconfig menuconfig config silentoldconfig > > xconfig: $(obj)/qconf > $< arch/$(ARCH)/Kconfig >@@ -23,13 +23,6 @@ oldconfig: $(obj)/conf > silentoldconfig: $(obj)/conf > $< -s arch/$(ARCH)/Kconfig > >-update-po-config: $(obj)/kxgettext >- xgettext --default-domain=linux \ >- --add-comments --keyword=_ --keyword=N_ \ >- --files-from=scripts/kconfig/POTFILES.in \ >- -o scripts/kconfig/linux.pot >- scripts/kconfig/kxgettext arch/$(ARCH)/Kconfig >> scripts/kconfig/linux.pot >- > .PHONY: randconfig allyesconfig allnoconfig allmodconfig defconfig > > randconfig: $(obj)/conf >@@ -79,10 +72,9 @@ help: > # Based on GTK which needs to be installed to compile it > # object files used by all kconfig flavours > >-hostprogs-y := conf mconf qconf gconf kxgettext >+hostprogs-y := conf mconf qconf gconf > conf-objs := conf.o zconf.tab.o > mconf-objs := mconf.o zconf.tab.o >-kxgettext-objs := kxgettext.o zconf.tab.o > > ifeq ($(MAKECMDGOALS),xconfig) > qconf-target := 1 >@@ -115,7 +107,7 @@ HOSTLOADLIBES_gconf = `pkg-config gtk+-2 > HOSTCFLAGS_gconf.o = `pkg-config gtk+-2.0 gmodule-2.0 libglade-2.0 --cflags` \ > -D LKC_DIRECT_LINK > >-$(obj)/conf.o $(obj)/mconf.o $(obj)/qconf.o $(obj)/gconf.o $(obj)/kxgettext: $(obj)/zconf.tab.h >+$(obj)/conf.o $(obj)/mconf.o $(obj)/qconf.o $(obj)/gconf.o: $(obj)/zconf.tab.h > > $(obj)/zconf.tab.h: $(src)/zconf.tab.h_shipped > $(obj)/zconf.tab.c: $(src)/zconf.tab.c_shipped >diff -Naurp linux-2.6.13.1.orig/scripts/kconfig/POTFILES.in linux-2.6.13.1/scripts/kconfig/POTFILES.in >--- linux-2.6.13.1.orig/scripts/kconfig/POTFILES.in 2005-09-09 22:42:58.000000000 -0400 >+++ linux-2.6.13.1/scripts/kconfig/POTFILES.in 1969-12-31 19:00:00.000000000 -0500 >@@ -1,5 +0,0 @@ >-scripts/kconfig/mconf.c >-scripts/kconfig/conf.c >-scripts/kconfig/confdata.c >-scripts/kconfig/gconf.c >-scripts/kconfig/qconf.cc >diff -Naurp linux-2.6.13.1.orig/scripts/kconfig/conf.c linux-2.6.13.1/scripts/kconfig/conf.c >--- linux-2.6.13.1.orig/scripts/kconfig/conf.c 2005-09-09 22:42:58.000000000 -0400 >+++ linux-2.6.13.1/scripts/kconfig/conf.c 2005-09-12 00:08:45.000000000 -0400 >@@ -34,7 +34,7 @@ static int conf_cnt; > static char line[128]; > static struct menu *rootEntry; > >-static char nohelp_text[] = N_("Sorry, no help available for this option yet.\n"); >+static char nohelp_text[] = "Sorry, no help available for this option yet.\n"; > > static void strip(char *str) > { >@@ -56,9 +56,9 @@ static void strip(char *str) > static void check_stdin(void) > { > if (!valid_stdin && input_mode == ask_silent) { >- printf(_("aborted!\n\n")); >- printf(_("Console input/output is redirected. ")); >- printf(_("Run 'make oldconfig' to update configuration.\n\n")); >+ printf("aborted!\n\n"); >+ printf("Console input/output is redirected. "); >+ printf("Run 'make oldconfig' to update configuration.\n\n"); > exit(1); > } > } >@@ -470,7 +470,7 @@ static void check_conf(struct menu *menu > if (sym) { > if (sym_is_changable(sym) && !sym_has_value(sym)) { > if (!conf_cnt++) >- printf(_("*\n* Restart config...\n*\n")); >+ printf("*\n* Restart config...\n*\n"); > rootEntry = menu_get_parent_menu(menu); > conf(rootEntry); > } >@@ -504,7 +504,7 @@ int main(int ac, char **av) > input_mode = set_default; > defconfig_file = av[i++]; > if (!defconfig_file) { >- printf(_("%s: No default config file specified\n"), >+ printf("%s: No default config file specified\n", > av[0]); > exit(1); > } >@@ -530,7 +530,7 @@ int main(int ac, char **av) > } > name = av[i]; > if (!name) { >- printf(_("%s: Kconfig file missing\n"), av[0]); >+ printf("%s: Kconfig file missing\n", av[0]); > } > conf_parse(name); > //zconfdump(stdout); >@@ -547,12 +547,12 @@ int main(int ac, char **av) > break; > case ask_silent: > if (stat(".config", &tmpstat)) { >- printf(_("***\n" >+ printf("***\n" > "*** You have not yet configured your kernel!\n" > "***\n" > "*** Please run some configurator (e.g. \"make oldconfig\" or\n" > "*** \"make menuconfig\" or \"make xconfig\").\n" >- "***\n")); >+ "***\n"); > exit(1); > } > case ask_all: >@@ -576,7 +576,7 @@ int main(int ac, char **av) > check_conf(&rootmenu); > } while (conf_cnt); > if (conf_write(NULL)) { >- fprintf(stderr, _("\n*** Error during writing of the kernel configuration.\n\n")); >+ fprintf(stderr, "\n*** Error during writing of the kernel configuration.\n\n"); > return 1; > } > return 0; >diff -Naurp linux-2.6.13.1.orig/scripts/kconfig/confdata.c linux-2.6.13.1/scripts/kconfig/confdata.c >--- linux-2.6.13.1.orig/scripts/kconfig/confdata.c 2005-09-09 22:42:58.000000000 -0400 >+++ linux-2.6.13.1/scripts/kconfig/confdata.c 2005-09-12 00:08:45.000000000 -0400 >@@ -88,9 +88,9 @@ int conf_read(const char *name) > name = conf_expand_value(name); > in = zconf_fopen(name); > if (in) { >- printf(_("#\n" >- "# using defaults found in %s\n" >- "#\n"), name); >+ printf("#\n" >+ "# using defaults found in %s\n" >+ "#\n", name); > break; > } > } >@@ -312,11 +312,11 @@ int conf_write(const char *name) > if (env && *env) > use_timestamp = 0; > >- fprintf(out, _("#\n" >- "# Automatically generated make config: don't edit\n" >- "# Linux kernel version: %s\n" >- "%s%s" >- "#\n"), >+ fprintf(out, "#\n" >+ "# Automatically generated make config: don't edit\n" >+ "# Linux kernel version: %s\n" >+ "%s%s" >+ "#\n", > sym_get_string_value(sym), > use_timestamp ? "# " : "", > use_timestamp ? ctime(&now) : ""); >diff -Naurp linux-2.6.13.1.orig/scripts/kconfig/gconf.c linux-2.6.13.1/scripts/kconfig/gconf.c >--- linux-2.6.13.1.orig/scripts/kconfig/gconf.c 2005-09-09 22:42:58.000000000 -0400 >+++ linux-2.6.13.1/scripts/kconfig/gconf.c 2005-09-12 00:08:45.000000000 -0400 >@@ -41,7 +41,7 @@ static gboolean resizeable = FALSE; > static gboolean config_changed = FALSE; > > static char nohelp_text[] = >- N_("Sorry, no help available for this option yet.\n"); >+ "Sorry, no help available for this option yet.\n"; > > GtkWidget *main_wnd = NULL; > GtkWidget *tree1_w = NULL; // left frame >@@ -207,7 +207,7 @@ void init_main_window(const gchar * glad > > xml = glade_xml_new(glade_file, "window1", NULL); > if (!xml) >- g_error(_("GUI loading failed !\n")); >+ g_error("GUI loading failed !\n"); > glade_xml_signal_autoconnect(xml); > > main_wnd = glade_xml_get_widget(xml, "window1"); >@@ -275,7 +275,7 @@ void init_main_window(const gchar * glad > /*"style", PANGO_STYLE_OBLIQUE, */ > NULL); > >- sprintf(title, _("Linux Kernel v%s Configuration"), >+ sprintf(title, "Linux Kernel v%s Configuration", > getenv("KERNELRELEASE")); > gtk_window_set_title(GTK_WINDOW(main_wnd), title); > >@@ -325,7 +325,7 @@ void init_left_tree(void) > > column = gtk_tree_view_column_new(); > gtk_tree_view_append_column(view, column); >- gtk_tree_view_column_set_title(column, _("Options")); >+ gtk_tree_view_column_set_title(column, "Options"); > > renderer = gtk_cell_renderer_toggle_new(); > gtk_tree_view_column_pack_start(GTK_TREE_VIEW_COLUMN(column), >@@ -370,7 +370,7 @@ void init_right_tree(void) > > column = gtk_tree_view_column_new(); > gtk_tree_view_append_column(view, column); >- gtk_tree_view_column_set_title(column, _("Options")); >+ gtk_tree_view_column_set_title(column, "Options"); > > renderer = gtk_cell_renderer_pixbuf_new(); > gtk_tree_view_column_pack_start(GTK_TREE_VIEW_COLUMN(column), >@@ -401,7 +401,7 @@ void init_right_tree(void) > > renderer = gtk_cell_renderer_text_new(); > gtk_tree_view_insert_column_with_attributes(view, -1, >- _("Name"), renderer, >+ "Name", renderer, > "text", COL_NAME, > "foreground-gdk", > COL_COLOR, NULL); >@@ -425,7 +425,7 @@ void init_right_tree(void) > COL_COLOR, NULL); > renderer = gtk_cell_renderer_text_new(); > gtk_tree_view_insert_column_with_attributes(view, -1, >- _("Value"), renderer, >+ "Value", renderer, > "text", COL_VALUE, > "editable", > COL_EDIT, >@@ -466,15 +466,15 @@ static void text_insert_help(struct menu > GtkTextIter start, end; > const char *prompt = menu_get_prompt(menu); > gchar *name; >- const char *help = _(nohelp_text); >+ const char *help = nohelp_text; > > if (!menu->sym) > help = ""; > else if (menu->sym->help) >- help = _(menu->sym->help); >+ help = menu->sym->help; > > if (menu->sym && menu->sym->name) >- name = g_strdup_printf(_(menu->sym->name)); >+ name = g_strdup_printf(menu->sym->name); > else > name = g_strdup(""); > >@@ -530,7 +530,7 @@ gboolean on_window1_delete_event(GtkWidg > if (config_changed == FALSE) > return FALSE; > >- dialog = gtk_dialog_new_with_buttons(_("Warning !"), >+ dialog = gtk_dialog_new_with_buttons("Warning !", > GTK_WINDOW(main_wnd), > (GtkDialogFlags) > (GTK_DIALOG_MODAL | >@@ -544,7 +544,7 @@ gboolean on_window1_delete_event(GtkWidg > gtk_dialog_set_default_response(GTK_DIALOG(dialog), > GTK_RESPONSE_CANCEL); > >- label = gtk_label_new(_("\nSave configuration ?\n")); >+ label = gtk_label_new("\nSave configuration ?\n"); > gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), label); > gtk_widget_show(label); > >@@ -604,7 +604,7 @@ load_filename(GtkFileSelection * file_se > (user_data)); > > if (conf_read(fn)) >- text_insert_msg(_("Error"), _("Unable to load configuration !")); >+ text_insert_msg("Error", "Unable to load configuration !"); > else > display_tree(&rootmenu); > } >@@ -613,7 +613,7 @@ void on_load1_activate(GtkMenuItem * men > { > GtkWidget *fs; > >- fs = gtk_file_selection_new(_("Load file...")); >+ fs = gtk_file_selection_new("Load file..."); > g_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(fs)->ok_button), > "clicked", > G_CALLBACK(load_filename), (gpointer) fs); >@@ -632,7 +632,7 @@ void on_load1_activate(GtkMenuItem * men > void on_save1_activate(GtkMenuItem * menuitem, gpointer user_data) > { > if (conf_write(NULL)) >- text_insert_msg(_("Error"), _("Unable to save configuration !")); >+ text_insert_msg("Error", "Unable to save configuration !"); > > config_changed = FALSE; > } >@@ -647,7 +647,7 @@ store_filename(GtkFileSelection * file_s > (user_data)); > > if (conf_write(fn)) >- text_insert_msg(_("Error"), _("Unable to save configuration !")); >+ text_insert_msg("Error", "Unable to save configuration !"); > > gtk_widget_destroy(GTK_WIDGET(user_data)); > } >@@ -656,7 +656,7 @@ void on_save_as1_activate(GtkMenuItem * > { > GtkWidget *fs; > >- fs = gtk_file_selection_new(_("Save file as...")); >+ fs = gtk_file_selection_new("Save file as..."); > g_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(fs)->ok_button), > "clicked", > G_CALLBACK(store_filename), (gpointer) fs); >@@ -740,7 +740,7 @@ on_show_debug_info1_activate(GtkMenuItem > void on_introduction1_activate(GtkMenuItem * menuitem, gpointer user_data) > { > GtkWidget *dialog; >- const gchar *intro_text = _( >+ const gchar *intro_text = > "Welcome to gkc, the GTK+ graphical kernel configuration tool\n" > "for Linux.\n" > "For each option, a blank box indicates the feature is disabled, a\n" >@@ -756,7 +756,7 @@ void on_introduction1_activate(GtkMenuIt > "option.\n" > "\n" > "Toggling Show Debug Info under the Options menu will show \n" >- "the dependencies, which you can then match by examining other options."); >+ "the dependencies, which you can then match by examining other options."; > > dialog = gtk_message_dialog_new(GTK_WINDOW(main_wnd), > GTK_DIALOG_DESTROY_WITH_PARENT, >@@ -773,8 +773,8 @@ void on_about1_activate(GtkMenuItem * me > { > GtkWidget *dialog; > const gchar *about_text = >- _("gkc is copyright (c) 2002 Romain Lievin <roms@lpg.ticalc.org>.\n" >- "Based on the source code from Roman Zippel.\n"); >+ "gkc is copyright (c) 2002 Romain Lievin <roms@lpg.ticalc.org>.\n" >+ "Based on the source code from Roman Zippel.\n"; > > dialog = gtk_message_dialog_new(GTK_WINDOW(main_wnd), > GTK_DIALOG_DESTROY_WITH_PARENT, >@@ -791,9 +791,9 @@ void on_license1_activate(GtkMenuItem * > { > GtkWidget *dialog; > const gchar *license_text = >- _("gkc is released under the terms of the GNU GPL v2.\n" >- "For more information, please see the source code or\n" >- "visit http://www.fsf.org/licenses/licenses.html\n"); >+ "gkc is released under the terms of the GNU GPL v2.\n" >+ "For more information, please see the source code or\n" >+ "visit http://www.fsf.org/licenses/licenses.html\n"; > > dialog = gtk_message_dialog_new(GTK_WINDOW(main_wnd), > GTK_DIALOG_DESTROY_WITH_PARENT, >@@ -1581,10 +1581,6 @@ int main(int ac, char *av[]) > kconfig_load(); > #endif > >- bindtextdomain(PACKAGE, LOCALEDIR); >- bind_textdomain_codeset(PACKAGE, "UTF-8"); >- textdomain(PACKAGE); >- > /* GTK stuffs */ > gtk_set_locale(); > gtk_init(&ac, &av); >diff -Naurp linux-2.6.13.1.orig/scripts/kconfig/kxgettext.c linux-2.6.13.1/scripts/kconfig/kxgettext.c >--- linux-2.6.13.1.orig/scripts/kconfig/kxgettext.c 2005-09-09 22:42:58.000000000 -0400 >+++ linux-2.6.13.1/scripts/kconfig/kxgettext.c 1969-12-31 19:00:00.000000000 -0500 >@@ -1,221 +0,0 @@ >-/* >- * Arnaldo Carvalho de Melo <acme@conectiva.com.br>, 2005 >- * >- * Released under the terms of the GNU GPL v2.0 >- */ >- >-#include <stdlib.h> >-#include <string.h> >- >-#define LKC_DIRECT_LINK >-#include "lkc.h" >- >-static char *escape(const char* text, char *bf, int len) >-{ >- char *bfp = bf; >- int multiline = strchr(text, '\n') != NULL; >- >- *bfp++ = '"'; >- --len; >- >- if (multiline) { >- *bfp++ = '"'; >- *bfp++ = '\n'; >- *bfp++ = '"'; >- len -= 3; >- } >- >- while (*text != '\0' && len > 1) { >- if (*text == '"') >- *bfp++ = '\\'; >- else if (*text == '\n') { >- *bfp++ = '\\'; >- *bfp++ = 'n'; >- *bfp++ = '"'; >- *bfp++ = '\n'; >- *bfp++ = '"'; >- len -= 5; >- ++text; >- goto next; >- } >- *bfp++ = *text++; >-next: >- --len; >- } >- >- if (multiline) >- bfp -= 3; >- >- *bfp++ = '"'; >- *bfp = '\0'; >- >- return bf; >-} >- >-struct file_line { >- struct file_line *next; >- char* file; >- int lineno; >-}; >- >-static struct file_line *file_line__new(char *file, int lineno) >-{ >- struct file_line *self = malloc(sizeof(*self)); >- >- if (self == NULL) >- goto out; >- >- self->file = file; >- self->lineno = lineno; >- self->next = NULL; >-out: >- return self; >-} >- >-struct message { >- const char *msg; >- const char *option; >- struct message *next; >- struct file_line *files; >-}; >- >-static struct message *message__list; >- >-static struct message *message__new(const char *msg, char *option, char *file, int lineno) >-{ >- struct message *self = malloc(sizeof(*self)); >- >- if (self == NULL) >- goto out; >- >- self->files = file_line__new(file, lineno); >- if (self->files == NULL) >- goto out_fail; >- >- self->msg = strdup(msg); >- if (self->msg == NULL) >- goto out_fail_msg; >- >- self->option = option; >- self->next = NULL; >-out: >- return self; >-out_fail_msg: >- free(self->files); >-out_fail: >- free(self); >- self = NULL; >- goto out; >-} >- >-static struct message *mesage__find(const char *msg) >-{ >- struct message *m = message__list; >- >- while (m != NULL) { >- if (strcmp(m->msg, msg) == 0) >- break; >- m = m->next; >- } >- >- return m; >-} >- >-static int message__add_file_line(struct message *self, char *file, int lineno) >-{ >- int rc = -1; >- struct file_line *fl = file_line__new(file, lineno); >- >- if (fl == NULL) >- goto out; >- >- fl->next = self->files; >- self->files = fl; >- rc = 0; >-out: >- return rc; >-} >- >-static int message__add(const char *msg, char *option, char *file, int lineno) >-{ >- int rc = 0; >- char bf[16384]; >- char *escaped = escape(msg, bf, sizeof(bf)); >- struct message *m = mesage__find(escaped); >- >- if (m != NULL) >- rc = message__add_file_line(m, file, lineno); >- else { >- m = message__new(escaped, option, file, lineno); >- >- if (m != NULL) { >- m->next = message__list; >- message__list = m; >- } else >- rc = -1; >- } >- return rc; >-} >- >-void menu_build_message_list(struct menu *menu) >-{ >- struct menu *child; >- >- message__add(menu_get_prompt(menu), NULL, >- menu->file == NULL ? "Root Menu" : menu->file->name, >- menu->lineno); >- >- if (menu->sym != NULL && menu->sym->help != NULL) >- message__add(menu->sym->help, menu->sym->name, >- menu->file == NULL ? "Root Menu" : menu->file->name, >- menu->lineno); >- >- for (child = menu->list; child != NULL; child = child->next) >- if (child->prompt != NULL) >- menu_build_message_list(child); >-} >- >-static void message__print_file_lineno(struct message *self) >-{ >- struct file_line *fl = self->files; >- >- printf("\n#: %s:%d", fl->file, fl->lineno); >- fl = fl->next; >- >- while (fl != NULL) { >- printf(", %s:%d", fl->file, fl->lineno); >- fl = fl->next; >- } >- >- if (self->option != NULL) >- printf(", %s:00000", self->option); >- >- putchar('\n'); >-} >- >-static void message__print_gettext_msgid_msgstr(struct message *self) >-{ >- message__print_file_lineno(self); >- >- printf("msgid %s\n" >- "msgstr \"\"\n", self->msg); >-} >- >-void menu__xgettext(void) >-{ >- struct message *m = message__list; >- >- while (m != NULL) { >- message__print_gettext_msgid_msgstr(m); >- m = m->next; >- } >-} >- >-int main(int ac, char **av) >-{ >- conf_parse(av[1]); >- >- menu_build_message_list(menu_get_root_menu(NULL)); >- menu__xgettext(); >- return 0; >-} >diff -Naurp linux-2.6.13.1.orig/scripts/kconfig/lkc.h linux-2.6.13.1/scripts/kconfig/lkc.h >--- linux-2.6.13.1.orig/scripts/kconfig/lkc.h 2005-09-09 22:42:58.000000000 -0400 >+++ linux-2.6.13.1/scripts/kconfig/lkc.h 2005-09-12 00:08:45.000000000 -0400 >@@ -8,8 +8,6 @@ > > #include "expr.h" > >-#include <libintl.h> >- > #ifdef __cplusplus > extern "C" { > #endif >@@ -25,12 +23,6 @@ extern "C" { > > #define SRCTREE "srctree" > >-#define PACKAGE "linux" >-#define LOCALEDIR "/usr/share/locale" >- >-#define _(text) gettext(text) >-#define N_(text) (text) >- > int zconfparse(void); > void zconfdump(FILE *out); > >diff -Naurp linux-2.6.13.1.orig/scripts/kconfig/mconf.c linux-2.6.13.1/scripts/kconfig/mconf.c >--- linux-2.6.13.1.orig/scripts/kconfig/mconf.c 2005-09-09 22:42:58.000000000 -0400 >+++ linux-2.6.13.1/scripts/kconfig/mconf.c 2005-09-12 00:08:45.000000000 -0400 >@@ -4,8 +4,6 @@ > * > * Introduced single menu mode (show all sub-menus in one large tree). > * 2002-11-06 Petr Baudis <pasky@ucw.cz> >- * >- * i18n, 2005, Arnaldo Carvalho de Melo <acme@conectiva.com.br> > */ > > #include <sys/ioctl.h> >@@ -26,7 +24,7 @@ > #include "lkc.h" > > static char menu_backtitle[128]; >-static const char mconf_readme[] = N_( >+static const char mconf_readme[] = > "Overview\n" > "--------\n" > "Some kernel features may be built directly into the kernel.\n" >@@ -159,39 +157,39 @@ static const char mconf_readme[] = N_( > "\n" > "Note that this mode can eventually be a little more CPU expensive\n" > "(especially with a larger number of unrolled categories) than the\n" >-"default mode.\n"), >-menu_instructions[] = N_( >+"default mode.\n", >+menu_instructions[] = > "Arrow keys navigate the menu. " > "<Enter> selects submenus --->. " > "Highlighted letters are hotkeys. " > "Pressing <Y> includes, <N> excludes, <M> modularizes features. " > "Press <Esc><Esc> to exit, <?> for Help, </> for Search. " >- "Legend: [*] built-in [ ] excluded <M> module < > module capable"), >-radiolist_instructions[] = N_( >+ "Legend: [*] built-in [ ] excluded <M> module < > module capable", >+radiolist_instructions[] = > "Use the arrow keys to navigate this window or " > "press the hotkey of the item you wish to select " > "followed by the <SPACE BAR>. " >- "Press <?> for additional information about this option."), >-inputbox_instructions_int[] = N_( >+ "Press <?> for additional information about this option.", >+inputbox_instructions_int[] = > "Please enter a decimal value. " > "Fractions will not be accepted. " >- "Use the <TAB> key to move from the input field to the buttons below it."), >-inputbox_instructions_hex[] = N_( >+ "Use the <TAB> key to move from the input field to the buttons below it.", >+inputbox_instructions_hex[] = > "Please enter a hexadecimal value. " >- "Use the <TAB> key to move from the input field to the buttons below it."), >-inputbox_instructions_string[] = N_( >+ "Use the <TAB> key to move from the input field to the buttons below it.", >+inputbox_instructions_string[] = > "Please enter a string value. " >- "Use the <TAB> key to move from the input field to the buttons below it."), >-setmod_text[] = N_( >+ "Use the <TAB> key to move from the input field to the buttons below it.", >+setmod_text[] = > "This feature depends on another which has been configured as a module.\n" >- "As a result, this feature will be built as a module."), >-nohelp_text[] = N_( >- "There is no help available for this kernel option.\n"), >-load_config_text[] = N_( >+ "As a result, this feature will be built as a module.", >+nohelp_text[] = >+ "There is no help available for this kernel option.\n", >+load_config_text[] = > "Enter the name of the configuration file you wish to load. " > "Accept the name shown to restore the configuration you " >- "last retrieved. Leave blank to abort."), >-load_config_help[] = N_( >+ "last retrieved. Leave blank to abort.", >+load_config_help[] = > "\n" > "For various reasons, one may wish to keep several different kernel\n" > "configurations available on a single machine.\n" >@@ -201,11 +199,11 @@ load_config_help[] = N_( > "to modify that configuration.\n" > "\n" > "If you are uncertain, then you have probably never used alternate\n" >- "configuration files. You should therefor leave this blank to abort.\n"), >-save_config_text[] = N_( >+ "configuration files. You should therefor leave this blank to abort.\n", >+save_config_text[] = > "Enter a filename to which this configuration should be saved " >- "as an alternate. Leave blank to abort."), >-save_config_help[] = N_( >+ "as an alternate. Leave blank to abort.", >+save_config_help[] = > "\n" > "For various reasons, one may wish to keep different kernel\n" > "configurations available on a single machine.\n" >@@ -215,8 +213,8 @@ save_config_help[] = N_( > "configuration options you have selected at that time.\n" > "\n" > "If you are uncertain what all this means then you should probably\n" >- "leave this blank.\n"), >-search_help[] = N_( >+ "leave this blank.\n", >+search_help[] = > "\n" > "Search for CONFIG_ symbols and display their relations.\n" > "Example: search for \"^FOO\"\n" >@@ -253,7 +251,7 @@ search_help[] = N_( > "Examples: USB => find all CONFIG_ symbols containing USB\n" > " ^USB => find all CONFIG_ symbols starting with USB\n" > " USB$ => find all CONFIG_ symbols ending with USB\n" >- "\n"); >+ "\n"; > > static char buf[4096], *bufptr = buf; > static char input_buf[4096]; >@@ -308,8 +306,8 @@ static void init_wsize(void) > } > > if (rows < 19 || cols < 80) { >- fprintf(stderr, N_("Your display is too small to run Menuconfig!\n")); >- fprintf(stderr, N_("It must be at least 19 lines by 80 columns.\n")); >+ fprintf(stderr, "Your display is too small to run Menuconfig!\n"); >+ fprintf(stderr, "It must be at least 19 lines by 80 columns.\n"); > exit(1); > } > >@@ -529,9 +527,9 @@ static void search_conf(void) > again: > cprint_init(); > cprint("--title"); >- cprint(_("Search Configuration Parameter")); >+ cprint("Search Configuration Parameter"); > cprint("--inputbox"); >- cprint(_("Enter Keyword")); >+ cprint("Enter Keyword"); > cprint("10"); > cprint("75"); > cprint(""); >@@ -542,7 +540,7 @@ again: > case 0: > break; > case 1: >- show_helptext(_("Search Configuration"), search_help); >+ show_helptext("Search Configuration", search_help); > goto again; > default: > return; >@@ -551,7 +549,7 @@ again: > sym_arr = sym_re_search(input_buf); > res = get_relations_str(sym_arr); > free(sym_arr); >- show_textbox(_("Search Results"), str_get(&res), 0, 0); >+ show_textbox("Search Results", str_get(&res), 0, 0); > str_free(&res); > } > >@@ -724,9 +722,9 @@ static void conf(struct menu *menu) > while (1) { > cprint_init(); > cprint("--title"); >- cprint("%s", prompt ? prompt : _("Main Menu")); >+ cprint("%s", prompt ? prompt : "Main Menu"); > cprint("--menu"); >- cprint(_(menu_instructions)); >+ cprint(menu_instructions); > cprint("%d", rows); > cprint("%d", cols); > cprint("%d", rows - 10); >@@ -739,9 +737,9 @@ static void conf(struct menu *menu) > cprint(":"); > cprint("--- "); > cprint("L"); >- cprint(_(" Load an Alternate Configuration File")); >+ cprint(" Load an Alternate Configuration File"); > cprint("S"); >- cprint(_(" Save Configuration to an Alternate File")); >+ cprint(" Save Configuration to an Alternate File"); > } > stat = exec_conf(); > if (stat < 0) >@@ -796,7 +794,7 @@ static void conf(struct menu *menu) > if (sym) > show_help(submenu); > else >- show_helptext("README", _(mconf_readme)); >+ show_helptext("README", mconf_readme); > break; > case 3: > if (type == 't') { >@@ -852,7 +850,7 @@ static void show_help(struct menu *menu) > { > if (sym->name) { > str_printf(&help, "CONFIG_%s:\n\n", sym->name); >- str_append(&help, _(sym->help)); >+ str_append(&help, sym->help); > str_append(&help, "\n"); > } > } else { >@@ -889,9 +887,9 @@ static void conf_choice(struct menu *men > while (1) { > cprint_init(); > cprint("--title"); >- cprint("%s", prompt ? prompt : _("Main Menu")); >+ cprint("%s", prompt ? prompt : "Main Menu"); > cprint("--radiolist"); >- cprint(_(radiolist_instructions)); >+ cprint(radiolist_instructions); > cprint("15"); > cprint("70"); > cprint("6"); >@@ -938,17 +936,17 @@ static void conf_string(struct menu *men > while (1) { > cprint_init(); > cprint("--title"); >- cprint("%s", prompt ? prompt : _("Main Menu")); >+ cprint("%s", prompt ? prompt : "Main Menu"); > cprint("--inputbox"); > switch (sym_get_type(menu->sym)) { > case S_INT: >- cprint(_(inputbox_instructions_int)); >+ cprint(inputbox_instructions_int); > break; > case S_HEX: >- cprint(_(inputbox_instructions_hex)); >+ cprint(inputbox_instructions_hex); > break; > case S_STRING: >- cprint(_(inputbox_instructions_string)); >+ cprint(inputbox_instructions_string); > break; > default: > /* panic? */; >@@ -961,7 +959,7 @@ static void conf_string(struct menu *men > case 0: > if (sym_set_string_value(menu->sym, input_buf)) > return; >- show_textbox(NULL, _("You have made an invalid entry."), 5, 43); >+ show_textbox(NULL, "You have made an invalid entry.", 5, 43); > break; > case 1: > show_help(menu); >@@ -990,10 +988,10 @@ static void conf_load(void) > return; > if (!conf_read(input_buf)) > return; >- show_textbox(NULL, _("File does not exist!"), 5, 38); >+ show_textbox(NULL, "File does not exist!", 5, 38); > break; > case 1: >- show_helptext(_("Load Alternate Configuration"), load_config_help); >+ show_helptext("Load Alternate Configuration", load_config_help); > break; > case 255: > return; >@@ -1019,10 +1017,10 @@ static void conf_save(void) > return; > if (!conf_write(input_buf)) > return; >- show_textbox(NULL, _("Can't create file! Probably a nonexistent directory."), 5, 60); >+ show_textbox(NULL, "Can't create file! Probably a nonexistent directory.", 5, 60); > break; > case 1: >- show_helptext(_("Save Alternate Configuration"), save_config_help); >+ show_helptext("Save Alternate Configuration", save_config_help); > break; > case 255: > return; >@@ -1043,16 +1041,12 @@ int main(int ac, char **av) > char *mode; > int stat; > >- setlocale(LC_ALL, ""); >- bindtextdomain(PACKAGE, LOCALEDIR); >- textdomain(PACKAGE); >- > conf_parse(av[1]); > conf_read(NULL); > > sym = sym_lookup("KERNELRELEASE", 0); > sym_calc_value(sym); >- sprintf(menu_backtitle, _("Linux Kernel v%s Configuration"), >+ sprintf(menu_backtitle, "Linux Kernel v%s Configuration", > sym_get_string_value(sym)); > > mode = getenv("MENUCONFIG_MODE"); >@@ -1069,7 +1063,7 @@ int main(int ac, char **av) > do { > cprint_init(); > cprint("--yesno"); >- cprint(_("Do you wish to save your new kernel configuration?")); >+ cprint("Do you wish to save your new kernel configuration?"); > cprint("5"); > cprint("60"); > stat = exec_conf(); >@@ -1077,20 +1071,20 @@ int main(int ac, char **av) > > if (stat == 0) { > if (conf_write(NULL)) { >- fprintf(stderr, _("\n\n" >+ fprintf(stderr, "\n\n" > "Error during writing of the kernel configuration.\n" > "Your kernel configuration changes were NOT saved." >- "\n\n")); >+ "\n\n"); > return 1; > } >- printf(_("\n\n" >+ printf("\n\n" > "*** End of Linux kernel configuration.\n" > "*** Execute 'make' to build the kernel or try 'make help'." >- "\n\n")); >+ "\n\n"); > } else { >- fprintf(stderr, _("\n\n" >+ fprintf(stderr, "\n\n" > "Your kernel configuration changes were NOT saved." >- "\n\n")); >+ "\n\n"); > } > > return 0; >diff -Naurp linux-2.6.13.1.orig/scripts/kconfig/menu.c linux-2.6.13.1/scripts/kconfig/menu.c >--- linux-2.6.13.1.orig/scripts/kconfig/menu.c 2005-09-09 22:42:58.000000000 -0400 >+++ linux-2.6.13.1/scripts/kconfig/menu.c 2005-09-12 00:08:45.000000000 -0400 >@@ -365,9 +365,9 @@ bool menu_is_visible(struct menu *menu) > const char *menu_get_prompt(struct menu *menu) > { > if (menu->prompt) >- return _(menu->prompt->text); >+ return menu->prompt->text; > else if (menu->sym) >- return _(menu->sym->name); >+ return menu->sym->name; > return NULL; > } > >diff -Naurp linux-2.6.13.1.orig/scripts/kconfig/qconf.cc linux-2.6.13.1/scripts/kconfig/qconf.cc >--- linux-2.6.13.1.orig/scripts/kconfig/qconf.cc 2005-09-09 22:42:58.000000000 -0400 >+++ linux-2.6.13.1/scripts/kconfig/qconf.cc 2005-09-12 00:08:45.000000000 -0400 >@@ -26,23 +26,8 @@ > #include "qconf.moc" > #include "images.c" > >-#ifdef _ >-# undef _ >-# define _ qgettext >-#endif >- > static QApplication *configApp; > >-static inline QString qgettext(const char* str) >-{ >- return QString::fromLocal8Bit(gettext(str)); >-} >- >-static inline QString qgettext(const QString& str) >-{ >- return QString::fromLocal8Bit(gettext(str.latin1())); >-} >- > ConfigSettings::ConfigSettings() > : showAll(false), showName(false), showRange(false), showData(false) > { >@@ -192,7 +177,7 @@ void ConfigItem::updateMenu(void) > > sym = menu->sym; > prop = menu->prompt; >- prompt = QString::fromLocal8Bit(menu_get_prompt(menu)); >+ prompt = menu_get_prompt(menu); > > if (prop) switch (prop->type) { > case P_MENU: >@@ -218,7 +203,7 @@ void ConfigItem::updateMenu(void) > if (!sym) > goto set_prompt; > >- setText(nameColIdx, QString::fromLocal8Bit(sym->name)); >+ setText(nameColIdx, sym->name); > > type = sym_get_type(sym); > switch (type) { >@@ -228,9 +213,9 @@ void ConfigItem::updateMenu(void) > > if (!sym_is_changable(sym) && !list->showAll) { > setPixmap(promptColIdx, 0); >- setText(noColIdx, QString::null); >- setText(modColIdx, QString::null); >- setText(yesColIdx, QString::null); >+ setText(noColIdx, 0); >+ setText(modColIdx, 0); >+ setText(yesColIdx, 0); > break; > } > expr = sym_get_tristate_value(sym); >@@ -272,7 +257,6 @@ void ConfigItem::updateMenu(void) > const char* data; > > data = sym_get_string_value(sym); >- > #if QT_VERSION >= 300 > int i = list->mapIdx(dataColIdx); > if (i >= 0) >@@ -280,9 +264,9 @@ void ConfigItem::updateMenu(void) > #endif > setText(dataColIdx, data); > if (type == S_STRING) >- prompt = QString("%1: %2").arg(prompt).arg(data); >+ prompt.sprintf("%s: %s", prompt.latin1(), data); > else >- prompt = QString("(%2) %1").arg(prompt).arg(data); >+ prompt.sprintf("(%s) %s", data, prompt.latin1()); > break; > } > if (!sym_has_value(sym) && visible) >@@ -359,9 +343,9 @@ void ConfigLineEdit::show(ConfigItem* i) > { > item = i; > if (sym_get_string_value(item->menu->sym)) >- setText(QString::fromLocal8Bit(sym_get_string_value(item->menu->sym))); >+ setText(sym_get_string_value(item->menu->sym)); > else >- setText(QString::null); >+ setText(0); > Parent::show(); > setFocus(); > } >@@ -977,7 +961,7 @@ ConfigMainWindow::ConfigMainWindow(void) > delete configSettings; > } > >-static QString print_filter(const QString &str) >+static QString print_filter(const char *str) > { > QRegExp re("[<>&\"\\n]"); > QString res = str; >@@ -1010,7 +994,7 @@ static QString print_filter(const QStrin > > static void expr_print_help(void *data, const char *str) > { >- reinterpret_cast<QString*>(data)->append(print_filter(str)); >+ ((QString*)data)->append(print_filter(str)); > } > > /* >@@ -1025,7 +1009,7 @@ void ConfigMainWindow::setHelp(QListView > if (item) > menu = ((ConfigItem*)item)->menu; > if (!menu) { >- helpText->setText(QString::null); >+ helpText->setText(NULL); > return; > } > >@@ -1035,16 +1019,16 @@ void ConfigMainWindow::setHelp(QListView > if (sym) { > if (menu->prompt) { > head += "<big><b>"; >- head += print_filter(_(menu->prompt->text)); >+ head += print_filter(menu->prompt->text); > head += "</b></big>"; > if (sym->name) { > head += " ("; >- head += print_filter(_(sym->name)); >+ head += print_filter(sym->name); > head += ")"; > } > } else if (sym->name) { > head += "<big><b>"; >- head += print_filter(_(sym->name)); >+ head += print_filter(sym->name); > head += "</b></big>"; > } > head += "<br><br>"; >@@ -1065,7 +1049,7 @@ void ConfigMainWindow::setHelp(QListView > case P_PROMPT: > case P_MENU: > debug += "prompt: "; >- debug += print_filter(_(prop->text)); >+ debug += print_filter(prop->text); > debug += "<br>"; > break; > case P_DEFAULT: >@@ -1104,10 +1088,10 @@ void ConfigMainWindow::setHelp(QListView > debug += "<br>"; > } > >- help = print_filter(_(sym->help)); >+ help = print_filter(sym->help); > } else if (menu->prompt) { > head += "<big><b>"; >- head += print_filter(_(menu->prompt->text)); >+ head += print_filter(menu->prompt->text); > head += "</b></big><br><br>"; > if (showDebug) { > if (menu->prompt->visible.expr) { >@@ -1127,7 +1111,7 @@ void ConfigMainWindow::loadConfig(void) > QString s = QFileDialog::getOpenFileName(".config", NULL, this); > if (s.isNull()) > return; >- if (conf_read(QFile::encodeName(s))) >+ if (conf_read(s.latin1())) > QMessageBox::information(this, "qconf", "Unable to load configuration!"); > ConfigView::updateListAll(); > } >@@ -1143,7 +1127,7 @@ void ConfigMainWindow::saveConfigAs(void > QString s = QFileDialog::getSaveFileName(".config", NULL, this); > if (s.isNull()) > return; >- if (conf_write(QFile::encodeName(s))) >+ if (conf_write(s.latin1())) > QMessageBox::information(this, "qconf", "Unable to save configuration!"); > } > >@@ -1388,9 +1372,6 @@ int main(int ac, char** av) > ConfigMainWindow* v; > const char *name; > >- bindtextdomain(PACKAGE, LOCALEDIR); >- textdomain(PACKAGE); >- > #ifndef LKC_DIRECT_LINK > kconfig_load(); > #endif
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 99810
:
64002
|
70868
| 71368 |
71369
|
71533
|
71887