diff options
-rwxr-xr-x | buildtools/stamp-date | 2 | ||||
-rw-r--r-- | converter/ppm/ppmtoarbtxt.c | 4 | ||||
-rw-r--r-- | doc/HISTORY | 22 | ||||
-rw-r--r-- | editor/pnmpaste.c | 10 | ||||
-rw-r--r-- | lib/rgb.txt | 7 | ||||
-rw-r--r-- | test/cut-paste-roundtrip.ok | 9 | ||||
-rwxr-xr-x | test/cut-paste-roundtrip.test | 49 | ||||
-rw-r--r-- | version.mk | 4 |
8 files changed, 82 insertions, 25 deletions
diff --git a/buildtools/stamp-date b/buildtools/stamp-date index 5fb6c13a..32839e94 100755 --- a/buildtools/stamp-date +++ b/buildtools/stamp-date @@ -9,7 +9,7 @@ # documentation. This software is provided "as is" without express or # implied warranty. # -DATE=`date` +DATE=$(date) LOGNAME_OR_UNKNOWN=${LOGNAME:-UNKNOWN} USER=${USER:-$LOGNAME_OR_UNKNOWN} if [ "$USER" = "UNKNOWN" ]; then diff --git a/converter/ppm/ppmtoarbtxt.c b/converter/ppm/ppmtoarbtxt.c index 5873761f..fc8927ce 100644 --- a/converter/ppm/ppmtoarbtxt.c +++ b/converter/ppm/ppmtoarbtxt.c @@ -374,7 +374,7 @@ objClass(SkeletonObjectType const objType) { #if HAVE_PARSE_PRINTF_FORMAT static void -validateParsePrintfFLag(int const printfConversion, +validateParsePrintfFlag(int const printfConversion, SkeletonObjectType const ctyp, const char ** const errorP) { /*---------------------------------------------------------------------------- @@ -467,7 +467,7 @@ validateFormatWithPpf(const char * const format, break; case 1: - validateParsePrintfFLag(printfConversion[0], ctyp, errorP); + validateParsePrintfFlag(printfConversion[0], ctyp, errorP); break; default: diff --git a/doc/HISTORY b/doc/HISTORY index 4b3a0919..b8a58b34 100644 --- a/doc/HISTORY +++ b/doc/HISTORY @@ -4,18 +4,7 @@ Netpbm. CHANGE HISTORY -------------- -15.12.09 BJH Release 10.72.04 - - pnmpaste: fix bug with PBM: incorrect output. Introduced in - Netpbm 10.44 (September 2008). - -15.11.25 BJH Release 10.72.03 - - pnmtops: fix bug: always things -level=N is -level=1. - Introduced after Netpbm 10.26 (January 2005) but before 10.35 - (August 2006). Manifests only with recent compilers. - -15.10.31 BJH Release 10.72.02 +15.12.26 BJH Release 10.73.00 anytopnm: use --mime-type option instead of --mime on newer 'file' program (on which --mime has a new meaning so that @@ -24,7 +13,12 @@ CHANGE HISTORY anytopnm: recognize "Netpbm PAM" non-mime output from 'file' program as indicating PAM. -15.10.14 BJH Release 10.72.01 + pnmtops: fix bug: always thinks -level=N is -level=1. + Introduced after Netpbm 10.26 (January 2005) but before 10.35 + (August 2006). Manifests only with recent compilers. + + pnmpaste: fix bug with PBM: incorrect output. Introduced in + Netpbm 10.44 (September 2008). Build: fix undefined reference to parse_printf_format etc. on system that doesn't have that facility. Broken in Netpbm 10.69 @@ -36,6 +30,8 @@ CHANGE HISTORY Windows build: fix bug: make clean doesn't clean icon/netpbm.o. Broken since Netpbm 10.67 (June 2014). + Test: improved pnmpaste test. + 15.09.26 BJH Release 10.72.00 Add pamunlookup . diff --git a/editor/pnmpaste.c b/editor/pnmpaste.c index a47e1d66..1e29d933 100644 --- a/editor/pnmpaste.c +++ b/editor/pnmpaste.c @@ -21,7 +21,7 @@ enum boolOp {REPLACE, AND, OR, XOR /*, NAND, NOR, NXOR */ }; -struct cmdlineInfo { +struct CmdlineInfo { /* All the information the user supplied in the command line, in a form easy for the program to use. */ @@ -36,7 +36,7 @@ struct cmdlineInfo { static void parseCommandLine(int argc, const char ** argv, - struct cmdlineInfo * const cmdlineP) { + struct CmdlineInfo * const cmdlineP) { /*---------------------------------------------------------------------------- Note that the file spec array we return is stored in the storage that was passed to us as the argv array. @@ -178,8 +178,8 @@ insertDirect(FILE * const ifP, } } - /* destrow[] now contains garbage in the cols % 8 rightmost bits of the - last byte we touched. Those are supposed to be unchanged from the + /* destrow[] now contains garbage in all but the cols % 8 leftmost bits of + the last byte we touched. Those are supposed to be unchanged from the input, so we restore them now. */ if (cols % 8 > 0) @@ -354,7 +354,7 @@ pasteNonPbm(FILE * const fpInset, int main(int argc, const char ** argv) { - struct cmdlineInfo cmdline; + struct CmdlineInfo cmdline; FILE * fpInset; FILE * fpBase; xelval maxvalInset, maxvalBase; diff --git a/lib/rgb.txt b/lib/rgb.txt index d98b4395..28231080 100644 --- a/lib/rgb.txt +++ b/lib/rgb.txt @@ -880,5 +880,12 @@ 204 119 34 Ochre +# From Wikipedia article on Azure, 15.11.30 +# Note that this is much different from the older colors of that name in this +# file. + + 0 127 255 Azure5 + + # These were more or less invented for use with Netpbm: 255 255 255 D65 diff --git a/test/cut-paste-roundtrip.ok b/test/cut-paste-roundtrip.ok index 82eac5a8..6e0f9359 100644 --- a/test/cut-paste-roundtrip.ok +++ b/test/cut-paste-roundtrip.ok @@ -1 +1,10 @@ +2999529086 101484 1926073387 101484 +514843768 41 +1880210648 41 +2425386270 41 +2425386270 41 +2425386270 41 +2425386270 41 +2425386270 41 +2425386270 41 diff --git a/test/cut-paste-roundtrip.test b/test/cut-paste-roundtrip.test index 9f466020..1bb3a7c2 100755 --- a/test/cut-paste-roundtrip.test +++ b/test/cut-paste-roundtrip.test @@ -1,7 +1,52 @@ #! /bin/bash # This script tests: pamcut pnmpaste -# Also requires: +# Also requires: pbmmake pnmpad +base_ppm=${tmpdir}/base.ppm + +# Test 1. Should produce 2999529086 101484 +# (Make a modified base image to prevent false positives.) + +pbmmake -g 100 70 | \ +pnmpaste -replace - 50 40 testimg.ppm | tee ${base_ppm} | cksum + +# Test 2. Should produce 1926073387 101484 pamcut 50 40 100 70 testimg.ppm | \ -pnmpaste -replace - 50 40 testimg.ppm | cksum +pnmpaste -replace - 50 40 ${base_ppm} | cksum + +rm ${base_ppm} + + +basewhite_pbm=${tmpdir}/basewhite.pbm +baseblack_pbm=${tmpdir}/baseblack.pbm +part_pbm=${tmpdir}/part.pbm + +# Test 3. Should produce 514843768 41 +# (Make a modified base image to prevent false positives.) + +pbmmake -w 5 7 | +pnmpaste -replace - 7 9 testgrid.pbm | tee ${basewhite_pbm} | cksum + +# Test 4. Should produce 1880210648 41 +# (Another modified base image with target area black.) + +pbmmake -b 5 7 | +pnmpaste -replace - 7 9 ${basewhite_pbm} | tee ${baseblack_pbm} | cksum + + +# Test 5. Should produce 2425386270 41 six times. + +pamcut 7 9 5 7 testgrid.pbm > ${part_pbm} + +pnmpaste -replace ${part_pbm} 7 9 ${basewhite_pbm} | cksum +pnmpaste -and ${part_pbm} 7 9 ${basewhite_pbm} | cksum +pnmpaste -or ${part_pbm} 7 9 ${baseblack_pbm} | cksum +pnmpad -left 3 -white ${part_pbm} |\ + pnmpaste -and - 4 9 ${basewhite_pbm} | cksum +pnmpad -left 7 -right 2 -top 1 -black ${part_pbm} |\ + pnmpaste -or - 0 8 ${baseblack_pbm} | cksum +pnmpaste -xor ${part_pbm} 7 9 testgrid.pbm |\ + pnmpaste -xor ${part_pbm} 7 9 | cksum + +rm ${part_pbm} ${basewhite_pbm} ${baseblack_pbm} diff --git a/version.mk b/version.mk index 3fd6ae3b..993a953c 100644 --- a/version.mk +++ b/version.mk @@ -1,3 +1,3 @@ NETPBM_MAJOR_RELEASE = 10 -NETPBM_MINOR_RELEASE = 72 -NETPBM_POINT_RELEASE = 4 +NETPBM_MINOR_RELEASE = 73 +NETPBM_POINT_RELEASE = 00 |