]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.0432: Ancient XPM preprocessor hack may cause build errors v9.1.0432
authorDrew Vogel <dvogel@github>
Wed, 22 May 2024 14:51:53 +0000 (16:51 +0200)
committerChristian Brabandt <cb@256bit.org>
Wed, 22 May 2024 14:51:53 +0000 (16:51 +0200)
Problem:  Ancient XPM preprocessor hack may cause build errors.
Solution: Simplify XPM includes and get rid of complicated #ifdef magic
          (Drew Vogel).

closes: #14816

Signed-off-by: Drew Vogel <dvogel@github>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/vim16x16.xpm
runtime/vim32x32.xpm
runtime/vim48x48.xpm
src/gui_gtk_x11.c
src/gui_x11.c
src/version.c

index cb75b71781d00037aa38a21816d06705d6e9870f..9b55218cc0ecd5c7419d23b7d841a0affe59ba4d 100644 (file)
@@ -1,5 +1,5 @@
 /* XPM */
-static char * vim16x16[] = {
+static const char * vim16x16[] = {
 "16 16 8 1",
 "      c None",
 ".     c #000000",
index 43a3a40c0b207a812d4448091c0e6fefc4f2f52f..017b93b6f8fd68756040f3e65374b68ea2c11c2e 100644 (file)
@@ -1,5 +1,5 @@
 /* XPM */
-static char * vim32x32[] = {
+static const char * vim32x32[] = {
 "32 32 8 1",
 "      c None",
 ".     c #000000",
index b2fdd95924e0232c21026d69164cd85ec47f4189..8bd08bc5a3936c8bb2048e18e44507438567c400 100644 (file)
@@ -1,5 +1,5 @@
 /* XPM */
-static char * vim48x48[] = {
+static const char * vim48x48[] = {
 "48 48 8 1",
 "      c None",
 ".     c #000000",
index 4d201fcaede6655921905f838662aafc78709181..066aa174560a4c5470095786ccbc8b1342c7d59b 100644 (file)
@@ -2704,23 +2704,9 @@ global_event_filter(GdkXEvent *xev,
     static void
 mainwin_realize(GtkWidget *widget UNUSED, gpointer data UNUSED)
 {
-// If you get an error message here, you still need to unpack the runtime
-// archive!
-#ifdef magick
-# undef magick
-#endif
-  // A bit hackish, but avoids casting later and allows optimization
-# define static static const
-#define magick vim32x32
 #include "../runtime/vim32x32.xpm"
-#undef magick
-#define magick vim16x16
 #include "../runtime/vim16x16.xpm"
-#undef magick
-#define magick vim48x48
 #include "../runtime/vim48x48.xpm"
-#undef magick
-# undef static
 
     GdkWindow * const mainwin_win = gtk_widget_get_window(gui.mainwin);
 
index fc63658f8d7c881202f7528dc7555612ba887f89..edde6b55c593b956cf46f8e789b2ce67de9bdd59 100644 (file)
@@ -1363,20 +1363,9 @@ gui_mch_init(void)
 #else
 // Use Pixmaps, looking much nicer.
 
-// If you get an error message here, you still need to unpack the runtime
-// archive!
-# ifdef magick
-#  undef magick
-# endif
-# define magick vim32x32
 # include "../runtime/vim32x32.xpm"
-# undef magick
-# define magick vim16x16
 # include "../runtime/vim16x16.xpm"
-# undef magick
-# define magick vim48x48
 # include "../runtime/vim48x48.xpm"
-# undef magick
 
     static Pixmap      icon = 0;
     static Pixmap      icon_mask = 0;
index ca8af169000417e8110753f5e734c9f91830c6eb..b37dbcf857e0682892494f6f12d2e0cfc54093e9 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    432,
 /**/
     431,
 /**/