[gs-commits] ghostpdl branch, master, updated. jbig2dec-0.14-1584-ge5ce6a4

[email protected] (Robin Watts)
Newsgroups gmane.comp.printing.ghostscript.cvs
Message-ID <[email protected]>
The ghostpdl branch, master has been updated
       via  e5ce6a47af547d5d8ef3e224d648cf90c9584c2f (commit)
       via  89f63112bd8ef15ba7df1fca5b962561c1f756c8 (commit)
       via  f74553992b28ca536d62aa93cf9208bb7aa670b3 (commit)
      from  924f701fdc990ac981fb08c4f6c21c668b8b74ef (commit)

----------------------------------------------------------------------
commit e5ce6a47af547d5d8ef3e224d648cf90c9584c2f
Author: Robin Watts <[email protected]>
Date:   Fri Aug 16 15:43:32 2019 +0100

    Squash warnings in claptrap.
    
    Thanks to William Bader for highlighting these.

diff --git a/base/claptrap-planar.c b/base/claptrap-planar.c
index 84a486c..4686365 100644
--- a/base/claptrap-planar.c
+++ b/base/claptrap-planar.c
@@ -43,7 +43,7 @@ inline static void process_at_pixel(ClapTrap      * gs_restrict ct,
     /* Use local vars to avoid pointer aliasing */
     int            width        = ct->width;
     int            height       = ct->height;
-    int            num_comps    = ct->num_comps;
+    int            num_comp_lim = ct->num_comps;
     int            max_x_offset = ct->max_x_offset;
     int            max_y_offset = ct->max_y_offset;
     int            span         = ct->span;
@@ -60,7 +60,7 @@ inline static void process_at_pixel(ClapTrap      * gs_restrict ct,
     unsigned char *ppc;
 
     assert((first_comp != 1) ^ (prev_comp == -1));
-    assert((last_comp != 1) ^ (comp == ct->comp_order[num_comps-1]));
+    assert((last_comp != 1) ^ (comp == ct->comp_order[num_comp_lim]));
 
     /* Work out the search region bounds */
     sy = y - max_y_offset;
@@ -150,6 +150,7 @@ int ClapTrap_GetLinePlanar(ClapTrap       * gs_restrict ct,
     int x;
     int line_offset;
     unsigned char *process;
+    int num_comp_lim = ct->num_comps;
 
     /* Read in as many lines as we need */
     max_y = ct->y + ct->max_y_offset;
@@ -192,7 +193,7 @@ int ClapTrap_GetLinePlanar(ClapTrap       * gs_restrict ct,
         {
             process_at_pixel(ct, buffer[comp], x, 1, 1, 1, 0, -1, comp, line_offset, p++);
         }
-        for (comp_idx = 1; comp_idx < ct->num_comps-1; comp_idx++)
+        for (comp_idx = 1; comp_idx < num_comp_lim; comp_idx++)
         {
             prev_comp = comp;
             p = process;
@@ -243,7 +244,7 @@ int ClapTrap_GetLinePlanar(ClapTrap       * gs_restrict ct,
         {
             process_at_pixel(ct, buffer[comp], x, 1, 0, 1, 0, -1, comp, line_offset, p++);
         }
-        for (comp_idx = 1; comp_idx < ct->num_comps-1; comp_idx++)
+        for (comp_idx = 1; comp_idx < num_comp_lim; comp_idx++)
         {
             prev_comp = comp;
             p = process;
diff --git a/windows/GhostPDL.sln b/windows/GhostPDL.sln
index e75e70b..b1463c3 100644
--- a/windows/GhostPDL.sln
+++ b/windows/GhostPDL.sln
@@ -1,15 +1,17 @@
 
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ghostscript", "ghostscript.vcproj", "{1EDA2AC3-D74F-4F4D-B4D6-AC05CC594A2F}"
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.28307.757
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ghostscript", "ghostscript.vcxproj", "{1EDA2AC3-D74F-4F4D-B4D6-AC05CC594A2F}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ghostpcl", "ghostpcl.vcproj", "{ED35CF95-DAA1-45B3-9206-599F4170F198}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ghostpcl", "ghostpcl.vcxproj", "{ED35CF95-DAA1-45B3-9206-599F4170F198}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ghostxps", "ghostxps.vcproj", "{DE21942C-CDA2-445B-B2EC-51FF54E0F0DD}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ghostxps", "ghostxps.vcxproj", "{DE21942C-CDA2-445B-B2EC-51FF54E0F0DD}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ghostpdl", "ghostpdl.vcproj", "{C4038125-61B9-4147-9EA8-39690BA3A599}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ghostpdl", "ghostpdl.vcxproj", "{C4038125-61B9-4147-9EA8-39690BA3A599}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "All", "All.vcproj", "{98351FEF-0032-457C-B9D9-D6B68A829386}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "All", "All.vcxproj", "{98351FEF-0032-457C-B9D9-D6B68A829386}"
 EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -135,4 +137,7 @@ Global
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
 	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+		SolutionGuid = {C798B83F-2CED-4C94-9DAD-6C2158D38B30}
+	EndGlobalSection
 EndGlobal

----------------------------------------------------------------------
commit 89f63112bd8ef15ba7df1fca5b962561c1f756c8
Author: Robin Watts <[email protected]>
Date:   Fri Aug 16 15:28:49 2019 +0100

    Squash warning in gdevpsd.c
    
    Thanks to William Bader for spotting this.

diff --git a/devices/gdevpsd.c b/devices/gdevpsd.c
index 9212ff9..b1e014b 100644
--- a/devices/gdevpsd.c
+++ b/devices/gdevpsd.c
@@ -1300,12 +1300,13 @@ psd_write_image_data(psd_write_ctx *xc, gx_device_printer *pdev)
                 goto cleanup;
             }
         }
-        if (j < xc->height-1)
+        if (j < xc->height-1) {
             code = gp_fseek(xc->f, -((gs_offset_t)num_comp * xc->height - 1) * octets_per_line, SEEK_CUR);
             if (code < 0) {
                 code = gs_note_error(gs_error_ioerror);
                 goto cleanup;
             }
+	}
     }
 
 cleanup:

----------------------------------------------------------------------
commit f74553992b28ca536d62aa93cf9208bb7aa670b3
Author: Robin Watts <[email protected]>
Date:   Fri Aug 16 13:08:14 2019 +0100

    Squash some compiler warnings.

diff --git a/base/gslibctx.c b/base/gslibctx.c
index 5cf141c..64258e1 100644
--- a/base/gslibctx.c
+++ b/base/gslibctx.c
@@ -900,7 +900,7 @@ gs_lib_ctx_stash_sanitized_arg(gs_lib_ctx_t *ctx, const char *arg)
             if (arg[2] == 0)
                 break;
             p = arg+2;
-            while (p == 32)
+            while (*p == 32)
                 p++;
             elide = 1;
             break;
@@ -1044,7 +1044,7 @@ gs_lib_ctx_stash_exe(gs_lib_ctx_t *ctx, const char *arg)
     return 0;
 }
 
-int gs_lib_ctx_get_args(gs_lib_ctx_t *ctx, const char ***argv)
+int gs_lib_ctx_get_args(gs_lib_ctx_t *ctx, const char * const **argv)
 {
     gs_lib_ctx_core_t *core;
 
diff --git a/base/gslibctx.h b/base/gslibctx.h
index f35f85e..1425014 100644
--- a/base/gslibctx.h
+++ b/base/gslibctx.h
@@ -272,6 +272,6 @@ gs_lib_ctx_stash_sanitized_arg(gs_lib_ctx_t *ctx, const char *argv);
 int
 gs_lib_ctx_stash_exe(gs_lib_ctx_t *ctx, const char *argv);
 
-int gs_lib_ctx_get_args(gs_lib_ctx_t *ctx, const char ***argv);
+int gs_lib_ctx_get_args(gs_lib_ctx_t *ctx, const char * const **argv);
 
 #endif /* GSLIBCTX_H */
diff --git a/devices/gdevpdfimg.c b/devices/gdevpdfimg.c
index 1007853..31b42fb 100644
--- a/devices/gdevpdfimg.c
+++ b/devices/gdevpdfimg.c
@@ -189,10 +189,11 @@ const gx_device_pdf_image gs_pdfimage32_device = {
 static int
 pdfimage_write_args_comment(gx_device_pdf_image *pdev, stream *s)
 {
-    char **argv = NULL, *arg;
+    const char * const *argv = NULL;
+    const char *arg;
     int towrite, length, i, j, argc;
 
-    argc = gs_lib_ctx_get_args(pdev->memory->gs_lib_ctx, (const char ***)&argv);
+    argc = gs_lib_ctx_get_args(pdev->memory->gs_lib_ctx, &argv);
 
     stream_write(s, (byte *)"%%Invocation:", 13);
     length = 12;
diff --git a/devices/vector/gdevpdfu.c b/devices/vector/gdevpdfu.c
index 74f8dc3..0b2b640 100644
--- a/devices/vector/gdevpdfu.c
+++ b/devices/vector/gdevpdfu.c
@@ -402,10 +402,11 @@ encode(stream **s, const stream_template *t, gs_memory_t *mem)
 int
 pdfwrite_fwrite_args_comment(gx_device_pdf *pdev, gp_file *f)
 {
-    char **argv = NULL, *arg;
+    const char * const *argv = NULL;
+    const char *arg;
     int towrite, length, i, j, argc;
 
-    argc = gs_lib_ctx_get_args(pdev->memory->gs_lib_ctx, (const char ***)&argv);
+    argc = gs_lib_ctx_get_args(pdev->memory->gs_lib_ctx, &argv);
 
     gp_fwrite("%%Invocation:", 13, 1, f);
     length = 12;
@@ -450,10 +451,11 @@ pdfwrite_fwrite_args_comment(gx_device_pdf *pdev, gp_file *f)
 int
 pdfwrite_write_args_comment(gx_device_pdf *pdev, stream *s)
 {
-    char **argv = NULL, *arg;
+    const char * const *argv = NULL;
+    const char *arg;
     int towrite, length, i, j, argc;
 
-    argc = gs_lib_ctx_get_args(pdev->memory->gs_lib_ctx, (const char ***)&argv);
+    argc = gs_lib_ctx_get_args(pdev->memory->gs_lib_ctx, &argv);
 
     stream_write(s, (byte *)"%%Invocation:", 13);
     length = 12;
diff --git a/pcl/pl/plmain.c b/pcl/pl/plmain.c
index e7152a3..73f45fe 100644
--- a/pcl/pl/plmain.c
+++ b/pcl/pl/plmain.c
@@ -180,7 +180,6 @@ pl_main_init_with_args(pl_main_instance_t *inst, int argc, char *argv[])
 {
     gs_memory_t *mem = inst->memory;
     pl_interp_implementation_t *pjli;
-    int code;
 
     gp_init();
     /* debug flags we reset this out of gs_lib_init0 which sets these


Summary of changes:
 base/claptrap-planar.c    |  9 +++++----
 base/gslibctx.c           |  4 ++--
 base/gslibctx.h           |  2 +-
 devices/gdevpdfimg.c      |  5 +++--
 devices/gdevpsd.c         |  3 ++-
 devices/vector/gdevpdfu.c | 10 ++++++----
 pcl/pl/plmain.c           |  1 -
 windows/GhostPDL.sln      | 19 ++++++++++++-------
 8 files changed, 31 insertions(+), 22 deletions(-)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.