File: 0003_c23.patch

package info (click to toggle)
ghostscript 10.05.1~dfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 95,420 kB
  • sloc: ansic: 908,903; python: 7,676; cpp: 6,534; cs: 6,457; sh: 6,168; java: 4,028; perl: 2,373; tcl: 1,639; makefile: 529; awk: 66; yacc: 18
file content (693 lines) | stat: -rw-r--r-- 26,576 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
author	Alex Cherepanov <alex@coscript.biz>	2025-04-03 17:19:41 +0100
committer	Chris Liddell <chris.liddell@artifex.com>	2025-04-08 12:22:57 +0100
commit	ae940946473ceb8c5353bc6e7f04673c6e60502d (patch)
tree	dc7c174f212eaa3bb053dd6091d0317e0ba143f2
parent	d72cd285dcbc2ede8077c295dc1fed2194571b33 (diff)

Bug 708160: Fix compatibility with C23 compilers

https://cgit.ghostscript.com/cgi-bin/cgit.cgi/ghostpdl.git/commit/?id=ae940946473ceb8c5353bc6e7f04673c6e60502d


diff --git a/base/gdevkrnlsclass.c b/base/gdevkrnlsclass.c
index b93d6739..7eb375a3 100644
--- a/base/gdevkrnlsclass.c
+++ b/base/gdevkrnlsclass.c
@@ -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 --git a/base/gdevkrnlsclass.h b/base/gdevkrnlsclass.h
index 649532fa..3143d29d 100644
--- a/base/gdevkrnlsclass.h
+++ b/base/gdevkrnlsclass.h
@@ -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_flp  gs_flp_device;
 
 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 --git a/base/gdevnup.c b/base/gdevnup.c
index 89988068..e4833b8e 100644
--- a/base/gdevnup.c
+++ b/base/gdevnup.c
@@ -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 @@ nup_dev_spec_op(gx_device *dev, int dev_spec_op, void *data, int size)
         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 --git a/base/gp.h b/base/gp.h
