about summary refs log tree commit diff
path: root/generator
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2013-02-03 23:35:20 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2013-02-03 23:35:20 +0000
commit230efac9b41d9160f09a50f8b321b2f12958b184 (patch)
tree35fa41881847158055acbc5834e0c3a5ae0d9ded /generator
parentccdb79ccee99c2f2246fd96f90a2d07805d06b52 (diff)
downloadnetpbm-mirror-230efac9b41d9160f09a50f8b321b2f12958b184.tar.gz
netpbm-mirror-230efac9b41d9160f09a50f8b321b2f12958b184.tar.xz
netpbm-mirror-230efac9b41d9160f09a50f8b321b2f12958b184.zip
clenaup
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@1836 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'generator')
-rw-r--r--generator/pamstereogram.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/generator/pamstereogram.c b/generator/pamstereogram.c
index ac71c702..6bcababa 100644
--- a/generator/pamstereogram.c
+++ b/generator/pamstereogram.c
@@ -762,10 +762,10 @@ drawguides(unsigned int       const guidesize,
 /*----------------------------------------------------------------------------
    Draw a pair of guide boxes, left and right.
 -----------------------------------------------------------------------------*/
-    int const far = separation(0, eyesep, dpi, depthOfField);
+    unsigned int const far = separation(0, eyesep, dpi, depthOfField);
         /* Space between the two guide boxes. */
-    int const width = outPamP->width;    /* Width of the output image */
-
+    unsigned int const width = outPamP->width;  /* Width of the output image */
+    
     tuple * outrow;             /* One row of output data */
     tuple blackTuple;
     unsigned int col;
@@ -874,8 +874,8 @@ makeStereoRow(const struct pam * const inPamP,
             } while (visible && zt < 1);
 
             if (visible) {
-                int l;
-
+                unsigned int l;
+                
                 l = same[left];
                 while (l != left && l != right) {
                     if (l < right) {
@@ -979,18 +979,20 @@ averageFromPattern(struct pam *         const pamP,
        every column that should have the same color.
     */
     for (col = pamP->width-1; col >= 0; --col) {
-        tuple onetuple = textureRow[(col+same[col])/2];
-        int targetcol = sameFp[col];
+        tuple const onetuple = textureRow[(col+same[col])/2];
+        unsigned int const targetcol = sameFp[col];
         int eqcol;
 
-        if (!pnm_tupleequal(pamP, onetuple, bgColor))
-            for (eqcol = pamP->width-1; eqcol >= 0; --eqcol)
+        if (!pnm_tupleequal(pamP, onetuple, bgColor)) {
+            for (eqcol = pamP->width-1; eqcol >= 0; --eqcol) {
                 if (sameFp[eqcol] == targetcol) {
                     unsigned int plane;
                     for (plane = 0; plane < pamP->depth; ++plane)
                         outRow[eqcol][plane] += onetuple[plane];
                     tuplesInCol[eqcol]++;
                 }
+            }
+        }
     }
     /* Take the average of all colors associated with each column.
        Tuples that can be any color are assigned the same color as was