]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1584: using ints as boolean type v9.1.1584
authorHirohito Higashi <h.east.727@gmail.com>
Wed, 23 Jul 2025 18:41:11 +0000 (20:41 +0200)
committerChristian Brabandt <cb@256bit.org>
Wed, 23 Jul 2025 18:41:11 +0000 (20:41 +0200)
Problem:  using ints as bool
Solution: Include stdbool.h and start using bool type directly
          (Hirohito Higashi)

This is a test to see if using the boolean types cause any issues.
If this change causes issues on any platform, please reach out.

closes: #17830

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/gui.c
src/gui.h
src/version.c
src/vim.h

index 4d596519323da193b068fdf6dcb59fbd04ff3055..e125f87336bc81dd82ac739d323951f29325c9b9 100644 (file)
--- a/src/gui.c
+++ b/src/gui.c
@@ -396,7 +396,7 @@ gui_init_check(void)
        return result;
     }
 
-    gui.shell_created = FALSE;
+    gui.shell_created = false;
     gui.dying = FALSE;
     gui.in_focus = TRUE;               // so the guicursor setting works
     gui.dragged_sb = SBAR_NONE;
@@ -717,7 +717,7 @@ gui_init(void)
     gui_init_which_components(NULL);
 
     // All components of the GUI have been created now
-    gui.shell_created = TRUE;
+    gui.shell_created = true;
 
 #ifdef FEAT_GUI_MSWIN
     // Set the shell size, adjusted for the screen size.  For GTK this only
index f9fdd2d66bdc38c9446e8ee5e9d3528dbd377b34..5aa374b3c93ed49bbd4d82da369be7a035206aa5 100644 (file)
--- a/src/gui.h
+++ b/src/gui.h
@@ -234,7 +234,7 @@ typedef struct Gui
     int                in_focus;           // Vim has input focus
     int                in_use;             // Is the GUI being used?
     int                starting;           // GUI will start in a little while
-    int                shell_created;      // Has the shell been created yet?
+    bool       shell_created;      // Has the shell been created yet?
     int                dying;              // Is vim dying? Then output to terminal
     int                dofork;             // Use fork() when GUI is starting
 #ifdef GUI_MAY_SPAWN
index 440ad944458c8fbde9de0d9051ae4104305e8f19..74aa8a18a6872c797cc29168850f64589cd60c53 100644 (file)
@@ -719,6 +719,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1584,
 /**/
     1583,
 /**/
index 94a10a32292ba3c5267fe09f4e5e0f0ea4bcd02e..fcadb8912c60c6c268a7127255e8321f53796784 100644 (file)
--- a/src/vim.h
+++ b/src/vim.h
@@ -522,6 +522,7 @@ typedef long long vimlong_T;
 
 // for offsetof()
 #include <stddef.h>
+#include <stdbool.h>
 
 #if defined(HAVE_SYS_SELECT_H) && \
        (!defined(HAVE_SYS_TIME_H) || defined(SYS_SELECT_WITH_SYS_TIME))