summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2021-03-30 10:59:39 +0200
committerThomas Deutschmann <whissi@gentoo.org>2021-04-01 00:04:14 +0200
commit5ff1d6955496b3cf9a35042c9ac35db43bc336b1 (patch)
tree6d470f7eb448f59f53e8df1010aec9dad8ce1f72 /contrib
parentImport Ghostscript 9.53.1 (diff)
downloadghostscript-gpl-patches-5ff1d6955496b3cf9a35042c9ac35db43bc336b1.tar.gz
ghostscript-gpl-patches-5ff1d6955496b3cf9a35042c9ac35db43bc336b1.tar.bz2
ghostscript-gpl-patches-5ff1d6955496b3cf9a35042c9ac35db43bc336b1.zip
Import Ghostscript 9.54ghostscript-9.54
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'contrib')
-rw-r--r--contrib/contrib.mak9
-rw-r--r--contrib/gdevadmp.c2
-rw-r--r--contrib/gdevdj9.c2
-rw-r--r--contrib/gdevlx32.c79
-rw-r--r--contrib/lips4/gdevl4r.c2
-rw-r--r--contrib/pcl3/eprn/gdeveprn.c1
6 files changed, 53 insertions, 42 deletions
diff --git a/contrib/contrib.mak b/contrib/contrib.mak
index 2edee7af..d7965dc9 100644
--- a/contrib/contrib.mak
+++ b/contrib/contrib.mak
@@ -23,7 +23,6 @@ CONTRIB_MAK=$(CONTRIBDIR)$(D)contrib.mak $(TOP_MAKEFILES)
CONTRIBSRC=$(CONTRIBDIR)$(D)
# Almost all device drivers depend on the following:
-CONTDEVH=$(gserrors_h) $(gx_h) $(gxdevice_h)
CONTDEV=$(AK) $(ECHOGS_XE) $(GDEVH)
###### --------------------------- Catalog -------------------------- ######
@@ -169,7 +168,7 @@ $(DD)iwlq.dev : $(appledmp_) $(DD)page.dev $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS)
### ----------------- The BJC-210/240/250/250ex/265/1000 ---------------- ###
-###
+###
### For questions about the driver, mailto://szaszg@hu.inter.net
### http://bjc250gs.sourceforge.net
###
@@ -264,7 +263,7 @@ $(DD)cdj970.dev : $(cdeskjet9_) $(DD)page.dev \
$(DEVOBJ)gdevdj9.$(OBJ) : $(CONTRIBSRC)gdevdj9.c $(PDEVH) $(math__h) $(string__h)\
$(gsparam_h) $(gxlum_h) $(gdevpcl_h) $(CONTRIB_MAK) $(MAKEDIRS)
$(DEVCC) $(DEVO_)gdevdj9.$(OBJ) $(C_) $(CONTRIBSRC)gdevdj9.c
-
+
### -------------- cdnj500 - HP DesignJet 500 ------------- ###
@@ -694,7 +693,7 @@ $(DD)md5k.dev : $(md2k_) $(DD)page.dev \
$(DEVOBJ)gdevmd2k.$(OBJ) : $(CONTRIBSRC)gdevmd2k.c $(PDEVH) $(gsparam_h) \
$(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS)
$(DEVCC) $(DEVO_)gdevmd2k.$(OBJ) $(C_) $(CONTRIBSRC)gdevmd2k.c
-
+
### ----------------- The Okidata OkiPage 4w+ device ------------------- ###
@@ -1080,7 +1079,7 @@ $(DEVOBJ)gdev10v.$(OBJ) : $(JAPSRC)gdev10v.c $(PDEVH) \
##
-## EPSON MachJet driver
+## EPSON MachJet driver
##
mj700v2c_=$(DEVOBJ)gdevmjc.$(OBJ) $(HPPCL)
diff --git a/contrib/gdevadmp.c b/contrib/gdevadmp.c
index 72fdcab6..6648dffe 100644
--- a/contrib/gdevadmp.c
+++ b/contrib/gdevadmp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2020 Artifex Software, Inc.
+/* Copyright (C) 2001-2021 Artifex Software, Inc.
All Rights Reserved.
This software is provided AS-IS with no warranty, either express or
diff --git a/contrib/gdevdj9.c b/contrib/gdevdj9.c
index 1800b3cb..efbeaef5 100644
--- a/contrib/gdevdj9.c
+++ b/contrib/gdevdj9.c
@@ -634,7 +634,7 @@ static int
cdj970_get_params(gx_device * pdev, gs_param_list * plist)
{
int code;
-
+
(void) (
(code = gdev_prn_get_params(pdev, plist)) < 0 ||
(code = param_write_int(plist, "Quality", &cdj970->quality)) < 0 ||
diff --git a/contrib/gdevlx32.c b/contrib/gdevlx32.c
index b06c7ec1..7cbd2b97 100644
--- a/contrib/gdevlx32.c
+++ b/contrib/gdevlx32.c
@@ -903,9 +903,6 @@ lxm3200_put_params(gx_device *pdev, gs_param_list *plist)
code = param_read_int(plist, "z31m", &z31m); /* What additional margin for the Z31 */
if(code < 0)return(code);
- code = gdev_prn_put_params(pdev, plist);
- if(code < 0)return code;
-
((lxm_device *)pdev)->algnA = algnA;
((lxm_device *)pdev)->algnB = algnB;
((lxm_device *)pdev)->algnC = algnC;
@@ -916,40 +913,54 @@ lxm3200_put_params(gx_device *pdev, gs_param_list *plist)
((lxm_device *)pdev)->model = model; /* Model selection: lxm3200, Z12, Z31. */
((lxm_device *)pdev)->z31m = z31m; /* Additional margin for the Z31 */
- /* Depending on the selected rendering mode, change the
- * driver's parameters that ghostscript needs for the
- * dithering. We need to do it here because the "get_params"
- * and "put_params" are the only routines in the driver that
- * ghostscript calls before using the dithering parameters.
- */
- switch(mode)
- {
- case LXM3200_M:
- pdev->color_info.num_components = 1;
- pdev->color_info.max_gray = 1;
- pdev->color_info.max_color = 0;
- pdev->color_info.dither_grays = 2;
- pdev->color_info.dither_colors = 0;
- break;
+ /* Depending on the selected rendering mode, change the
+ * driver's parameters that ghostscript needs for the
+ * dithering. We need to do it here because the "get_params"
+ * and "put_params" are the only routines in the driver that
+ * ghostscript calls before using the dithering parameters.
+ */
+ {
+ int old_num = pdev->color_info.num_components;
+
+ switch (mode)
+ {
+ case LXM3200_M:
+ pdev->color_info.num_components = 1;
+ pdev->color_info.max_gray = 1;
+ pdev->color_info.max_color = 0;
+ pdev->color_info.dither_grays = 2;
+ pdev->color_info.dither_colors = 0;
+ break;
- case LXM3200_C:
- pdev->color_info.num_components = 3;
- pdev->color_info.max_gray = 1;
- pdev->color_info.max_color = 1;
- pdev->color_info.dither_grays = 2;
- pdev->color_info.dither_colors = 2;
- break;
+ case LXM3200_C:
+ pdev->color_info.num_components = 3;
+ pdev->color_info.max_gray = 1;
+ pdev->color_info.max_color = 1;
+ pdev->color_info.dither_grays = 2;
+ pdev->color_info.dither_colors = 2;
+ break;
- case LXM3200_P:
- pdev->color_info.num_components = 3;
- pdev->color_info.max_gray = 1;
- pdev->color_info.max_color = 2;
- pdev->color_info.dither_grays = 2;
- pdev->color_info.dither_colors = 3;
- break;
- }
+ case LXM3200_P:
+ pdev->color_info.num_components = 3;
+ pdev->color_info.max_gray = 1;
+ pdev->color_info.max_color = 2;
+ pdev->color_info.dither_grays = 2;
+ pdev->color_info.dither_colors = 3;
+ break;
+ }
+ /* The above is horrid. But, if we change the color model
+ the ICC profile needs to change too. Blow away the
+ current structure. A new one will be built when we
+ go to gdev_prn_put_params. */
+ if (old_num != pdev->color_info.num_components) {
+ rc_decrement(pdev->icc_struct, "lxm3200_put_params");
+ pdev->icc_struct = NULL;
+ }
+ }
+
+ code = gdev_prn_put_params(pdev, plist);
- return 0;
+ return code;
}
/* --------- Internal routines --------- */
diff --git a/contrib/lips4/gdevl4r.c b/contrib/lips4/gdevl4r.c
index f5015b1d..d8bcec7e 100644
--- a/contrib/lips4/gdevl4r.c
+++ b/contrib/lips4/gdevl4r.c
@@ -647,7 +647,7 @@ lips4type_print_page_copies(gx_device_printer * pdev, gp_file * prn_stream, int
{
if (!(lprn->CompBuf = gs_malloc(pdev->memory->non_gc_memory, bpl * 3 / 2 + 1, maxY, "(CompBuf)")))
return_error(gs_error_VMerror);
-
+
/* This buffer is used by lips_rle_encode(), which can require double
input size plus 2 bytes. */
if (!(lprn->CompBuf2 = gs_malloc(pdev->memory->non_gc_memory, bpl * 2 + 2, maxY, "(CompBuf2)")))
diff --git a/contrib/pcl3/eprn/gdeveprn.c b/contrib/pcl3/eprn/gdeveprn.c
index d99895fd..4c9226c4 100644
--- a/contrib/pcl3/eprn/gdeveprn.c
+++ b/contrib/pcl3/eprn/gdeveprn.c
@@ -71,6 +71,7 @@
ghostscript's header files are not self-contained. Therefore, if this file
does not compile because of undefined symbols, just add include directives
until it does. */
+#include "gserrors.h"
#include "iref.h" /* needed by icstate.h */
#include "gsmemraw.h" /* needed by icstate.h */
#include "gsmemory.h" /* needed by icstate.h */