about summary refs log tree commit diff
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2020-12-08 02:54:00 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2020-12-08 02:54:00 +0000
commit1a2027b4112f1b66023db8563e47db35899654a8 (patch)
treea9b9f48844bedb0d003a9fe337e39b583eae03ef
parent6eb04c5ebd4cd3cae0ce4de2921ce7a4b709d473 (diff)
downloadnetpbm-mirror-1a2027b4112f1b66023db8563e47db35899654a8.tar.gz
netpbm-mirror-1a2027b4112f1b66023db8563e47db35899654a8.tar.xz
netpbm-mirror-1a2027b4112f1b66023db8563e47db35899654a8.zip
Release 10.86.18
git-svn-id: http://svn.code.sf.net/p/netpbm/code/stable@3997 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rw-r--r--doc/HISTORY13
-rw-r--r--editor/pamaddnoise.c2
-rw-r--r--other/pamarith.c10
-rw-r--r--version.mk2
4 files changed, 21 insertions, 6 deletions
diff --git a/doc/HISTORY b/doc/HISTORY
index 17818cd6..12c6994b 100644
--- a/doc/HISTORY
+++ b/doc/HISTORY
@@ -4,6 +4,15 @@ Netpbm.
 CHANGE HISTORY 
 --------------
 
+20.12.08 BJH  Release 10.86.18
+
+              pamarith: Fix bug: fails with more than two operands for
+              -mulitply, -minimum, -maximum, -nand, and -nor.
+
+              pamaddnoise: fix bug: garbage output with -type impulse.  Always
+              broken (pamaddnoise's precursors pnmaddnoise was new to Netpbm
+              in Netpbm 10.29 (August 2005).
+
 20.09.26 BJH  Release 10.86.17
 
               pamfunc: Fix always wrong output with -not.  Always broken.
@@ -1939,6 +1948,10 @@ CHANGE HISTORY
 
               Add ppmtoascii.  Thanks "Frank Ch. Eigler" <fche@elastic.org>.
 
+              pamarith: Allow more than two operands for functions for which
+              it makes sense (all but -subtract, -difference, -compare,
+              -divide, -shiftleft, and -shiftright).
+
               pnmtops: Add -bitsperpixel option.
 
               pamx: Make exit status 0 instead of 10 when window manager
diff --git a/editor/pamaddnoise.c b/editor/pamaddnoise.c
index 354e0dc4..ccfde0b6 100644
--- a/editor/pamaddnoise.c
+++ b/editor/pamaddnoise.c
@@ -97,6 +97,8 @@ impulse_noise(sample   const maxval,
         *newSampleP = 0;
     else if ( sap >= high_tol )
         *newSampleP = maxval;
+    else
+        *newSampleP = origSample;
 }
 
 
diff --git a/other/pamarith.c b/other/pamarith.c
index 3fde1953..3f44dc73 100644
--- a/other/pamarith.c
+++ b/other/pamarith.c
@@ -22,21 +22,21 @@ isDyadic(enum function const function) {
     
     switch (function) {
     case FN_ADD:
+    case FN_MULTIPLY:
+    case FN_MINIMUM:
+    case FN_MAXIMUM:
     case FN_MEAN:
     case FN_AND:
+    case FN_NAND:
     case FN_OR:
+    case FN_NOR:
     case FN_XOR:
         retval = FALSE;
         break;
     case FN_SUBTRACT:
     case FN_DIFFERENCE:
-    case FN_MINIMUM:
-    case FN_MAXIMUM:
     case FN_COMPARE:
-    case FN_MULTIPLY:
     case FN_DIVIDE:
-    case FN_NAND:
-    case FN_NOR:
     case FN_SHIFTLEFT:
     case FN_SHIFTRIGHT:
         retval = TRUE;
diff --git a/version.mk b/version.mk
index 68de2d05..07da05dd 100644
--- a/version.mk
+++ b/version.mk
@@ -1,3 +1,3 @@
 NETPBM_MAJOR_RELEASE = 10
 NETPBM_MINOR_RELEASE = 86
-NETPBM_POINT_RELEASE = 17
+NETPBM_POINT_RELEASE = 18