diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2023-06-28 17:29:32 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2023-06-28 17:29:32 +0000 |
commit | 23ce26f64c34e30951ad9ade2151552ed77e7357 (patch) | |
tree | d73b31a0c2f7c7be4a69f8a8e84e00dd39c432b5 /converter/pbm/escp2topbm.c | |
parent | 1b6e51a266008348ad93ed8b6ac9ec91b5024fea (diff) | |
download | netpbm-mirror-23ce26f64c34e30951ad9ade2151552ed77e7357.tar.gz netpbm-mirror-23ce26f64c34e30951ad9ade2151552ed77e7357.tar.xz netpbm-mirror-23ce26f64c34e30951ad9ade2151552ed77e7357.zip |
promote Advanced to Stable
git-svn-id: http://svn.code.sf.net/p/netpbm/code/stable@4558 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter/pbm/escp2topbm.c')
-rw-r--r-- | converter/pbm/escp2topbm.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/converter/pbm/escp2topbm.c b/converter/pbm/escp2topbm.c index 8acd13d6..de3ea931 100644 --- a/converter/pbm/escp2topbm.c +++ b/converter/pbm/escp2topbm.c @@ -104,7 +104,7 @@ readChar(FILE * const ifP) { -static void +static void readStripeHeader(unsigned int * const widthThisStripeP, unsigned int * const rowsThisStripeP, unsigned int * const compressionP, @@ -120,7 +120,7 @@ readStripeHeader(unsigned int * const widthThisStripeP, compression = stripeHeader[0]; /* verticalResolution = stripeHeader[1]; */ /* horizontalResolution = stripeHeader[2]; */ - rowsThisStripe = stripeHeader[3]; + rowsThisStripe = stripeHeader[3]; widthThisStripe = stripeHeader[5] * 256 + stripeHeader[4]; if (widthThisStripe == 0 || rowsThisStripe == 0) @@ -143,7 +143,7 @@ readStripeHeader(unsigned int * const widthThisStripeP, /* RLE decoder */ static void -decEpsonRLE(unsigned int const blockSize, +decEpsonRLE(unsigned int const blockSize, unsigned char * const outBuffer, FILE * const ifP) { @@ -174,7 +174,7 @@ decEpsonRLE(unsigned int const blockSize, unsigned int i; for (i = 0; i < runLength; ++i) - outBuffer[dpos + i] = repeatChar; + outBuffer[dpos + i] = repeatChar; dpos += runLength; } } @@ -191,7 +191,7 @@ processStripeRaster(unsigned char ** const bitarray, unsigned int const compression, FILE * const ifP, unsigned int * const rowIdxP) { - + unsigned int const initialRowIdx = *rowIdxP; unsigned int const widthInBytes = pbm_packed_bytes(width); unsigned int const blockSize = rowsThisStripe * widthInBytes; @@ -237,7 +237,7 @@ expandBitarray(unsigned char *** const bitarrayP, if (*bitarraySizeP > heightMax) pm_error("Error: Image too tall"); else - REALLOCARRAY_NOFAIL(*bitarrayP, *bitarraySizeP); + REALLOCARRAY_NOFAIL(*bitarrayP, *bitarraySizeP); } @@ -253,7 +253,7 @@ writePbmImage(unsigned char ** const bitarray, pm_error("No image"); pbm_writepbminit(stdout, width, height, 0); - + for (row = 0; row < height; ++row) { pbm_cleanrowend_packed(bitarray[row], width); pbm_writepbmrow_packed(stdout, bitarray[row], width, 0); @@ -309,7 +309,7 @@ main(int argc, unsigned int compression; unsigned int rowsThisStripe; unsigned int widthThisStripe; - + readStripeHeader(&widthThisStripe, &rowsThisStripe, &compression, ifP); @@ -320,7 +320,7 @@ main(int argc, /* The official Epson manual says valid values are 1, 8, 24 but we just print a warning message and continue if other values are detected. - */ + */ pm_message("Abnormal data block height value: %u " "(ignoring)", rowsThisStripe); |