index ad5bb61c..cf2c9cf3 100644
--- a/base/gp.h
+++ b/base/gp.h
@@ -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 @@ int gp_fseek_impl(FILE *strm, gs_offset_t offset, int origin);
 /* 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 --git a/base/gsfcmap.c b/base/gsfcmap.c
index dd241d76..a5c40ba2 100644
--- a/base/gsfcmap.c
+++ b/base/gsfcmap.c
@@ -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 @@ gs_cmap_create_char_identity(gs_cmap_t **ppcmap, int num_bytes, int wmode,
 /*
  * 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 --git a/base/gsovrc.c b/base/gsovrc.c
index 35f3064b..10bd7508 100644
--- a/base/gsovrc.c
+++ b/base/gsovrc.c
@@ -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 @@ gs_create_overprint(
  * 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 --git a/base/gsstate.h b/base/gsstate.h
index 263b1bd7..a5313398 100644
--- a/base/gsstate.h
+++ b/base/gsstate.h
@@ -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_do_set_overprint(gs_gstate *);
 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 --git a/base/gxcmap.c b/base/gxcmap.c
index 32b4f20e..7108dc2d 100644
--- a/base/gxcmap.c
+++ b/base/gxcmap.c
@@ -601,7 +601,7 @@ gx_no_concretize_color(const gs_client_color * pcc, const gs_color_space * pcs,
 /* 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 --git a/base/gxdownscale.c b/base/gxdownscale.c
index 09ab7a68..e34ce5d4 100644
--- a/base/gxdownscale.c
+++ b/base/gxdownscale.c
@@ -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 gx_downscaler_read_params(gs_param_list        *plist,
                               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 --git a/base/gxdownscale.h b/base/gxdownscale.h
index 752c499d..95f3e4e2 100644
--- a/base/gxdownscale.h
+++ b/base/gxdownscale.h
@@ -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 @@ typedef struct gx_downscaler_params_s
     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 --git a/base/gxfapi.h b/base/gxfapi.h
index 184fa9a3..e94d496e 100644
--- a/base/gxfapi.h
+++ b/base/gxfapi.h
@@ -348,7 +348,7 @@ struct gs_fapi_server_s
     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 --git a/base/gximag3x.c b/base/gximag3x.c
index b6a9c12d..42085c24 100644
--- a/base/gximag3x.c
+++ b/base/gximag3x.c
@@ -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 @@ check_image3x_extent(double mask_coeff, double data_coeff)
  * 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 --git a/base/gxiscale.c b/base/gxiscale.c
index 84f92610..25e479ae 100644
--- a/base/gxiscale.c
+++ b/base/gxiscale.c
@@ -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 @@ device_allows_imagemask_interpolation(gx_device *dev)
     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 --git a/base/stdpre.h b/base/stdpre.h
index dda30b6a..2f9c84e0 100644
--- a/base/stdpre.h
+++ b/base/stdpre.h
@@ -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 @@ typedef signed char schar;
  * 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 --git a/contrib/eplaser/gdevescv.c b/contrib/eplaser/gdevescv.c
index d69f6419..fbf1bce4 100644
--- a/contrib/eplaser/gdevescv.c
+++ b/contrib/eplaser/gdevescv.c
@@ -183,7 +183,7 @@ esmv_initialize_device_procs(gx_device *dev)
         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 --git a/contrib/eplaser/gdevescv.h b/contrib/eplaser/gdevescv.h
index 922107b3..5fca5762 100644
--- a/contrib/eplaser/gdevescv.h
+++ b/contrib/eplaser/gdevescv.h
@@ -126,7 +126,7 @@ typedef struct gx_device_escv_s {
   int           prev_paper_height;
   int           prev_num_copies;
   int           prev_feed_mode;
-  int           orientation;
+  bool          orientation;
   bool          faceup;
   int           MediaType;
   bool          first_page;
diff --git a/contrib/gdevmd2k.c b/contrib/gdevmd2k.c
index 826846f9..74f0cff6 100644
--- a/contrib/gdevmd2k.c
+++ b/contrib/gdevmd2k.c
@@ -157,10 +157,11 @@ alps_get_params(gx_device *pdev, gs_param_list *plist)
 }
 
 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 --git a/contrib/lips4/gdevl4r.c b/contrib/lips4/gdevl4r.c
index 8c909452..d39b17de 100644
--- a/contrib/lips4/gdevl4r.c
+++ b/contrib/lips4/gdevl4r.c
@@ -496,7 +496,7 @@ lips4_put_params(gx_device * pdev, gs_param_list * plist)
     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 --git a/contrib/lips4/gdevl4v.c b/contrib/lips4/gdevl4v.c
index bd991794..d3188818 100644
--- a/contrib/lips4/gdevl4v.c
+++ b/contrib/lips4/gdevl4v.c
@@ -224,7 +224,7 @@ static int lips4v_setflat(gx_device_vector * vdev, double flatness);
 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 @@ lips4v_setlogop(gx_device_vector * vdev, gs_logical_operation_t lop,
 }
 
 /*--- 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 --git a/contrib/opvp/gdevopvp.c b/contrib/opvp/gdevopvp.c
index dc45b221..6f947f84 100644
--- a/contrib/opvp/gdevopvp.c
+++ b/contrib/opvp/gdevopvp.c
@@ -265,7 +265,7 @@ static  int opvp_setdash(gx_device_vector *, const float *, uint, double);
 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 @@ opvp_setlogop(
 }
 
 /*--- 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 --git a/devices/gdevcdj.c b/devices/gdevcdj.c
index 8515ddeb..75d9c919 100644
--- a/devices/gdevcdj.c
+++ b/devices/gdevcdj.c
@@ -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 @@ typedef struct gx_device_bjc800_s gx_device_bjc;
     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 --git a/devices/gdevpdfimg.h b/devices/gdevpdfimg.h
index 4df399c0..4f624891 100644
--- a/devices/gdevpdfimg.h
+++ b/devices/gdevpdfimg.h
@@ -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 @@ typedef struct gx_device_pdf_image_s {
     PCLm_temp_file_t temp_stream;
     int NextObject;
 
-    int Tumble;
-    int Tumble2;
+    bool Tumble;
+    bool Tumble2;
 
     /* OCR data */
     struct {
diff --git a/devices/vector/gdevpdfd.c b/devices/vector/gdevpdfd.c
index a346ea4c..2e970ecc 100644
--- a/devices/vector/gdevpdfd.c
+++ b/devices/vector/gdevpdfd.c
@@ -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 @@ pdf_setlinewidth(gx_device_vector * vdev, double width)
     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 --git a/devices/vector/gdevpdtt.c b/devices/vector/gdevpdtt.c
index f25dcba8..3e45ff9f 100644
--- a/devices/vector/gdevpdtt.c
+++ b/devices/vector/gdevpdtt.c
@@ -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 @@ static void pdf_type3_get_initial_matrix(gx_device * dev, gs_matrix * pmat)
     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 --git a/devices/vector/gdevpx.c b/devices/vector/gdevpx.c
index 9a9edfb1..7f2c4b74 100644
--- a/devices/vector/gdevpx.c
+++ b/devices/vector/gdevpx.c
@@ -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 @@ pclxl_setlogop(gx_device_vector * vdev, gs_logical_operation_t lop,
     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 --git a/devices/vector/gdevxps.c b/devices/vector/gdevxps.c
index 5ae9a688..df26c11c 100644
--- a/devices/vector/gdevxps.c
+++ b/devices/vector/gdevxps.c
@@ -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 @@ static int
 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 @@ xps_setlogop(gx_device_vector *vdev, gs_logical_operation_t lop,
 
         /* 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 --git a/pcl/pcl/pcpage.h b/pcl/pcl/pcpage.h
index 1972342f..f08a539f 100644
--- a/pcl/pcl/pcpage.h
+++ b/pcl/pcl/pcpage.h
@@ -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
@@ -44,9 +44,9 @@ int new_logical_page(pcl_state_t * pcs,
 
 int pcl_getdevice_initial_matrix(pcl_state_t * pcs, gs_matrix * mat);
 
-bool pcl_page_marked(pcl_state_t * pcs);
+int pcl_page_marked(pcl_state_t * pcs);
 
-bool pcl_cursor_moved(pcl_state_t * pcs);
+int pcl_cursor_moved(pcl_state_t * pcs);
 
 int pcl_mark_page_for_path(pcl_state_t * pcs);
 
diff --git a/pcl/pl/plmain.h b/pcl/pl/plmain.h
index 78f5dcd3..3f3e51c9 100644
--- a/pcl/pl/plmain.h
+++ b/pcl/pl/plmain.h
@@ -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
@@ -107,7 +107,7 @@ bool pl_main_get_res_set_on_command_line(const gs_memory_t *mem);
 bool pl_main_get_high_level_device(const gs_memory_t *mem);
 bool pl_main_get_rasterop_support(const gs_memory_t *mem);
 void pl_main_get_forced_geometry(const gs_memory_t *mem, const float **resolutions, const long **dimensions);
-int pl_main_get_scanconverter(const gs_memory_t *mem);
+bool pl_main_get_scanconverter(const gs_memory_t *mem);
 pl_main_instance_t *pl_main_get_instance(const gs_memory_t *mem);
 
 typedef int pl_main_get_codepoint_t(stream *, const char **);
diff --git a/pdf/pdf_device.c b/pdf/pdf_device.c
index 44ecd36c..bd524784 100644
--- a/pdf/pdf_device.c
+++ b/pdf/pdf_device.c
@@ -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 @@ bool pdfi_device_check_param_bool(gx_device *dev, const char *param)
 {
     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 @@ bool pdfi_device_check_param_bool(gx_device *dev, const char *param)
     if (code < 0)
         value = false;
     gs_c_param_list_release(&list);
-    return (bool)value;
+    return value;
 }
 
 /* Set value of string device parameter */
diff --git a/psi/zcontrol.c b/psi/zcontrol.c
index a406845e..463ed763 100644
--- a/psi/zcontrol.c
+++ b/psi/zcontrol.c
@@ -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 @@ const op_def zcontrol3_op_defs[] = {
  * 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 --git a/psi/zfdecode.c b/psi/zfdecode.c
index 88aafcc5..acd2fb45 100644
--- a/psi/zfdecode.c
+++ b/psi/zfdecode.c
@@ -190,7 +190,7 @@ filter_read_predictor(i_ctx_t *i_ctx_p, int npop,
 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 @@ zlz_setup(os_ptr op, stream_LZW_state * plzs)
     } 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 @@ zlz_setup(os_ptr op, stream_LZW_state * plzs)
                                    &plzs->BlockData)) < 0
         )
         return code;
+    plzs->EarlyChange = ech != 0;
     return 0;
 }
 
