Ticket #21500: ghostscript-10.05.1-gcc15.patch

File ghostscript-10.05.1-gcc15.patch, 26.3 KB (added by Joe Locash, 17 months ago)
  • base/gdevkrnlsclass.c

    diff -Nuarp ghostscript-10.05.1.orig/base/gdevkrnlsclass.c ghostscript-10.05.1/base/gdevkrnlsclass.c
    old new  
    1 /* Copyright (C) 2001-2023 Artifex Software, Inc.
     1/* Copyright (C) 2001-2025 Artifex Software, Inc.
    22   All Rights Reserved.
    33
    44   This software is provided AS-IS with no warranty, either express or
    … …  
    2929 * of devices which the push of the compositor claims are already installed (to prevent
    3030 * a second copy being installed by gdev_prn_open).
    3131 */
    32 int install_internal_subclass_devices(gx_device **ppdev, int *devices_loaded)
     32int install_internal_subclass_devices(gx_device **ppdev, bool *devices_loaded)
    3333{
    3434    int code = 0;
    3535    gx_device *dev = (gx_device *)*ppdev, *saved;
  • base/gdevkrnlsclass.h

    diff -Nuarp ghostscript-10.05.1.orig/base/gdevkrnlsclass.h ghostscript-10.05.1/base/gdevkrnlsclass.h
    old new  
    1 /* Copyright (C) 2001-2023 Artifex Software, Inc.
     1/* Copyright (C) 2001-2025 Artifex Software, Inc.
    22   All Rights Reserved.
    33
    44   This software is provided AS-IS with no warranty, either express or
    … … extern gx_device_flp gs_flp_device;  
    2929
    3030extern gx_device_nup gs_nup_device;
    3131
    32 int install_internal_subclass_devices(gx_device **ppdev, int *devices_loaded);
     32int install_internal_subclass_devices(gx_device **ppdev, bool *devices_loaded);
    3333
    3434#endif /* gdev_subclass_dev_INCLUDED */
  • ghostscript-10.05.1

    diff -Nuarp ghostscript-10.05.1.orig/base/gdevnup.c ghostscript-10.05.1/base/gdevnup.c
    old new  
    1 /* Copyright (C) 2001-2023 Artifex Software, Inc.
     1/* Copyright (C) 2001-2025 Artifex Software, Inc.
    22   All Rights Reserved.
    33
    44   This software is provided AS-IS with no warranty, either express or
    … … nup_dev_spec_op(gx_device *dev, int dev_  
    682682        case gxdso_get_dev_param:
    683683            {
    684684                dev_param_req_t *request = (dev_param_req_t *)data;
    685                 int code = false;
     685                bool code = false;
    686686
    687687                /* We need to disable pdfmark writing, primarily for CropBox, but also  */
    688688                /* they are probably not relevant for multiple input files to a single  */
  • ghostscript-10.05.1

    diff -Nuarp ghostscript-10.05.1.orig/base/gp.h ghostscript-10.05.1/base/gp.h
    old new  
    1 /* Copyright (C) 2001-2023 Artifex Software, Inc.
     1/* Copyright (C) 2001-2025 Artifex Software, Inc.
    22   All Rights Reserved.
    33
    44   This software is provided AS-IS with no warranty, either express or
    … … int gp_fseek_impl(FILE *strm, gs_offset_  
    646646/* Create a second open gp_file on the basis of a given one */
    647647FILE *gp_fdup_impl(FILE *f, const char *mode);
    648648
    649 int gp_fseekable_impl(FILE *f);
     649bool gp_fseekable_impl(FILE *f);
    650650
    651651/* Force given file into binary mode (no eol translations, etc) */
    652652/* if 2nd param true, text mode if 2nd param false */
  • ghostscript-10.05.1

    diff -Nuarp ghostscript-10.05.1.orig/base/gsfcmap.c ghostscript-10.05.1/base/gsfcmap.c
    old new  
    1 /* Copyright (C) 2001-2023 Artifex Software, Inc.
     1/* Copyright (C) 2001-2025 Artifex Software, Inc.
    22   All Rights Reserved.
    33
    44   This software is provided AS-IS with no warranty, either express or
    … … gs_cmap_create_char_identity(gs_cmap_t *  
    221221/*
    222222 * Check for identity CMap. Uses a fast check for special cases.
    223223 */
    224 int
     224bool
    225225gs_cmap_is_identity(const gs_cmap_t *pcmap, int font_index_only)
    226226{
    227227    return pcmap->procs->is_identity(pcmap, font_index_only);
  • ghostscript-10.05.1

    diff -Nuarp ghostscript-10.05.1.orig/base/gsovrc.c ghostscript-10.05.1/base/gsovrc.c
    old new  
    1 /* Copyright (C) 2001-2024 Artifex Software, Inc.
     1/* Copyright (C) 2001-2025 Artifex Software, Inc.
    22   All Rights Reserved.
    33
    44   This software is provided AS-IS with no warranty, either express or
    … … gs_create_overprint(  
    297297 * This is used by the gs_pdf1.4_device (and eventually the PDFWrite
    298298 * device), which implements overprint and overprint mode directly.
    299299 */
    300 int
     300bool
    301301gs_is_overprint_compositor(const gs_composite_t * pct)
    302302{
    303303    return pct->type == &gs_composite_overprint_type;
  • ghostscript-10.05.1

    diff -Nuarp ghostscript-10.05.1.orig/base/gsstate.h ghostscript-10.05.1/base/gsstate.h
    old new  
    1 /* Copyright (C) 2001-2023 Artifex Software, Inc.
     1/* Copyright (C) 2001-2025 Artifex Software, Inc.
    22   All Rights Reserved.
    33
    44   This software is provided AS-IS with no warranty, either express or
    … … int gs_do_set_overprint(gs_gstate *);  
    5454int gs_currentrenderingintent(const gs_gstate *);
    5555int gs_setrenderingintent(gs_gstate *, int);
    5656
    57 int gs_currentblackptcomp(const gs_gstate *);
    58 int gs_setblackptcomp(gs_gstate *, int);
     57bool gs_currentblackptcomp(const gs_gstate *);
     58int gs_setblackptcomp(gs_gstate *, bool);
    5959
    6060int gs_initgraphics(gs_gstate *);
    6161int gs_initgraphics_no_cspace(gs_gstate *);
  • ghostscript-10.05.1

    diff -Nuarp ghostscript-10.05.1.orig/base/gxcmap.c ghostscript-10.05.1/base/gxcmap.c
    old new gx_no_concretize_color(const gs_client_c  
    601601/* If someone has specified a table for handling named spot colors then we will
    602602   be attempting to do the special handling to go directly to the device colors
    603603   here */
    604 bool
     604int
    605605gx_remap_named_color(const gs_client_color * pcc, const gs_color_space * pcs,
    606606gx_device_color * pdc, const gs_gstate * pgs, gx_device * dev,
    607607gs_color_select_t select)
  • base/gxdownscale.c

    diff -Nuarp ghostscript-10.05.1.orig/base/gxdownscale.c ghostscript-10.05.1/base/gxdownscale.c
    old new  
    1 /* Copyright (C) 2001-2024 Artifex Software, Inc.
     1/* Copyright (C) 2001-2025 Artifex Software, Inc.
    22   All Rights Reserved.
    33
    44   This software is provided AS-IS with no warranty, either express or
    … … int gx_downscaler_read_params(gs_param_l  
    33763376                              int                   features)
    33773377{
    33783378    int code;
    3379     int downscale, mfs, ets, deskew;
     3379    int downscale, mfs, ets;
     3380    bool deskew;
    33803381    int trap_w, trap_h;
    33813382    const char *param_name;
    33823383    gs_param_int_array trap_order;
  • base/gxdownscale.h

    diff -Nuarp ghostscript-10.05.1.orig/base/gxdownscale.h ghostscript-10.05.1/base/gxdownscale.h
    old new  
    1 /* Copyright (C) 2001-2023 Artifex Software, Inc.
     1/* Copyright (C) 2001-2025 Artifex Software, Inc.
    22   All Rights Reserved.
    33
    44   This software is provided AS-IS with no warranty, either express or
    … … typedef struct gx_downscaler_params_s  
    124124    int trap_h;
    125125    int trap_order[GS_CLIENT_COLOR_MAX_COMPONENTS];
    126126    int ets;
    127     int do_skew_detection;
     127    bool do_skew_detection;
    128128} gx_downscaler_params;
    129129
    130130/* To use the downscaler:
  • ghostscript-10.05.1

    diff -Nuarp ghostscript-10.05.1.orig/base/gxfapi.h ghostscript-10.05.1/base/gxfapi.h
    old new struct gs_fapi_server_s  
    348348    gs_fapi_retcode(*get_decodingID) (gs_fapi_server *server, gs_fapi_font *ff, const char **decodingID);
    349349    gs_fapi_retcode(*get_font_bbox) (gs_fapi_server *server, gs_fapi_font *ff, int BBox[4], int unitsPerEm[2]);
    350350    gs_fapi_retcode(*get_font_proportional_feature) (gs_fapi_server *server, gs_fapi_font *ff, bool *bProportional);
    351     gs_fapi_retcode(*can_retrieve_char_by_name) (gs_fapi_server *server, gs_fapi_font *ff, gs_fapi_char_ref *c, int *result);
     351    gs_fapi_retcode(*can_retrieve_char_by_name) (gs_fapi_server *server, gs_fapi_font *ff, gs_fapi_char_ref *c, bool *result);
    352352    gs_fapi_retcode(*can_replace_metrics) (gs_fapi_server *server, gs_fapi_font *ff, gs_fapi_char_ref *c, int *result);
    353353    gs_fapi_retcode(*can_simulate_style) (gs_fapi_server *server, gs_fapi_font *ff, gs_fapi_style style, void *style_data);
    354354    gs_fapi_retcode(*get_fontmatrix) (gs_fapi_server *server, gs_matrix *m);
  • ghostscript-10.05.1

    diff -Nuarp ghostscript-10.05.1.orig/base/gximag3x.c ghostscript-10.05.1/base/gximag3x.c
    old new  
    1 /* Copyright (C) 2001-2024 Artifex Software, Inc.
     1/* Copyright (C) 2001-2025 Artifex Software, Inc.
    22   All Rights Reserved.
    33
    44   This software is provided AS-IS with no warranty, either express or
    … … check_image3x_extent(double mask_coeff,  
    391391 * pmcs->{InterleaveType,width,height,full_height,depth,data,y,skip}.
    392392 * If the mask is omitted, sets pmcs->depth = 0 and returns normally.
    393393 */
    394 static bool
     394static int
    395395check_image3x_mask(const gs_image3x_t *pim, const gs_image3x_mask_t *pimm,
    396396                   const image3x_channel_values_t *ppcv,
    397397                   image3x_channel_values_t *pmcv,
  • ghostscript-10.05.1

    diff -Nuarp ghostscript-10.05.1.orig/base/gxiscale.c ghostscript-10.05.1/base/gxiscale.c
    old new  
    1 /* Copyright (C) 2001-2024 Artifex Software, Inc.
     1/* Copyright (C) 2001-2025 Artifex Software, Inc.
    22   All Rights Reserved.
    33
    44   This software is provided AS-IS with no warranty, either express or
    … … device_allows_imagemask_interpolation(gx  
    112112    char data[] = "NoInterpolateImagemasks";
    113113    dev_param_req_t request;
    114114    gs_c_param_list list;
    115     int nointerpolate = 0;
     115    bool nointerpolate = false;
    116116    int code;
    117117
    118118    gs_c_param_list_write(&list, dev->memory);
  • ghostscript-10.05.1

    diff -Nuarp ghostscript-10.05.1.orig/base/stdpre.h ghostscript-10.05.1/base/stdpre.h
    old new  
    1 /* Copyright (C) 2001-2023 Artifex Software, Inc.
     1/* Copyright (C) 2001-2025 Artifex Software, Inc.
    22   All Rights Reserved.
    33
    44   This software is provided AS-IS with no warranty, either express or
    … … typedef signed char schar;  
    341341 * and the MetroWerks C++ compiler insists that bool be equivalent to
    342342 * unsigned char.
    343343 */
    344 #ifndef __cplusplus
     344
     345/* C23 has bool as a builtin type. */
     346#if !defined(__cplusplus) && (!defined(__STDC_VERSION__) || __STDC_VERSION__ < 202311L)
    345347#ifdef __BEOS__
    346348typedef unsigned char bool;
    347349#else
  • contrib/eplaser/gdevescv.c

    diff -Nuarp ghostscript-10.05.1.orig/contrib/eplaser/gdevescv.c ghostscript-10.05.1/contrib/eplaser/gdevescv.c
    old new esmv_initialize_device_procs(gx_device *  
    183183        0,                      /*   int           prev_paper_height; */\
    184184        0,                      /*   int           prev_num_copies; */\
    185185        -1,                     /*   int           prev_feed_mode; */\
    186         0,                      /*   int           orientation; */\
     186        false,                  /*   bool          orientation; */\
    187187        ESCPAGE_FACEUP_DEFAULT, /*   bool          faceup; */\
    188188        ESCPAGE_MEDIATYPE_DEFAULT, /*   int           MediaType; */\
    189189        0,                      /*   bool          first_page; */\
  • contrib/eplaser/gdevescv.h

    diff -Nuarp ghostscript-10.05.1.orig/contrib/eplaser/gdevescv.h ghostscript-10.05.1/contrib/eplaser/gdevescv.h
    old new typedef struct gx_device_escv_s {  
    126126  int           prev_paper_height;
    127127  int           prev_num_copies;
    128128  int           prev_feed_mode;
    129   int           orientation;
     129  bool          orientation;
    130130  bool          faceup;
    131131  int           MediaType;
    132132  bool          first_page;
  • contrib/gdevmd2k.c

    diff -Nuarp ghostscript-10.05.1.orig/contrib/gdevmd2k.c ghostscript-10.05.1/contrib/gdevmd2k.c
    old new alps_get_params(gx_device *pdev, gs_para  
    157157}
    158158
    159159static int
    160 alps_put_param_bool(gs_param_list *plist, gs_param_name pname, int *pvalue,
     160alps_put_param_bool(gs_param_list *plist, gs_param_name pname, bool *pvalue,
    161161                   int ecode)
    162162{
    163     int code, value;
     163    int code;
     164    bool value;
    164165    switch (code = param_read_bool(plist, pname, &value)) {
    165166    default:
    166167        return code;
  • contrib/lips4/gdevl4r.c

    diff -Nuarp ghostscript-10.05.1.orig/contrib/lips4/gdevl4r.c ghostscript-10.05.1/contrib/lips4/gdevl4r.c
    old new lips4_put_params(gx_device * pdev, gs_pa  
    496496    int code;
    497497    gs_param_name param_name;
    498498    gs_param_string pmedia;
    499     bool nup = lips4->nup;
     499    int nup = lips4->nup;
    500500    bool faceup = lips4->faceup;
    501501    int old_bpp = pdev->color_info.depth;
    502502    int bpp = 0;
  • contrib/lips4/gdevl4v.c

    diff -Nuarp ghostscript-10.05.1.orig/contrib/lips4/gdevl4v.c ghostscript-10.05.1/contrib/lips4/gdevl4v.c
    old new static int lips4v_setflat(gx_device_vect  
    224224static int
    225225lips4v_setlogop(gx_device_vector * vdev, gs_logical_operation_t lop,
    226226                 gs_logical_operation_t diff);
    227 static int lips4v_can_handle_hl_color(gx_device_vector * vdev, const gs_gstate * pgs,
     227static bool lips4v_can_handle_hl_color(gx_device_vector * vdev, const gs_gstate * pgs,
    228228                  const gx_drawing_color * pdc);
    229229static int
    230230
    … … lips4v_setlogop(gx_device_vector * vdev,  
    12201220}
    12211221
    12221222/*--- added for Ghostscritp 8.15 ---*/
    1223 static int
     1223static bool
    12241224lips4v_can_handle_hl_color(gx_device_vector * vdev, const gs_gstate * pgs1,
    12251225              const gx_drawing_color * pdc)
    12261226{
  • contrib/opvp/gdevopvp.c

    diff -Nuarp ghostscript-10.05.1.orig/contrib/opvp/gdevopvp.c ghostscript-10.05.1/contrib/opvp/gdevopvp.c
    old new static int opvp_setdash(gx_device_vecto  
    265265static  int opvp_setflat(gx_device_vector *, double);
    266266static  int opvp_setlogop(gx_device_vector *, gs_logical_operation_t,
    267267                          gs_logical_operation_t);
    268 static  int opvp_can_handle_hl_color(gx_device_vector *, const gs_gstate *, const gx_drawing_color *);
     268static  bool opvp_can_handle_hl_color(gx_device_vector *, const gs_gstate *, const gx_drawing_color *);
    269269static  int opvp_setfillcolor(gx_device_vector *, const gs_gstate *, const gx_drawing_color *);
    270270static  int opvp_setstrokecolor(gx_device_vector *, const gs_gstate *,const gx_drawing_color *);
    271271static  int opvp_vector_dopath(gx_device_vector *, const gx_path *,
    … … opvp_setlogop(  
    49474947}
    49484948
    49494949/*--- added for Ghostscript 8.15 ---*/
    4950 static int
     4950static bool
    49514951opvp_can_handle_hl_color(gx_device_vector * vdev,
    49524952              const gs_gstate * pgs1, const gx_drawing_color * pdc)
    49534953{
  • ghostscript-10.05.1

    diff -Nuarp ghostscript-10.05.1.orig/devices/gdevcdj.c ghostscript-10.05.1/devices/gdevcdj.c
    old new  
    1 /* Copyright (C) 2001-2023 Artifex Software, Inc.
     1/* Copyright (C) 2001-2025 Artifex Software, Inc.
    22   All Rights Reserved.
    33
    44   This software is provided AS-IS with no warranty, either express or
    … … typedef struct gx_device_bjc800_s gx_dev  
    337337    bool mediaWeight_isSet;     /* Say if weight is an integer or null */ \
    338338    int mediaWeight;            /* Weigth of the media */ \
    339339    int printQuality;           /* Cf. strings below */ \
    340     bool ditheringType;         /* Do dithering */ \
     340    int ditheringType;          /* Do dithering */ \
    341341    int colorComponents;        /* The number of *desired* color comps */ \
    342342    int printColors             /* 0: Transparent, \
    343343                                   1: C, 2: M, 4: Y, 7: K (Color decomp). \
  • devices/gdevpdfimg.h

    diff -Nuarp ghostscript-10.05.1.orig/devices/gdevpdfimg.h ghostscript-10.05.1/devices/gdevpdfimg.h
    old new  
    1 /* Copyright (C) 2001-2023 Artifex Software, Inc.
     1/* Copyright (C) 2001-2025 Artifex Software, Inc.
    22   All Rights Reserved.
    33
    44   This software is provided AS-IS with no warranty, either express or
    … … typedef struct gx_device_pdf_image_s {  
    7474    PCLm_temp_file_t temp_stream;
    7575    int NextObject;
    7676
    77     int Tumble;
    78     int Tumble2;
     77    bool Tumble;
     78    bool Tumble2;
    7979
    8080    /* OCR data */
    8181    struct {
  • devices/vector/gdevpdfd.c

    diff -Nuarp ghostscript-10.05.1.orig/devices/vector/gdevpdfd.c ghostscript-10.05.1/devices/vector/gdevpdfd.c
    old new  
    1 /* Copyright (C) 2001-2024 Artifex Software, Inc.
     1/* Copyright (C) 2001-2025 Artifex Software, Inc.
    22   All Rights Reserved.
    33
    44   This software is provided AS-IS with no warranty, either express or
    … … pdf_setlinewidth(gx_device_vector * vdev  
    108108    return psdf_setlinewidth(vdev, fabs(width));
    109109}
    110110
    111 static int
     111static bool
    112112pdf_can_handle_hl_color(gx_device_vector * vdev, const gs_gstate * pgs,
    113113                 const gx_drawing_color * pdc)
    114114{
  • devices/vector/gdevpdtt.c

    diff -Nuarp ghostscript-10.05.1.orig/devices/vector/gdevpdtt.c ghostscript-10.05.1/devices/vector/gdevpdtt.c
    old new  
    1 /* Copyright (C) 2001-2024 Artifex Software, Inc.
     1/* Copyright (C) 2001-2025 Artifex Software, Inc.
    22   All Rights Reserved.
    33
    44   This software is provided AS-IS with no warranty, either express or
    … … static void pdf_type3_get_initial_matrix  
    32723272    gs_matrix_scale(pmat, pdev->HWResolution[0] / 72.0, pdev->HWResolution[0] / 72.0, pmat);
    32733273}
    32743274
    3275 static int pdf_query_purge_cached_char(const gs_memory_t *mem, cached_char *cc, void *data)
     3275static bool pdf_query_purge_cached_char(const gs_memory_t *mem, cached_char *cc, void *data)
    32763276{
    32773277    cached_char *to_purge = (cached_char *)data;
    32783278
    3279 
    3280     if (cc->code == to_purge->code && cc_pair(cc) == cc_pair(to_purge) &&
    3281         cc->subpix_origin.x == to_purge->subpix_origin.x &&
    3282         cc->subpix_origin.y == to_purge->subpix_origin.y &&
    3283         cc->wmode == to_purge->wmode && cc_depth(cc) == cc_depth(to_purge)
    3284         )
    3285         return 1;
    3286     return 0;
     3279    return cc->code == to_purge->code && cc_pair(cc) == cc_pair(to_purge) &&
     3280           cc->subpix_origin.x == to_purge->subpix_origin.x &&
     3281           cc->subpix_origin.y == to_purge->subpix_origin.y &&
     3282           cc->wmode == to_purge->wmode && cc_depth(cc) == cc_depth(to_purge);
    32873283}
    32883284
    32893285static int ProcessTextForOCR(gs_text_enum_t *pte)
  • devices/vector/gdevpx.c

    diff -Nuarp ghostscript-10.05.1.orig/devices/vector/gdevpx.c ghostscript-10.05.1/devices/vector/gdevpx.c
    old new  
    1 /* Copyright (C) 2001-2023 Artifex Software, Inc.
     1/* Copyright (C) 2001-2025 Artifex Software, Inc.
    22   All Rights Reserved.
    33
    44   This software is provided AS-IS with no warranty, either express or
    … … pclxl_setlogop(gx_device_vector * vdev,  
    13931393    return 0;
    13941394}
    13951395
    1396 static int
     1396static bool
    13971397pclxl_can_handle_hl_color(gx_device_vector * vdev, const gs_gstate * pgs,
    13981398                          const gx_drawing_color * pdc)
    13991399{
  • devices/vector/gdevxps.c

    diff -Nuarp ghostscript-10.05.1.orig/devices/vector/gdevxps.c ghostscript-10.05.1/devices/vector/gdevxps.c
    old new  
    1 /* Copyright (C) 2001-2024 Artifex Software, Inc.
     1/* Copyright (C) 2001-2025 Artifex Software, Inc.
    22   All Rights Reserved.
    33
    44   This software is provided AS-IS with no warranty, either express or
    … … static int  
    271271xps_setlogop(gx_device_vector *vdev, gs_logical_operation_t lop,
    272272             gs_logical_operation_t diff);
    273273
    274 static int
     274static bool
    275275xps_can_handle_hl_color(gx_device_vector *vdev, const gs_gstate *pgs,
    276276                        const gx_drawing_color * pdc);
    277277static int
    … … xps_setlogop(gx_device_vector *vdev, gs_  
    14801480
    14811481        /* Other state */
    14821482
    1483 static int
     1483static bool
    14841484xps_can_handle_hl_color(gx_device_vector *vdev, const gs_gstate *pgs,
    14851485                          const gx_drawing_color *pdc)
    14861486{
    14871487    if_debug0m('_', vdev->memory, "xps_can_handle_hl_color\n");
    1488     return 0;
     1488    return false;
    14891489}
    14901490
    14911491/* Paths */
  • ghostscript-10.05.1

    diff -Nuarp ghostscript-10.05.1.orig/pdf/pdf_device.c ghostscript-10.05.1/pdf/pdf_device.c
    old new  
    1 /* Copyright (C) 2019-2024 Artifex Software, Inc.
     1/* Copyright (C) 2019-2025 Artifex Software, Inc.
    22   All Rights Reserved.
    33
    44   This software is provided AS-IS with no warranty, either express or
    … … bool pdfi_device_check_param_bool(gx_dev  
    4545{
    4646    int code;
    4747    gs_c_param_list list;
    48     int value;
     48    bool value;
    4949
    5050    code = pdfi_device_check_param(dev, param, &list);
    5151    if (code < 0)
    … … bool pdfi_device_check_param_bool(gx_dev  
    5757    if (code < 0)
    5858        value = false;
    5959    gs_c_param_list_release(&list);
    60     return (bool)value;
     60    return value;
    6161}
    6262
    6363/* Set value of string device parameter */
  • ghostscript-10.05.1

    diff -Nuarp ghostscript-10.05.1.orig/psi/zcontrol.c ghostscript-10.05.1/psi/zcontrol.c
    old new  
    1 /* Copyright (C) 2001-2023 Artifex Software, Inc.
     1/* Copyright (C) 2001-2025 Artifex Software, Inc.
    22   All Rights Reserved.
    33
    44   This software is provided AS-IS with no warranty, either express or
    … … const op_def zcontrol3_op_defs[] = {  
    990990 * interpreter to catch them, so that we can signal the error with the
    991991 * object still on the operand stack.
    992992 */
    993 static bool
     993static int
    994994check_for_exec(const_os_ptr op)
    995995{
    996996    if (!r_has_attr(op, a_execute) && /* only true if noaccess */
  • ghostscript-10.05.1

    diff -Nuarp ghostscript-10.05.1.orig/psi/zfaes.c ghostscript-10.05.1/psi/zfaes.c
    old new z_aes_d(i_ctx_t * i_ctx_p)  
    3838    os_ptr op = osp;            /* i_ctx_p->op_stack.stack.p defined in osstack.h */
    3939    ref *sop = NULL;
    4040    stream_aes_state state;
    41     int use_padding;
     41    bool use_padding;
    4242
    4343    check_op(2);
    4444    /* extract the key from the parameter dictionary */
  • ghostscript-10.05.1

    diff -Nuarp ghostscript-10.05.1.orig/psi/zfdecode.c ghostscript-10.05.1/psi/zfdecode.c
    old new filter_read_predictor(i_ctx_t *i_ctx_p,  
    190190int
    191191zlz_setup(os_ptr op, stream_LZW_state * plzs)
    192192{
    193     int code;
     193    int code, ech;
    194194    const ref *dop;
    195195
    196196    s_LZW_set_defaults_inline(plzs);
    … … zlz_setup(os_ptr op, stream_LZW_state *  
    200200    } else
    201201        dop = 0;
    202202    if (   (code = dict_int_param(dop, "EarlyChange", 0, 1, 1,
    203                                   &plzs->EarlyChange)) < 0 ||
     203                                  &ech)) < 0 ||
    204204           /*
    205205            * The following are not PostScript standard, although
    206206            * LanguageLevel 3 provides the first two under different
    … … zlz_setup(os_ptr op, stream_LZW_state *  
    214214                                   &plzs->BlockData)) < 0
    215215        )
    216216        return code;
     217    plzs->EarlyChange = ech != 0;
    217218    return 0;
    218219}
    219220
  • ghostscript-10.05.1

    diff -Nuarp ghostscript-10.05.1.orig/psi/zfunc4.c ghostscript-10.05.1/psi/zfunc4.c
    old new  
    1 /* Copyright (C) 2001-2024 Artifex Software, Inc.
     1/* Copyright (C) 2001-2025 Artifex Software, Inc.
    22   All Rights Reserved.
    33
    44   This software is provided AS-IS with no warranty, either express or
    … … gs_build_function_4(i_ctx_t *i_ctx_p, co  
    468468    int code;
    469469    byte *ops;
    470470    uint size;
    471     int AllowRepeat = 1; /* Default to permitting Repeat, devices which can't handle it implement the spec_op */
     471    bool AllowRepeat = true; /* Default to permitting Repeat, devices which can't handle it implement the spec_op */
    472472
    473473    *(gs_function_params_t *)&params = *mnDR;
    474474    params.ops.data = 0;        /* in case of failure */
    … … int make_type4_function(i_ctx_t * i_ctx_  
    548548    float *ptr;
    549549    ref alternatespace, *palternatespace = &alternatespace;
    550550    PS_colour_space_t *space, *altspace;
    551     int AllowRepeat = 1; /* Default to permitting Repeat, devices which can't handle it implement the spec_op */
     551    bool AllowRepeat = true; /* Default to permitting Repeat, devices which can't handle it implement the spec_op */
    552552
    553553    code = get_space_object(i_ctx_p, arr, &space);
    554554    if (code < 0)