diff '--color=auto' -Naur ghostscript-10.05.1/base/gdevkrnlsclass.c ghostscript-10.05.1.new/base/gdevkrnlsclass.c
--- ghostscript-10.05.1/base/gdevkrnlsclass.c	2025-04-29 13:01:29.000000000 +0200
+++ ghostscript-10.05.1.new/base/gdevkrnlsclass.c	2025-05-06 22:59:00.391302752 +0200
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2023 Artifex Software, Inc.
+/* Copyright (C) 2001-2025 Artifex Software, Inc.
    All Rights Reserved.
 
    This software is provided AS-IS with no warranty, either express or
@@ -29,7 +29,7 @@
  * of devices which the push of the compositor claims are already installed (to prevent
  * a second copy being installed by gdev_prn_open).
  */
-int install_internal_subclass_devices(gx_device **ppdev, int *devices_loaded)
+int install_internal_subclass_devices(gx_device **ppdev, bool *devices_loaded)
 {
     int code = 0;
     gx_device *dev = (gx_device *)*ppdev, *saved;
diff '--color=auto' -Naur ghostscript-10.05.1/base/gdevkrnlsclass.h ghostscript-10.05.1.new/base/gdevkrnlsclass.h
--- ghostscript-10.05.1/base/gdevkrnlsclass.h	2025-04-29 13:01:29.000000000 +0200
+++ ghostscript-10.05.1.new/base/gdevkrnlsclass.h	2025-05-06 22:59:00.392081343 +0200
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2023 Artifex Software, Inc.
+/* Copyright (C) 2001-2025 Artifex Software, Inc.
    All Rights Reserved.
 
    This software is provided AS-IS with no warranty, either express or
@@ -29,6 +29,6 @@
 
 extern gx_device_nup gs_nup_device;
 
-int install_internal_subclass_devices(gx_device **ppdev, int *devices_loaded);
+int install_internal_subclass_devices(gx_device **ppdev, bool *devices_loaded);
 
 #endif /* gdev_subclass_dev_INCLUDED */
diff '--color=auto' -Naur ghostscript-10.05.1/base/gdevnup.c ghostscript-10.05.1.new/base/gdevnup.c
--- ghostscript-10.05.1/base/gdevnup.c	2025-04-29 13:01:29.000000000 +0200
+++ ghostscript-10.05.1.new/base/gdevnup.c	2025-05-06 22:59:00.392173266 +0200
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2023 Artifex Software, Inc.
+/* Copyright (C) 2001-2025 Artifex Software, Inc.
    All Rights Reserved.
 
    This software is provided AS-IS with no warranty, either express or
@@ -682,7 +682,7 @@
         case gxdso_get_dev_param:
             {
                 dev_param_req_t *request = (dev_param_req_t *)data;
-                int code = false;
+                bool code = false;
 
                 /* We need to disable pdfmark writing, primarily for CropBox, but also	*/
                 /* they are probably not relevant for multiple input files to a single	*/
diff '--color=auto' -Naur ghostscript-10.05.1/base/gp.h ghostscript-10.05.1.new/base/gp.h
--- ghostscript-10.05.1/base/gp.h	2025-04-29 13:01:29.000000000 +0200
+++ ghostscript-10.05.1.new/base/gp.h	2025-05-06 22:59:00.392268656 +0200
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2023 Artifex Software, Inc.
+/* Copyright (C) 2001-2025 Artifex Software, Inc.
    All Rights Reserved.
 
    This software is provided AS-IS with no warranty, either express or
@@ -646,7 +646,7 @@
 /* Create a second open gp_file on the basis of a given one */
 FILE *gp_fdup_impl(FILE *f, const char *mode);
 
-int gp_fseekable_impl(FILE *f);
+bool gp_fseekable_impl(FILE *f);
 
 /* Force given file into binary mode (no eol translations, etc) */
 /* if 2nd param true, text mode if 2nd param false */
diff '--color=auto' -Naur ghostscript-10.05.1/base/gsfcmap.c ghostscript-10.05.1.new/base/gsfcmap.c
--- ghostscript-10.05.1/base/gsfcmap.c	2025-04-29 13:01:29.000000000 +0200
+++ ghostscript-10.05.1.new/base/gsfcmap.c	2025-05-06 22:59:00.392368443 +0200
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2023 Artifex Software, Inc.
+/* Copyright (C) 2001-2025 Artifex Software, Inc.
    All Rights Reserved.
 
    This software is provided AS-IS with no warranty, either express or
@@ -221,7 +221,7 @@
 /*
  * Check for identity CMap. Uses a fast check for special cases.
  */
-int
+bool
 gs_cmap_is_identity(const gs_cmap_t *pcmap, int font_index_only)
 {
     return pcmap->procs->is_identity(pcmap, font_index_only);
diff '--color=auto' -Naur ghostscript-10.05.1/base/gsovrc.c ghostscript-10.05.1.new/base/gsovrc.c
--- ghostscript-10.05.1/base/gsovrc.c	2025-04-29 13:01:29.000000000 +0200
+++ ghostscript-10.05.1.new/base/gsovrc.c	2025-05-06 22:59:00.392505131 +0200
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2024 Artifex Software, Inc.
+/* Copyright (C) 2001-2025 Artifex Software, Inc.
    All Rights Reserved.
 
    This software is provided AS-IS with no warranty, either express or
@@ -297,7 +297,7 @@
  * This is used by the gs_pdf1.4_device (and eventually the PDFWrite
  * device), which implements overprint and overprint mode directly.
  */
-int
+bool
 gs_is_overprint_compositor(const gs_composite_t * pct)
 {
     return pct->type == &gs_composite_overprint_type;
diff '--color=auto' -Naur ghostscript-10.05.1/base/gsstate.h ghostscript-10.05.1.new/base/gsstate.h
--- ghostscript-10.05.1/base/gsstate.h	2025-04-29 13:01:29.000000000 +0200
+++ ghostscript-10.05.1.new/base/gsstate.h	2025-05-06 22:59:00.392613114 +0200
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2023 Artifex Software, Inc.
+/* Copyright (C) 2001-2025 Artifex Software, Inc.
    All Rights Reserved.
 
    This software is provided AS-IS with no warranty, either express or
@@ -54,8 +54,8 @@
 int gs_currentrenderingintent(const gs_gstate *);
 int gs_setrenderingintent(gs_gstate *, int);
 
-int gs_currentblackptcomp(const gs_gstate *);
-int gs_setblackptcomp(gs_gstate *, int);
+bool gs_currentblackptcomp(const gs_gstate *);
+int gs_setblackptcomp(gs_gstate *, bool);
 
 int gs_initgraphics(gs_gstate *);
 int gs_initgraphics_no_cspace(gs_gstate *);
diff '--color=auto' -Naur ghostscript-10.05.1/base/gxcmap.c ghostscript-10.05.1.new/base/gxcmap.c
--- ghostscript-10.05.1/base/gxcmap.c	2025-04-29 13:01:29.000000000 +0200
+++ ghostscript-10.05.1.new/base/gxcmap.c	2025-05-06 22:59:00.392926985 +0200
@@ -601,7 +601,7 @@
 /* If someone has specified a table for handling named spot colors then we will
    be attempting to do the special handling to go directly to the device colors
    here */
-bool
+int
 gx_remap_named_color(const gs_client_color * pcc, const gs_color_space * pcs,
 gx_device_color * pdc, const gs_gstate * pgs, gx_device * dev,
 gs_color_select_t select)
diff '--color=auto' -Naur ghostscript-10.05.1/base/gxdownscale.c ghostscript-10.05.1.new/base/gxdownscale.c
--- ghostscript-10.05.1/base/gxdownscale.c	2025-04-29 13:01:29.000000000 +0200
+++ ghostscript-10.05.1.new/base/gxdownscale.c	2025-05-06 22:59:00.393189811 +0200
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2024 Artifex Software, Inc.
+/* Copyright (C) 2001-2025 Artifex Software, Inc.
    All Rights Reserved.
 
    This software is provided AS-IS with no warranty, either express or
@@ -3376,7 +3376,8 @@
                               int                   features)
 {
     int code;
-    int downscale, mfs, ets, deskew;
+    int downscale, mfs, ets;
+    bool deskew;
     int trap_w, trap_h;
     const char *param_name;
     gs_param_int_array trap_order;
diff '--color=auto' -Naur ghostscript-10.05.1/base/gxdownscale.h ghostscript-10.05.1.new/base/gxdownscale.h
--- ghostscript-10.05.1/base/gxdownscale.h	2025-04-29 13:01:29.000000000 +0200
+++ ghostscript-10.05.1.new/base/gxdownscale.h	2025-05-06 22:59:00.393395137 +0200
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2023 Artifex Software, Inc.
+/* Copyright (C) 2001-2025 Artifex Software, Inc.
    All Rights Reserved.
 
    This software is provided AS-IS with no warranty, either express or
@@ -124,7 +124,7 @@
     int trap_h;
     int trap_order[GS_CLIENT_COLOR_MAX_COMPONENTS];
     int ets;
-    int do_skew_detection;
+    bool do_skew_detection;
 } gx_downscaler_params;
 
 /* To use the downscaler:
diff '--color=auto' -Naur ghostscript-10.05.1/base/gxfapi.h ghostscript-10.05.1.new/base/gxfapi.h
--- ghostscript-10.05.1/base/gxfapi.h	2025-04-29 13:01:29.000000000 +0200
+++ ghostscript-10.05.1.new/base/gxfapi.h	2025-05-06 22:59:00.393450081 +0200
@@ -348,7 +348,7 @@
     gs_fapi_retcode(*get_decodingID) (gs_fapi_server *server, gs_fapi_font *ff, const char **decodingID);
     gs_fapi_retcode(*get_font_bbox) (gs_fapi_server *server, gs_fapi_font *ff, int BBox[4], int unitsPerEm[2]);
     gs_fapi_retcode(*get_font_proportional_feature) (gs_fapi_server *server, gs_fapi_font *ff, bool *bProportional);
-    gs_fapi_retcode(*can_retrieve_char_by_name) (gs_fapi_server *server, gs_fapi_font *ff, gs_fapi_char_ref *c, int *result);
+    gs_fapi_retcode(*can_retrieve_char_by_name) (gs_fapi_server *server, gs_fapi_font *ff, gs_fapi_char_ref *c, bool *result);
     gs_fapi_retcode(*can_replace_metrics) (gs_fapi_server *server, gs_fapi_font *ff, gs_fapi_char_ref *c, int *result);
     gs_fapi_retcode(*can_simulate_style) (gs_fapi_server *server, gs_fapi_font *ff, gs_fapi_style style, void *style_data);
     gs_fapi_retcode(*get_fontmatrix) (gs_fapi_server *server, gs_matrix *m);
diff '--color=auto' -Naur ghostscript-10.05.1/base/gximag3x.c ghostscript-10.05.1.new/base/gximag3x.c
--- ghostscript-10.05.1/base/gximag3x.c	2025-04-29 13:01:29.000000000 +0200
+++ ghostscript-10.05.1.new/base/gximag3x.c	2025-05-06 22:59:00.393522677 +0200
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2024 Artifex Software, Inc.
+/* Copyright (C) 2001-2025 Artifex Software, Inc.
    All Rights Reserved.
 
    This software is provided AS-IS with no warranty, either express or
@@ -391,7 +391,7 @@
  * pmcs->{InterleaveType,width,height,full_height,depth,data,y,skip}.
  * If the mask is omitted, sets pmcs->depth = 0 and returns normally.
  */
-static bool
+static int
 check_image3x_mask(const gs_image3x_t *pim, const gs_image3x_mask_t *pimm,
                    const image3x_channel_values_t *ppcv,
                    image3x_channel_values_t *pmcv,
diff '--color=auto' -Naur ghostscript-10.05.1/base/gxiscale.c ghostscript-10.05.1.new/base/gxiscale.c
--- ghostscript-10.05.1/base/gxiscale.c	2025-04-29 13:01:29.000000000 +0200
+++ ghostscript-10.05.1.new/base/gxiscale.c	2025-05-06 22:59:00.393753362 +0200
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2024 Artifex Software, Inc.
+/* Copyright (C) 2001-2025 Artifex Software, Inc.
    All Rights Reserved.
 
    This software is provided AS-IS with no warranty, either express or
@@ -112,7 +112,7 @@
     char data[] = "NoInterpolateImagemasks";
     dev_param_req_t request;
     gs_c_param_list list;
-    int nointerpolate = 0;
+    bool nointerpolate = false;
     int code;
 
     gs_c_param_list_write(&list, dev->memory);
diff '--color=auto' -Naur ghostscript-10.05.1/base/stdpre.h ghostscript-10.05.1.new/base/stdpre.h
--- ghostscript-10.05.1/base/stdpre.h	2025-04-29 13:01:29.000000000 +0200
+++ ghostscript-10.05.1.new/base/stdpre.h	2025-05-06 22:59:00.393955863 +0200
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2023 Artifex Software, Inc.
+/* Copyright (C) 2001-2025 Artifex Software, Inc.
    All Rights Reserved.
 
    This software is provided AS-IS with no warranty, either express or
@@ -341,7 +341,9 @@
  * and the MetroWerks C++ compiler insists that bool be equivalent to
  * unsigned char.
  */
-#ifndef __cplusplus
+
+/* C23 has bool as a builtin type. */
+#if !defined(__cplusplus) && (!defined(__STDC_VERSION__) || __STDC_VERSION__ < 202311L)
 #ifdef __BEOS__
 typedef unsigned char bool;
 #else
diff '--color=auto' -Naur ghostscript-10.05.1/contrib/eplaser/gdevescv.c ghostscript-10.05.1.new/contrib/eplaser/gdevescv.c
--- ghostscript-10.05.1/contrib/eplaser/gdevescv.c	2025-04-29 13:01:29.000000000 +0200
+++ ghostscript-10.05.1.new/contrib/eplaser/gdevescv.c	2025-05-06 22:59:00.394088353 +0200
@@ -183,7 +183,7 @@
         0,			/*   int           prev_paper_height; */\
         0,			/*   int           prev_num_copies; */\
         -1,			/*   int           prev_feed_mode; */\
-        0,			/*   int           orientation; */\
+        false,			/*   bool          orientation; */\
         ESCPAGE_FACEUP_DEFAULT,	/*   bool          faceup; */\
         ESCPAGE_MEDIATYPE_DEFAULT, /*   int           MediaType; */\
         0,			/*   bool          first_page; */\
diff '--color=auto' -Naur ghostscript-10.05.1/contrib/eplaser/gdevescv.h ghostscript-10.05.1.new/contrib/eplaser/gdevescv.h
--- ghostscript-10.05.1/contrib/eplaser/gdevescv.h	2025-04-29 13:01:29.000000000 +0200
+++ ghostscript-10.05.1.new/contrib/eplaser/gdevescv.h	2025-05-06 22:59:00.394224429 +0200
@@ -126,7 +126,7 @@
   int           prev_paper_height;
   int           prev_num_copies;
   int           prev_feed_mode;
-  int           orientation;
+  bool          orientation;
   bool          faceup;
   int           MediaType;
   bool          first_page;
diff '--color=auto' -Naur ghostscript-10.05.1/contrib/gdevmd2k.c ghostscript-10.05.1.new/contrib/gdevmd2k.c
--- ghostscript-10.05.1/contrib/gdevmd2k.c	2025-04-29 13:01:29.000000000 +0200
+++ ghostscript-10.05.1.new/contrib/gdevmd2k.c	2025-05-06 22:59:00.394278952 +0200
@@ -157,10 +157,11 @@
 }
 
 static int
-alps_put_param_bool(gs_param_list *plist, gs_param_name pname, int *pvalue,
+alps_put_param_bool(gs_param_list *plist, gs_param_name pname, bool *pvalue,
                    int ecode)
 {
-    int code, value;
+    int code;
+    bool value;
     switch (code = param_read_bool(plist, pname, &value)) {
     default:
         return code;
diff '--color=auto' -Naur ghostscript-10.05.1/contrib/lips4/gdevl4r.c ghostscript-10.05.1.new/contrib/lips4/gdevl4r.c
--- ghostscript-10.05.1/contrib/lips4/gdevl4r.c	2025-04-29 13:01:29.000000000 +0200
+++ ghostscript-10.05.1.new/contrib/lips4/gdevl4r.c	2025-05-06 22:59:00.394363271 +0200
@@ -496,7 +496,7 @@
     int code;
     gs_param_name param_name;
     gs_param_string pmedia;
-    bool nup = lips4->nup;
+    int nup = lips4->nup;
     bool faceup = lips4->faceup;
     int old_bpp = pdev->color_info.depth;
     int bpp = 0;
diff '--color=auto' -Naur ghostscript-10.05.1/contrib/lips4/gdevl4v.c ghostscript-10.05.1.new/contrib/lips4/gdevl4v.c
--- ghostscript-10.05.1/contrib/lips4/gdevl4v.c	2025-04-29 13:01:29.000000000 +0200
+++ ghostscript-10.05.1.new/contrib/lips4/gdevl4v.c	2025-05-06 22:59:00.394488166 +0200
@@ -224,7 +224,7 @@
 static int
 lips4v_setlogop(gx_device_vector * vdev, gs_logical_operation_t lop,
                  gs_logical_operation_t diff);
-static int lips4v_can_handle_hl_color(gx_device_vector * vdev, const gs_gstate * pgs,
+static bool lips4v_can_handle_hl_color(gx_device_vector * vdev, const gs_gstate * pgs,
                   const gx_drawing_color * pdc);
 static int
 
@@ -1220,7 +1220,7 @@
 }
 
 /*--- added for Ghostscritp 8.15 ---*/
-static int
+static bool
 lips4v_can_handle_hl_color(gx_device_vector * vdev, const gs_gstate * pgs1,
               const gx_drawing_color * pdc)
 {
diff '--color=auto' -Naur ghostscript-10.05.1/contrib/opvp/gdevopvp.c ghostscript-10.05.1.new/contrib/opvp/gdevopvp.c
--- ghostscript-10.05.1/contrib/opvp/gdevopvp.c	2025-04-29 13:01:29.000000000 +0200
+++ ghostscript-10.05.1.new/contrib/opvp/gdevopvp.c	2025-05-06 22:59:00.394800354 +0200
@@ -265,7 +265,7 @@
 static  int opvp_setflat(gx_device_vector *, double);
 static  int opvp_setlogop(gx_device_vector *, gs_logical_operation_t,
                           gs_logical_operation_t);
-static  int opvp_can_handle_hl_color(gx_device_vector *, const gs_gstate *, const gx_drawing_color *);
+static  bool opvp_can_handle_hl_color(gx_device_vector *, const gs_gstate *, const gx_drawing_color *);
 static  int opvp_setfillcolor(gx_device_vector *, const gs_gstate *, const gx_drawing_color *);
 static  int opvp_setstrokecolor(gx_device_vector *, const gs_gstate *,const gx_drawing_color *);
 static  int opvp_vector_dopath(gx_device_vector *, const gx_path *,
@@ -4947,7 +4947,7 @@
 }
 
 /*--- added for Ghostscript 8.15 ---*/
-static int
+static bool
 opvp_can_handle_hl_color(gx_device_vector * vdev,
               const gs_gstate * pgs1, const gx_drawing_color * pdc)
 {
diff '--color=auto' -Naur ghostscript-10.05.1/devices/gdevcdj.c ghostscript-10.05.1.new/devices/gdevcdj.c
--- ghostscript-10.05.1/devices/gdevcdj.c	2025-04-29 13:01:29.000000000 +0200
+++ ghostscript-10.05.1.new/devices/gdevcdj.c	2025-05-06 22:59:00.395105919 +0200
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2023 Artifex Software, Inc.
+/* Copyright (C) 2001-2025 Artifex Software, Inc.
    All Rights Reserved.
 
    This software is provided AS-IS with no warranty, either express or
@@ -337,7 +337,7 @@
     bool mediaWeight_isSet;	/* Say if weight is an integer or null */ \
     int mediaWeight;		/* Weigth of the media */ \
     int printQuality;		/* Cf. strings below */ \
-    bool ditheringType;		/* Do dithering */ \
+    int ditheringType;		/* Do dithering */ \
     int colorComponents;	/* The number of *desired* color comps */ \
     int printColors		/* 0: Transparent, \
                                    1: C, 2: M, 4: Y, 7: K (Color decomp). \
diff '--color=auto' -Naur ghostscript-10.05.1/devices/gdevpdfimg.h ghostscript-10.05.1.new/devices/gdevpdfimg.h
--- ghostscript-10.05.1/devices/gdevpdfimg.h	2025-04-29 13:01:29.000000000 +0200
+++ ghostscript-10.05.1.new/devices/gdevpdfimg.h	2025-05-06 22:59:00.395263746 +0200
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2023 Artifex Software, Inc.
+/* Copyright (C) 2001-2025 Artifex Software, Inc.
    All Rights Reserved.
 
    This software is provided AS-IS with no warranty, either express or
@@ -74,8 +74,8 @@
     PCLm_temp_file_t temp_stream;
     int NextObject;
 
-    int Tumble;
-    int Tumble2;
+    bool Tumble;
+    bool Tumble2;
 
     /* OCR data */
     struct {
diff '--color=auto' -Naur ghostscript-10.05.1/devices/vector/gdevpdfd.c ghostscript-10.05.1.new/devices/vector/gdevpdfd.c
--- ghostscript-10.05.1/devices/vector/gdevpdfd.c	2025-04-29 13:01:29.000000000 +0200
+++ ghostscript-10.05.1.new/devices/vector/gdevpdfd.c	2025-05-06 22:59:00.395352023 +0200
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2024 Artifex Software, Inc.
+/* Copyright (C) 2001-2025 Artifex Software, Inc.
    All Rights Reserved.
 
    This software is provided AS-IS with no warranty, either express or
@@ -108,7 +108,7 @@
     return psdf_setlinewidth(vdev, fabs(width));
 }
 
-static int
+static bool
 pdf_can_handle_hl_color(gx_device_vector * vdev, const gs_gstate * pgs,
                  const gx_drawing_color * pdc)
 {
diff '--color=auto' -Naur ghostscript-10.05.1/devices/vector/gdevpdtt.c ghostscript-10.05.1.new/devices/vector/gdevpdtt.c
--- ghostscript-10.05.1/devices/vector/gdevpdtt.c	2025-04-29 13:01:29.000000000 +0200
+++ ghostscript-10.05.1.new/devices/vector/gdevpdtt.c	2025-05-06 22:59:00.395595141 +0200
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2024 Artifex Software, Inc.
+/* Copyright (C) 2001-2025 Artifex Software, Inc.
    All Rights Reserved.
 
    This software is provided AS-IS with no warranty, either express or
@@ -3272,18 +3272,14 @@
     gs_matrix_scale(pmat, pdev->HWResolution[0] / 72.0, pdev->HWResolution[0] / 72.0, pmat);
 }
 
-static int pdf_query_purge_cached_char(const gs_memory_t *mem, cached_char *cc, void *data)
+static bool pdf_query_purge_cached_char(const gs_memory_t *mem, cached_char *cc, void *data)
 {
     cached_char *to_purge = (cached_char *)data;
 
-
-    if (cc->code == to_purge->code && cc_pair(cc) == cc_pair(to_purge) &&
-        cc->subpix_origin.x == to_purge->subpix_origin.x &&
-        cc->subpix_origin.y == to_purge->subpix_origin.y &&
-        cc->wmode == to_purge->wmode && cc_depth(cc) == cc_depth(to_purge)
-        )
-        return 1;
-    return 0;
+    return cc->code == to_purge->code && cc_pair(cc) == cc_pair(to_purge) &&
+           cc->subpix_origin.x == to_purge->subpix_origin.x &&
+           cc->subpix_origin.y == to_purge->subpix_origin.y &&
+           cc->wmode == to_purge->wmode && cc_depth(cc) == cc_depth(to_purge);
 }
 
 static int ProcessTextForOCR(gs_text_enum_t *pte)
diff '--color=auto' -Naur ghostscript-10.05.1/devices/vector/gdevpx.c ghostscript-10.05.1.new/devices/vector/gdevpx.c
--- ghostscript-10.05.1/devices/vector/gdevpx.c	2025-04-29 13:01:29.000000000 +0200
+++ ghostscript-10.05.1.new/devices/vector/gdevpx.c	2025-05-06 22:59:00.395826907 +0200
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2023 Artifex Software, Inc.
+/* Copyright (C) 2001-2025 Artifex Software, Inc.
    All Rights Reserved.
 
    This software is provided AS-IS with no warranty, either express or
@@ -1393,7 +1393,7 @@
     return 0;
 }
 
-static int
+static bool
 pclxl_can_handle_hl_color(gx_device_vector * vdev, const gs_gstate * pgs,
                           const gx_drawing_color * pdc)
 {
diff '--color=auto' -Naur ghostscript-10.05.1/devices/vector/gdevxps.c ghostscript-10.05.1.new/devices/vector/gdevxps.c
--- ghostscript-10.05.1/devices/vector/gdevxps.c	2025-04-29 13:01:29.000000000 +0200
+++ ghostscript-10.05.1.new/devices/vector/gdevxps.c	2025-05-06 22:59:00.396001376 +0200
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2024 Artifex Software, Inc.
+/* Copyright (C) 2001-2025 Artifex Software, Inc.
    All Rights Reserved.
 
    This software is provided AS-IS with no warranty, either express or
@@ -271,7 +271,7 @@
 xps_setlogop(gx_device_vector *vdev, gs_logical_operation_t lop,
              gs_logical_operation_t diff);
 
-static int
+static bool
 xps_can_handle_hl_color(gx_device_vector *vdev, const gs_gstate *pgs,
                         const gx_drawing_color * pdc);
 static int
@@ -1480,12 +1480,12 @@
 
         /* Other state */
 
-static int
+static bool
 xps_can_handle_hl_color(gx_device_vector *vdev, const gs_gstate *pgs,
                           const gx_drawing_color *pdc)
 {
     if_debug0m('_', vdev->memory, "xps_can_handle_hl_color\n");
-    return 0;
+    return false;
 }
 
 /* Paths */
diff '--color=auto' -Naur ghostscript-10.05.1/pdf/pdf_device.c ghostscript-10.05.1.new/pdf/pdf_device.c
--- ghostscript-10.05.1/pdf/pdf_device.c	2025-04-29 13:01:29.000000000 +0200
+++ ghostscript-10.05.1.new/pdf/pdf_device.c	2025-05-06 22:59:13.614344141 +0200
@@ -1,4 +1,4 @@
-/* Copyright (C) 2019-2024 Artifex Software, Inc.
+/* Copyright (C) 2019-2025 Artifex Software, Inc.
    All Rights Reserved.
 
    This software is provided AS-IS with no warranty, either express or
@@ -45,7 +45,7 @@
 {
     int code;
     gs_c_param_list list;
-    int value;
+    bool value;
 
     code = pdfi_device_check_param(dev, param, &list);
     if (code < 0)
@@ -57,7 +57,7 @@
     if (code < 0)
         value = false;
     gs_c_param_list_release(&list);
-    return (bool)value;
+    return value;
 }
 
 /* Set value of string device parameter */
diff '--color=auto' -Naur ghostscript-10.05.1/psi/zcontrol.c ghostscript-10.05.1.new/psi/zcontrol.c
--- ghostscript-10.05.1/psi/zcontrol.c	2025-04-29 13:01:29.000000000 +0200
+++ ghostscript-10.05.1.new/psi/zcontrol.c	2025-05-06 22:59:13.614456583 +0200
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2023 Artifex Software, Inc.
+/* Copyright (C) 2001-2025 Artifex Software, Inc.
    All Rights Reserved.
 
    This software is provided AS-IS with no warranty, either express or
@@ -990,7 +990,7 @@
  * interpreter to catch them, so that we can signal the error with the
  * object still on the operand stack.
  */
-static bool
+static int
 check_for_exec(const_os_ptr op)
 {
     if (!r_has_attr(op, a_execute) && /* only true if noaccess */
diff '--color=auto' -Naur ghostscript-10.05.1/psi/zfdecode.c ghostscript-10.05.1.new/psi/zfdecode.c
--- ghostscript-10.05.1/psi/zfdecode.c	2025-04-29 13:01:29.000000000 +0200
+++ ghostscript-10.05.1.new/psi/zfdecode.c	2025-05-06 22:59:13.614552604 +0200
@@ -190,7 +190,7 @@
 int
 zlz_setup(os_ptr op, stream_LZW_state * plzs)
 {
-    int code;
+    int code, ech;
     const ref *dop;
 
     s_LZW_set_defaults_inline(plzs);
@@ -200,7 +200,7 @@
     } else
         dop = 0;
     if (   (code = dict_int_param(dop, "EarlyChange", 0, 1, 1,
-                                  &plzs->EarlyChange)) < 0 ||
+                                  &ech)) < 0 ||
            /*
             * The following are not PostScript standard, although
             * LanguageLevel 3 provides the first two under different
@@ -214,6 +214,7 @@
                                    &plzs->BlockData)) < 0
         )
         return code;
+    plzs->EarlyChange = ech != 0;
     return 0;
 }
 
diff '--color=auto' -Naur ghostscript-10.05.1/psi/zfunc4.c ghostscript-10.05.1.new/psi/zfunc4.c
--- ghostscript-10.05.1/psi/zfunc4.c	2025-04-29 13:01:29.000000000 +0200
+++ ghostscript-10.05.1.new/psi/zfunc4.c	2025-05-06 22:59:13.614638106 +0200
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2024 Artifex Software, Inc.
+/* Copyright (C) 2001-2025 Artifex Software, Inc.
    All Rights Reserved.
 
    This software is provided AS-IS with no warranty, either express or
@@ -468,7 +468,7 @@
     int code;
     byte *ops;
     uint size;
-    int AllowRepeat = 1; /* Default to permitting Repeat, devices which can't handle it implement the spec_op */
+    bool AllowRepeat = true; /* Default to permitting Repeat, devices which can't handle it implement the spec_op */
 
     *(gs_function_params_t *)&params = *mnDR;
     params.ops.data = 0;	/* in case of failure */
@@ -548,7 +548,7 @@
     float *ptr;
     ref alternatespace, *palternatespace = &alternatespace;
     PS_colour_space_t *space, *altspace;
-    int AllowRepeat = 1; /* Default to permitting Repeat, devices which can't handle it implement the spec_op */
+    bool AllowRepeat = true; /* Default to permitting Repeat, devices which can't handle it implement the spec_op */
 
     code = get_space_object(i_ctx_p, arr, &space);
     if (code < 0)
