diff options
Diffstat (limited to 'base/gdevdevn.c')
-rw-r--r-- | base/gdevdevn.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/base/gdevdevn.c b/base/gdevdevn.c index f6791276..b11594ce 100644 --- a/base/gdevdevn.c +++ b/base/gdevdevn.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2021 Artifex Software, Inc. +/* Copyright (C) 2001-2022 Artifex Software, Inc. All Rights Reserved. This software is provided AS-IS with no warranty, either express or @@ -642,7 +642,7 @@ devn_put_params(gx_device * pdev, gs_param_list * plist, pdev->color_info.num_components = (num_order) ? num_order : (page_spot_colors >= 0) - ? npcmcolors + num_spot + page_spot_colors + ? npcmcolors + page_spot_colors : pdev->color_info.max_components; if (pdev->color_info.num_components > @@ -1185,11 +1185,11 @@ gx_devn_prn_ret_devn_params_const(const gx_device * dev) * Device proc for updating the equivalent CMYK color for spot colors. */ int -gx_devn_prn_update_spot_equivalent_colors(gx_device *dev, const gs_gstate * pgs) +gx_devn_prn_update_spot_equivalent_colors(gx_device *dev, const gs_gstate * pgs, const gs_color_space *pcs) { gx_devn_prn_device *pdev = (gx_devn_prn_device *)dev; - return update_spot_equivalent_cmyk_colors(dev, pgs, &pdev->devn_params, + return update_spot_equivalent_cmyk_colors(dev, pgs, pcs, &pdev->devn_params, &pdev->equiv_cmyk_colors); } @@ -1373,7 +1373,7 @@ spotcmyk_print_page(gx_device_printer * pdev, gp_file * prn_stream) /* Open the output files for the spot colors */ for(i = 0; i < nspot; i++) { - gs_sprintf(spotname, "%ss%d", pdevn->fname, i); + gs_snprintf(spotname, gp_file_name_sizeof, "%ss%d", pdevn->fname, i); code = gs_add_control_path(pdev->memory, gs_permit_file_writing, spotname); if (code < 0) goto prn_done; @@ -1418,7 +1418,7 @@ spotcmyk_print_page(gx_device_printer * pdev, gp_file * prn_stream) goto prn_done; } for(i = 0; i < nspot; i++) { - gs_sprintf(spotname, "%ss%d", pdevn->fname, i); + gs_snprintf(spotname, gp_file_name_sizeof, "%ss%d", pdevn->fname, i); code = devn_write_pcx_file(pdev, spotname, 1, bpc, linelength[i]); if (code < 0) goto prn_done; @@ -1765,7 +1765,7 @@ devn_write_pcx_file(gx_device_printer * pdev, char * filename, int ncomp, code = gs_note_error(gs_error_invalidfileaccess); goto done; } - gs_sprintf(outname, "%s.pcx", filename); + gs_snprintf(outname, gp_file_name_sizeof, "%s.pcx", filename); code = gs_add_control_path(pdev->memory, gs_permit_file_writing, outname); if (code < 0) goto done; |