From 2e436c8ff220beddb0d8e82abadd11fd12fc6881 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Wed, 4 Apr 2012 18:52:48 +0200 Subject: [PATCH] libs/images: fix warnings Signed-off-by: "Yann E. MORIN" --- frontends/gconf/gconf.c | 5 ++ frontends/gconf/gconf.c.patch | 20 ++--- frontends/qconf/qconf.cc | 15 ++++ frontends/qconf/qconf.cc.patch | 17 +++- libs/images/images.h | 30 +++++++ libs/images/images.h.patch | 156 +++++++++++++++++++++++++++++++++ 6 files changed, 231 insertions(+), 12 deletions(-) create mode 100644 libs/images/images.h.patch diff --git a/frontends/gconf/gconf.c b/frontends/gconf/gconf.c index b73a4f1..14da73a 100644 --- a/frontends/gconf/gconf.c +++ b/frontends/gconf/gconf.c @@ -11,6 +11,11 @@ #endif #include "lkc.h" +#define WANTS_xpm_single_view +#define WANTS_xpm_split_view +#define WANTS_xpm_tree_view +#define WANTS_xpm_menu +#define WANTS_xpm_void #include "images.h" #include diff --git a/frontends/gconf/gconf.c.patch b/frontends/gconf/gconf.c.patch index 923dec9..7ce7586 100644 --- a/frontends/gconf/gconf.c.patch +++ b/frontends/gconf/gconf.c.patch @@ -1,35 +1,33 @@ diff --git a/frontends/gconf/gconf.c b/frontends/gconf/gconf.c --- a/frontends/gconf/gconf.c +++ b/frontends/gconf/gconf.c -@@ -11,7 +11,7 @@ +@@ -11,7 +11,12 @@ #endif #include "lkc.h" -#include "images.c" ++#define WANTS_xpm_single_view ++#define WANTS_xpm_split_view ++#define WANTS_xpm_tree_view ++#define WANTS_xpm_menu ++#define WANTS_xpm_void +#include "images.h" #include #include -@@ -1468,7 +1468,9 @@ +@@ -1468,8 +1473,10 @@ int main(int ac, char *av[]) { const char *name; +#if 0 char *env; +#endif - gchar *glade_file = GUI_PATH; - - bindtextdomain(PACKAGE, LOCALEDIR); -@@ -1469,7 +1471,7 @@ - { - const char *name; - char *env; - gchar *glade_file; + gchar *glade_file = GUI_PATH; bindtextdomain(PACKAGE, LOCALEDIR); bind_textdomain_codeset(PACKAGE, "UTF-8"); -@@ -1483,6 +1483,7 @@ +@@ -1483,6 +1490,7 @@ //add_pixmap_directory (PACKAGE_DATA_DIR "/" PACKAGE "/pixmaps"); //add_pixmap_directory (PACKAGE_SOURCE_DIR "/pixmaps"); @@ -37,7 +35,7 @@ diff --git a/frontends/gconf/gconf.c b/frontends/gconf/gconf.c /* Determine GUI path */ env = getenv(SRCTREE); if (env) -@@ -1491,6 +1492,7 @@ +@@ -1491,6 +1499,7 @@ glade_file = g_strconcat(av[0], ".glade", NULL); else glade_file = g_strconcat(g_get_current_dir(), "/", av[0], ".glade", NULL); diff --git a/frontends/qconf/qconf.cc b/frontends/qconf/qconf.cc index 1b2b086..d8d61ba 100644 --- a/frontends/qconf/qconf.cc +++ b/frontends/qconf/qconf.cc @@ -46,6 +46,21 @@ #include "qconf.h" #include "qconf.moc" +#define WANTS_xpm_symbol_yes +#define WANTS_xpm_symbol_mod +#define WANTS_xpm_symbol_no +#define WANTS_xpm_choice_yes +#define WANTS_xpm_choice_no +#define WANTS_xpm_menu +#define WANTS_xpm_menu_inv +#define WANTS_xpm_menuback +#define WANTS_xpm_void +#define WANTS_xpm_back +#define WANTS_xpm_load +#define WANTS_xpm_save +#define WANTS_xpm_single_view +#define WANTS_xpm_split_view +#define WANTS_xpm_tree_view #include "images.h" #ifdef _ diff --git a/frontends/qconf/qconf.cc.patch b/frontends/qconf/qconf.cc.patch index fb7a129..54045a0 100644 --- a/frontends/qconf/qconf.cc.patch +++ b/frontends/qconf/qconf.cc.patch @@ -1,11 +1,26 @@ diff --git a/frontends/qconf/qconf.cc b/frontends/qconf/qconf.cc --- a/frontends/qconf/qconf.cc +++ b/frontends/qconf/qconf.cc -@@ -46,7 +46,7 @@ +@@ -46,7 +46,22 @@ #include "qconf.h" #include "qconf.moc" -#include "images.c" ++#define WANTS_xpm_symbol_yes ++#define WANTS_xpm_symbol_mod ++#define WANTS_xpm_symbol_no ++#define WANTS_xpm_choice_yes ++#define WANTS_xpm_choice_no ++#define WANTS_xpm_menu ++#define WANTS_xpm_menu_inv ++#define WANTS_xpm_menuback ++#define WANTS_xpm_void ++#define WANTS_xpm_back ++#define WANTS_xpm_load ++#define WANTS_xpm_save ++#define WANTS_xpm_single_view ++#define WANTS_xpm_split_view ++#define WANTS_xpm_tree_view +#include "images.h" #ifdef _ diff --git a/libs/images/images.h b/libs/images/images.h index d4f84bd..08fdf8a 100644 --- a/libs/images/images.h +++ b/libs/images/images.h @@ -3,6 +3,7 @@ * Released under the terms of the GNU GPL v2.0. */ +#ifdef WANTS_xpm_load static const char *xpm_load[] = { "22 22 5 1", ". c None", @@ -32,7 +33,9 @@ static const char *xpm_load[] = { "##cccccccccccc##......", "###############.......", "......................"}; +#endif +#ifdef WANTS_xpm_save static const char *xpm_save[] = { "22 22 5 1", ". c None", @@ -62,7 +65,9 @@ static const char *xpm_save[] = { ".#aaa#########bbb#aa#.", "..##################..", "......................"}; +#endif +#ifdef WANTS_xpm_back static const char *xpm_back[] = { "22 22 3 1", ". c None", @@ -90,7 +95,9 @@ static const char *xpm_back[] = { "......................", "......................", "......................"}; +#endif +#ifdef WANTS_xpm_tree_view static const char *xpm_tree_view[] = { "22 22 2 1", ". c None", @@ -117,7 +124,9 @@ static const char *xpm_tree_view[] = { "......########........", "......................", "......................"}; +#endif +#ifdef WANTS_xpm_single_view static const char *xpm_single_view[] = { "22 22 2 1", ". c None", @@ -144,7 +153,9 @@ static const char *xpm_single_view[] = { "..........#...........", "......................", "......................"}; +#endif +#ifdef WANTS_xpm_split_view static const char *xpm_split_view[] = { "22 22 2 1", ". c None", @@ -171,7 +182,9 @@ static const char *xpm_split_view[] = { "......#......#........", "......................", "......................"}; +#endif +#ifdef WANTS_xpm_symbol_no static const char *xpm_symbol_no[] = { "12 12 2 1", " c white", @@ -188,7 +201,9 @@ static const char *xpm_symbol_no[] = { " . . ", " .......... ", " "}; +#endif +#ifdef WANTS_xpm_symbol_mod static const char *xpm_symbol_mod[] = { "12 12 2 1", " c white", @@ -205,7 +220,9 @@ static const char *xpm_symbol_mod[] = { " . . ", " .......... ", " "}; +#endif +#ifdef WANTS_xpm_symbol_yes static const char *xpm_symbol_yes[] = { "12 12 2 1", " c white", @@ -222,7 +239,9 @@ static const char *xpm_symbol_yes[] = { " . . ", " .......... ", " "}; +#endif +#ifdef WANTS_xpm_choice_no static const char *xpm_choice_no[] = { "12 12 2 1", " c white", @@ -239,7 +258,9 @@ static const char *xpm_choice_no[] = { " .. .. ", " .... ", " "}; +#endif +#ifdef WANTS_xpm_choice_yes static const char *xpm_choice_yes[] = { "12 12 2 1", " c white", @@ -256,7 +277,9 @@ static const char *xpm_choice_yes[] = { " .. .. ", " .... ", " "}; +#endif +#ifdef WANTS_xpm_menu static const char *xpm_menu[] = { "12 12 2 1", " c white", @@ -273,7 +296,9 @@ static const char *xpm_menu[] = { " . . ", " .......... ", " "}; +#endif +#ifdef WANTS_xpm_menu_inv static const char *xpm_menu_inv[] = { "12 12 2 1", " c white", @@ -290,7 +315,9 @@ static const char *xpm_menu_inv[] = { " .......... ", " .......... ", " "}; +#endif +#ifdef WANTS_xpm_menuback static const char *xpm_menuback[] = { "12 12 2 1", " c white", @@ -307,7 +334,9 @@ static const char *xpm_menuback[] = { " . . ", " .......... ", " "}; +#endif +#ifdef WANTS_xpm_void static const char *xpm_void[] = { "12 12 2 1", " c white", @@ -324,3 +353,4 @@ static const char *xpm_void[] = { " ", " ", " "}; +#endif diff --git a/libs/images/images.h.patch b/libs/images/images.h.patch new file mode 100644 index 0000000..023e8dd --- /dev/null +++ b/libs/images/images.h.patch @@ -0,0 +1,156 @@ +diff --git a/libs/images/images.h b/libs/images/images.h +--- a/libs/images/images.h ++++ b/libs/images/images.h +@@ -3,6 +3,7 @@ + * Released under the terms of the GNU GPL v2.0. + */ + ++#ifdef WANTS_xpm_load + static const char *xpm_load[] = { + "22 22 5 1", + ". c None", +@@ -32,7 +33,9 @@ + "##cccccccccccc##......", + "###############.......", + "......................"}; ++#endif + ++#ifdef WANTS_xpm_save + static const char *xpm_save[] = { + "22 22 5 1", + ". c None", +@@ -62,7 +65,9 @@ + ".#aaa#########bbb#aa#.", + "..##################..", + "......................"}; ++#endif + ++#ifdef WANTS_xpm_back + static const char *xpm_back[] = { + "22 22 3 1", + ". c None", +@@ -90,7 +95,9 @@ + "......................", + "......................", + "......................"}; ++#endif + ++#ifdef WANTS_xpm_tree_view + static const char *xpm_tree_view[] = { + "22 22 2 1", + ". c None", +@@ -117,7 +124,9 @@ + "......########........", + "......................", + "......................"}; ++#endif + ++#ifdef WANTS_xpm_single_view + static const char *xpm_single_view[] = { + "22 22 2 1", + ". c None", +@@ -144,7 +153,9 @@ + "..........#...........", + "......................", + "......................"}; ++#endif + ++#ifdef WANTS_xpm_split_view + static const char *xpm_split_view[] = { + "22 22 2 1", + ". c None", +@@ -171,7 +182,9 @@ + "......#......#........", + "......................", + "......................"}; ++#endif + ++#ifdef WANTS_xpm_symbol_no + static const char *xpm_symbol_no[] = { + "12 12 2 1", + " c white", +@@ -188,7 +201,9 @@ + " . . ", + " .......... ", + " "}; ++#endif + ++#ifdef WANTS_xpm_symbol_mod + static const char *xpm_symbol_mod[] = { + "12 12 2 1", + " c white", +@@ -205,7 +220,9 @@ + " . . ", + " .......... ", + " "}; ++#endif + ++#ifdef WANTS_xpm_symbol_yes + static const char *xpm_symbol_yes[] = { + "12 12 2 1", + " c white", +@@ -222,7 +239,9 @@ + " . . ", + " .......... ", + " "}; ++#endif + ++#ifdef WANTS_xpm_choice_no + static const char *xpm_choice_no[] = { + "12 12 2 1", + " c white", +@@ -239,7 +258,9 @@ + " .. .. ", + " .... ", + " "}; ++#endif + ++#ifdef WANTS_xpm_choice_yes + static const char *xpm_choice_yes[] = { + "12 12 2 1", + " c white", +@@ -256,7 +277,9 @@ + " .. .. ", + " .... ", + " "}; ++#endif + ++#ifdef WANTS_xpm_menu + static const char *xpm_menu[] = { + "12 12 2 1", + " c white", +@@ -273,7 +296,9 @@ + " . . ", + " .......... ", + " "}; ++#endif + ++#ifdef WANTS_xpm_menu_inv + static const char *xpm_menu_inv[] = { + "12 12 2 1", + " c white", +@@ -290,7 +315,9 @@ + " .......... ", + " .......... ", + " "}; ++#endif + ++#ifdef WANTS_xpm_menuback + static const char *xpm_menuback[] = { + "12 12 2 1", + " c white", +@@ -307,7 +334,9 @@ + " . . ", + " .......... ", + " "}; ++#endif + ++#ifdef WANTS_xpm_void + static const char *xpm_void[] = { + "12 12 2 1", + " c white", +@@ -324,3 +353,4 @@ + " ", + " ", + " "}; ++#endif -- 2.39.5