diff --git a/psi/zfunc4.c b/psi/zfunc4.c
index 3a8013bd..a941f3a0 100644
--- a/psi/zfunc4.c
+++ b/psi/zfunc4.c
@@ -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 @@ gs_build_function_4(i_ctx_t *i_ctx_p, const ref *op, const gs_function_params_t
     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 @@ int make_type4_function(i_ctx_t * i_ctx_p, ref *arr, ref *pproc, gs_function_t *
     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)
diff --git a/xps/xpstop.c b/xps/xpstop.c
index ad979185..f757abc8 100644
--- a/xps/xpstop.c
+++ b/xps/xpstop.c
@@ -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
@@ -188,7 +188,7 @@ xps_impl_init_job(pl_interp_implementation_t *impl,
     gs_c_param_list list;
     int code;
     bool disable_page_handler = false;
-    int true_val = 1;
+    bool true_val = true;
     gs_memory_t* mem = ctx->memory;
 
     ctx->font_table = xps_hash_new(ctx);
@@ -211,8 +211,10 @@ xps_impl_init_job(pl_interp_implementation_t *impl,
     gs_c_param_list_write(&list, pdevice->memory);
     code = gs_getdeviceparams(pdevice, (gs_param_list *)&list);
     if (code >= 0) {
+        bool trm = false;
         gs_c_param_list_read(&list);
-        code = param_read_bool((gs_param_list *)&list, "PreserveTrMode", &ctx->preserve_tr_mode);
+        code = param_read_bool((gs_param_list *)&list, "PreserveTrMode", &trm);
+        ctx->preserve_tr_mode = (int)trm;
     }
     gs_c_param_list_release(&list);
     if (code < 0)