From de1311e820dc892f1a3c5c9ae70dbc56868030d8 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Fri, 28 Jun 2019 21:31:24 +0000 Subject: Release 10.73.28 git-svn-id: http://svn.code.sf.net/p/netpbm/code/stable@3635 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- converter/pbm/pbmtozinc.c | 13 +++++++------ doc/HISTORY | 5 +++++ version.mk | 2 +- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/converter/pbm/pbmtozinc.c b/converter/pbm/pbmtozinc.c index 66ec5582..a89b8c9f 100644 --- a/converter/pbm/pbmtozinc.c +++ b/converter/pbm/pbmtozinc.c @@ -92,7 +92,9 @@ packer_init(Packer * const packerP) { static void -packer_putitem(Packer * const packerP) { +packer_putitem(Packer * const packerP, + unsigned char const hi, + unsigned char const lo) { if (packerP->firstitem) packerP->firstitem = 0; @@ -107,7 +109,8 @@ packer_putitem(Packer * const packerP) { putchar(' '); ++packerP->itemsperline; - printf ("0x%02x%02x", packerP->item & 255, packerP->item >> 8); + + printf ("0x%02x%02x", hi, lo); } @@ -119,7 +122,7 @@ writeRaster(FILE * const ifP, unsigned int const cols, int const format) { - bit * const bitrow = pbm_allocrow_packed(cols + 8); + unsigned char * const bitrow = pbm_allocrow_packed(cols + 8); Packer packer; unsigned int row; @@ -129,7 +132,6 @@ writeRaster(FILE * const ifP, bitrow[pbm_packed_bytes(cols+8) -1 ] = 0x00; for (row = 0; row < rows; ++row) { - uint16_t * const itemrow = (uint16_t *) bitrow; unsigned int const itemCt = (cols + 15 ) / 16; unsigned int i; @@ -139,8 +141,7 @@ writeRaster(FILE * const ifP, pbm_cleanrowend_packed(bitrow, cols); for (i = 0; i < itemCt; ++i) { - packer.item = itemrow[i]; - packer_putitem(&packer); + packer_putitem(&packer, bitrow[2*i+0], bitrow[2*i+1]); } } pbm_freerow_packed(bitrow); diff --git a/doc/HISTORY b/doc/HISTORY index 477b4ef3..5f91d170 100644 --- a/doc/HISTORY +++ b/doc/HISTORY @@ -4,6 +4,11 @@ Netpbm. CHANGE HISTORY -------------- +19.06.28 BJH Release 10.73.28 + + pbmtozinc: fix wrong output on big-endian machines. Broken in + Netpbm 10.71 (June 2015). + 19.05.04 BJH Release 10.73.27 pnmtopng: Fix bug: Defaults to no filters. Should be all diff --git a/version.mk b/version.mk index 04509eab..2dbfb7ff 100644 --- a/version.mk +++ b/version.mk @@ -1,3 +1,3 @@ NETPBM_MAJOR_RELEASE = 10 NETPBM_MINOR_RELEASE = 73 -NETPBM_POINT_RELEASE = 27 +NETPBM_POINT_RELEASE = 28 -- cgit 1.4.1