about summary refs log tree commit diff
path: root/analyzer
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2022-03-27 23:20:22 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2022-03-27 23:20:22 +0000
commit772c4792d998deb70f1719c1a2ad82f2defde5f0 (patch)
treef512ff95f5e767aa5bb1655caa0aaf87063a624a /analyzer
parentf336dfc59346a26a045f7e0df0ecba32d904c55e (diff)
downloadnetpbm-mirror-772c4792d998deb70f1719c1a2ad82f2defde5f0.tar.gz
netpbm-mirror-772c4792d998deb70f1719c1a2ad82f2defde5f0.tar.xz
netpbm-mirror-772c4792d998deb70f1719c1a2ad82f2defde5f0.zip
Promote Development release to Advanced
git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@4318 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'analyzer')
-rw-r--r--analyzer/pgmtexture.c9
-rw-r--r--analyzer/pnmpsnr.c2
2 files changed, 10 insertions, 1 deletions
diff --git a/analyzer/pgmtexture.c b/analyzer/pgmtexture.c
index ea0b6210..5af51bf5 100644
--- a/analyzer/pgmtexture.c
+++ b/analyzer/pgmtexture.c
@@ -49,7 +49,16 @@ static bool const sortit = FALSE;
 static float *
 vector(unsigned int const nl,
        unsigned int const nh) {
+/*----------------------------------------------------------------------------
+  Allocate a float vector with range [nl..nh]
+
+  We do some seedy C here, subtracting an arbitrary integer from a pointer and
+  calling the result a pointer.  It normally works because the only way we'll
+  use that pointer is by adding that same integer or something greater to it.
 
+  The point of this is not to allocate memory for vector elements that will
+  never be referenced (component < nl).
+-----------------------------------------------------------------------------*/
     float * v;
     unsigned int i;
 
diff --git a/analyzer/pnmpsnr.c b/analyzer/pnmpsnr.c
index 2363e8c3..6543c542 100644
--- a/analyzer/pnmpsnr.c
+++ b/analyzer/pnmpsnr.c
@@ -179,7 +179,7 @@ validateInput(struct pam const pam1,
                  pam1.height, pam2.height);
 
     if (pam1.maxval != pam2.maxval)
-        pm_error("images do not have the same maxval.  This programs works "
+        pm_error("images do not have the same maxval.  This program works "
                  "only on like maxvals.  "
                  "The first image has maxval %u, "
                  "while the second has %u.  Use Pamdepth to change the "