about summary refs log tree commit diff
path: root/analyzer/pnmhistmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'analyzer/pnmhistmap.c')
-rw-r--r--analyzer/pnmhistmap.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/analyzer/pnmhistmap.c b/analyzer/pnmhistmap.c
index fc1bbbde..3c943db9 100644
--- a/analyzer/pnmhistmap.c
+++ b/analyzer/pnmhistmap.c
@@ -59,7 +59,7 @@ parseCommandLine(int argc, const char ** argv,
    was passed to us as the argv array.
 -----------------------------------------------------------------------------*/
     optEntry *option_def;
-        /* Instructions to pm_optParseOptions3 on how to parse our options.
+        /* Instructions to pm_optParseOptions4 on how to parse our options.
          */
     optStruct3 opt;
 
@@ -92,7 +92,7 @@ parseCommandLine(int argc, const char ** argv,
     opt.short_allowed = FALSE;  /* We have no short (old-fashioned) options */
     opt.allowNegNum = FALSE;  /* We may have parms that are negative numbers */
 
-    pm_optParseOptions3(&argc, (char **)argv, opt, sizeof(opt), 0);
+    pm_optParseOptions4(&argc, argv, opt, sizeof(opt), 0);
         /* Uses and sets argc, argv, and some of *cmdlineP and others. */
 
     if (!lvalSpec)
@@ -113,7 +113,7 @@ parseCommandLine(int argc, const char ** argv,
     if (!heightSpec)
         cmdlineP->height = 200;
 
-    if (argc-1 == 0) 
+    if (argc-1 == 0)
         cmdlineP->inputFilespec = "-";
     else if (argc-1 != 1)
         pm_error("Program takes zero or one argument (filename).  You "
@@ -202,7 +202,7 @@ pgmHist(FILE *       const ifP,
     unsigned int * ghist;
     double vscale;
     unsigned int hmax;
-    
+
     MALLOCARRAY(ghist, histWidth);
     if (ghist == NULL)
         pm_error("Not enough memory for histogram array (%u bytes)",
@@ -231,7 +231,7 @@ pgmHist(FILE *       const ifP,
         pm_message("finding max. slot height...");
     if (clipSpec)
         hmax = clipCount;
-    else 
+    else
         hmax = maxSlotCount(ghist, histWidth, no_white, no_black);
 
     assert(hmax > 0);
@@ -275,10 +275,10 @@ maxSlotCountAll(unsigned int *       const hist[3],
 
     for (color = 0; color < 3; ++color)
         if (hist[color])
-            hmax = MAX(hmax, 
-                       maxSlotCount(hist[color], 
+            hmax = MAX(hmax,
+                       maxSlotCount(hist[color],
                                     histWidth, no_white, no_black));
-    
+
     return hmax;
 }
 
@@ -418,7 +418,7 @@ ppmHist(FILE *       const ifP,
         pm_message("finding max. slot height...");
     if (clipSpec)
         hmax = clipCount;
-    else 
+    else
         hmax = maxSlotCountAll(hist, histWidth, no_white, no_black);
 
     assert(hmax > 0);
@@ -427,7 +427,7 @@ ppmHist(FILE *       const ifP,
 
     vscale = (double) histHeight / hmax;
     if (verbose && pm_have_float_format())
-        pm_message("Done: height = %u, vertical scale factor = %g", 
+        pm_message("Done: height = %u, vertical scale factor = %g",
                    hmax, vscale);
 
     for (i = 0; i < histWidth; ++i) {
@@ -435,8 +435,8 @@ ppmHist(FILE *       const ifP,
             unsigned int j;
             bool plotted;
             plotted = FALSE;
-            for (j = histHeight - (int)(vscale * hist[WANT_RED][i]); 
-                 j < histHeight && !plotted; 
+            for (j = histHeight - (int)(vscale * hist[WANT_RED][i]);
+                 j < histHeight && !plotted;
                  ++j) {
                 PPM_PUTR(pixels[j][i], maxval);
                 plotted = dots;
@@ -446,8 +446,8 @@ ppmHist(FILE *       const ifP,
             unsigned int j;
             bool plotted;
             plotted = FALSE;
-            for (j = histHeight - (int)(vscale * hist[WANT_GRN][i]); 
-                 j < histHeight && !plotted; 
+            for (j = histHeight - (int)(vscale * hist[WANT_GRN][i]);
+                 j < histHeight && !plotted;
                  ++j) {
                 PPM_PUTG(pixels[j][i], maxval);
                 plotted = dots;
@@ -457,8 +457,8 @@ ppmHist(FILE *       const ifP,
             unsigned int j;
             bool plotted;
             plotted = FALSE;
-            for (j = histHeight - (int)(vscale * hist[WANT_BLU][i]); 
-                 j < histHeight && !plotted; 
+            for (j = histHeight - (int)(vscale * hist[WANT_BLU][i]);
+                 j < histHeight && !plotted;
                  ++j) {
                 PPM_PUTB(pixels[j][i], maxval);
                 plotted = dots;