about summary refs log tree commit diff
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2022-01-27 02:36:15 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2022-01-27 02:36:15 +0000
commit074b331756e2dcd520e821db3fd7789926b9ccd9 (patch)
treecd59ca77ea288c69139a77d418b71be3b3d249db
parent7363c9a203f82c172be2a06356eb8a2bdf0833a4 (diff)
downloadnetpbm-mirror-074b331756e2dcd520e821db3fd7789926b9ccd9.tar.gz
netpbm-mirror-074b331756e2dcd520e821db3fd7789926b9ccd9.tar.xz
netpbm-mirror-074b331756e2dcd520e821db3fd7789926b9ccd9.zip
Release 10.97.03
git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@4263 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rw-r--r--analyzer/pgmtexture.c3
-rw-r--r--converter/ppm/ppmtoapplevol.c6
-rw-r--r--doc/HISTORY16
-rw-r--r--editor/specialty/pgmabel.c11
-rw-r--r--version.mk2
5 files changed, 30 insertions, 8 deletions
diff --git a/analyzer/pgmtexture.c b/analyzer/pgmtexture.c
index c69643e7..ea0b6210 100644
--- a/analyzer/pgmtexture.c
+++ b/analyzer/pgmtexture.c
@@ -51,6 +51,7 @@ vector(unsigned int const nl,
        unsigned int const nh) {
 
     float * v;
+    unsigned int i;
 
     assert(nh >= nl);
 
@@ -59,6 +60,8 @@ vector(unsigned int const nl,
     if (v == NULL)
         pm_error("Unable to allocate memory for a vector.");
 
+    for(i = 0; i < nh - nl +1; ++i)
+        v[i] = 0;
     return v - nl;
 }
 
diff --git a/converter/ppm/ppmtoapplevol.c b/converter/ppm/ppmtoapplevol.c
index e1c7f2dc..eb4b6b2a 100644
--- a/converter/ppm/ppmtoapplevol.c
+++ b/converter/ppm/ppmtoapplevol.c
@@ -68,6 +68,10 @@ main (int argc, const char * argv[]) {
     if (rows != 12)
         pm_error("Input image must be 12 rows tall.  Yours is %u", rows);
 
+    if (cols > 255)
+        pm_error("Input image must not be more than 255 columns wide."
+                 "  Yours is %u", cols);
+
     writeHeader(cols, stdout);
 
     pixelrow = ppm_allocrow(cols);
@@ -75,7 +79,7 @@ main (int argc, const char * argv[]) {
     for (row = 0; row < rows; row++) {
         unsigned int col;
         
-        ppm_readppmrow(stdin, pixelrow, cols, maxval, format);
+        ppm_readppmrow(ifP, pixelrow, cols, maxval, format);
 
         for (col = 0; col < cols; ++col) {
             unsigned int const maxval15Value =
diff --git a/doc/HISTORY b/doc/HISTORY
index d6d9e7df..ef803b58 100644
--- a/doc/HISTORY
+++ b/doc/HISTORY
@@ -4,6 +4,22 @@ Netpbm.
 CHANGE HISTORY 
 --------------
 
+not yet  BJH  Release 10.97.03
+
+              ppmtoapplevol: Fix bug: reads from Standard Input even when you
+              specify the input file argument.  Always broken.  (ppmtoapplevol
+              was new in Netpbm 10.54 (March 2011).
+
+              ppmtoapplevol: Fix bug: produces garbage with input image wider
+              than 255.  Always broken.  (ppmtoapplevol was new in Netpbm
+              10.54 (March 2011).
+
+              pgmtexture: Fix incorrect output.  Always broken.  (Program was
+              added in primordial Netpbm in 1991).
+              
+              pgmabel: Fix incorrect output.  Always broken.  (Program was
+              new in Netpbm 10.3 (July 2002).
+
 22.01.11 BJH  Release 10.97.02
 
               ppmtoilbm: Fix wild memory references and hangs with -map .
diff --git a/editor/specialty/pgmabel.c b/editor/specialty/pgmabel.c
index aa748f88..5badfd19 100644
--- a/editor/specialty/pgmabel.c
+++ b/editor/specialty/pgmabel.c
@@ -100,20 +100,19 @@ abel ( float *y, int N, double *adl)
 {
     register int n;
     double *rho, *rhop;       /* results and new index                       */
-    float  *yp;               /* new indizes for the y-array                 */
 
     MALLOCARRAY(rho, N);
     if( !rho )
         pm_error( "out of memory" );
+    for (n=0 ; n<N ; n++)
+        rho[n] = 0;
+
     rhop = rho;
-    yp  = y;
 
     for (n=0 ; n<N ; n++)
     {
-        *(rhop++) = ((*yp++) - Sum(n,rho,N,adl))/(adl[n*N+n]);
-/*    *(rhop++) = ((*yp++) - Sum(n,rho,N))/(dr(n,n+0.5,N));  old version */
-        if ( *rhop < 0.0 ) *rhop = 0.0;         /*  error correction !       */
-/*   if (n > 2) rhop[n-1] = (rho[n-2]+rho[n-1]+rho[n])/3.0;  stabilization*/
+        rhop[n] = MAX(0, (y[n] - Sum(n,rho,N,adl))/(adl[n*N+n]));
+            /* Clip to 0 for error correction !  */
     }
     for (n=0 ; n<N ; n++)
         {
diff --git a/version.mk b/version.mk
index 35bfc41b..fa737088 100644
--- a/version.mk
+++ b/version.mk
@@ -1,3 +1,3 @@
 NETPBM_MAJOR_RELEASE = 10
 NETPBM_MINOR_RELEASE = 97
-NETPBM_POINT_RELEASE = 2
+NETPBM_POINT_RELEASE = 3