[gs-commits] ghostpdl branch, master, updated. jbig2dec-0.14-1793-g1126def
[email protected] (Robin Watts) Fri, 1 Nov 2019 12:53:59 +0000 (UTC)
| Newsgroups | gmane.comp.printing.ghostscript.cvs |
|---|---|
| Message-ID | <[email protected]> |
The ghostpdl branch, master has been updated
via 1126deff06d81d4fa1975ea0ed3a3b64e9cf0661 (commit)
via bcb881e566d90ae43648085ff1edfdcddcd6eb50 (commit)
from aadb53eb834b3def3ef68d78865ff87a68901804 (commit)
----------------------------------------------------------------------
commit 1126deff06d81d4fa1975ea0ed3a3b64e9cf0661
Author: Robin Watts <[email protected]>
Date: Fri Nov 1 12:38:41 2019 +0000
Update "planm" device to clear eol padding bits.
This should avoid md5 changes in the alldevs cluster test.
diff --git a/devices/gdevplan.c b/devices/gdevplan.c
index b91f61d..84640a7 100644
--- a/devices/gdevplan.c
+++ b/devices/gdevplan.c
@@ -248,13 +248,17 @@ static void dump_row_pnmc(int w, byte **data, gp_file *dump_file)
static void dump_row_pbm(int w, byte **data, gp_file *dump_file)
{
byte *r = data[0];
+ int mask = ~(255>>(w&7));
if (dump_file == NULL)
return;
+ if (w == 0)
+ return;
w = (w+7)>>3;
- while (w--) {
+ while (--w) {
gp_fputc(*r++, dump_file);
}
+ gp_fputc(mask & *r, dump_file);
}
static void dump_row_pgm(int w, byte **data, gp_file *dump_file)
----------------------------------------------------------------------
commit bcb881e566d90ae43648085ff1edfdcddcd6eb50
Author: Robin Watts <[email protected]>
Date: Fri Nov 1 12:22:55 2019 +0000
Fix "cif" device in CLUSTER builds.
Use a hardcoded "clusterout" filename for embedding rather
than the real one in CLUSTER builds. This stops the md5sum
from changing randomly.
diff --git a/devices/gdevcif.c b/devices/gdevcif.c
index bd9649a..217e43d 100644
--- a/devices/gdevcif.c
+++ b/devices/gdevcif.c
@@ -46,7 +46,7 @@ cif_print_page(gx_device_printer *pdev, gp_file *prn_stream)
{ int line_size = gdev_mem_bytes_per_scan_line((gx_device *)pdev);
int lnum;
byte *in = (byte *)gs_malloc(pdev->memory, line_size, 1, "cif_print_page(in)");
- char *s;
+ char *s, *fname;
int scanline, scanbyte;
int length, start; /* length is the number of successive 1 bits, */
/* start is the set of 1 bit start position */
@@ -54,13 +54,19 @@ cif_print_page(gx_device_printer *pdev, gp_file *prn_stream)
if (in == 0)
return_error(gs_error_VMerror);
- if ((s = strchr(pdev->fname, '.')) == NULL)
- length = strlen(pdev->fname) + 1;
+#ifdef CLUSTER
+ fname = "clusterout";
+#else
+ fname = pdev->fname;
+#endif
+ if ((s = strchr(fname, '.')) == NULL)
+ length = strlen(fname) + 1;
else
- length = s - pdev->fname;
+ length = s - fname;
s = (char *)gs_malloc(pdev->memory, length+1, sizeof(char), "cif_print_page(s)");
-
- strncpy(s, pdev->fname, length);
+ if (s == NULL)
+ return_error(gs_error_VMerror);
+ strncpy(s, fname, length);
*(s + length) = '\0';
gp_fprintf(prn_stream, "DS1 25 1;\n9 %s;\nLCP;\n", s);
gs_free(pdev->memory, s, length+1, 1, "cif_print_page(s)");
Summary of changes:
devices/gdevcif.c | 18 ++++++++++++------
devices/gdevplan.c | 6 +++++-
2 files changed, 17 insertions(+), 7 deletions(-)