about summary refs log tree commit diff
path: root/converter/ppm/ppmtoascii.c
diff options
context:
space:
mode:
Diffstat (limited to 'converter/ppm/ppmtoascii.c')
-rw-r--r--converter/ppm/ppmtoascii.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/converter/ppm/ppmtoascii.c b/converter/ppm/ppmtoascii.c
index 6b0b04d7..b7c6669d 100644
--- a/converter/ppm/ppmtoascii.c
+++ b/converter/ppm/ppmtoascii.c
@@ -102,7 +102,6 @@ parseCommandLine(int argc, const char **argv,
                  struct cmdlineInfo * const cmdlineP) {
 
     optEntry * option_def;
-        /* Instructions to OptParseOptions3 on how to parse our options */
     optStruct3 opt;
 
     unsigned int option_def_index;
@@ -118,7 +117,7 @@ parseCommandLine(int argc, const char **argv,
     opt.short_allowed = false;  /* We have no short (old-fashioned) options */
     opt.allowNegNum = false;  /* We have no 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 (dim1x2Spec && dim2x4Spec)
@@ -164,7 +163,7 @@ ppmtoascii(pixel * const *    const pixels,
 
     for (row = 0; row < rows; row += cellHeight) {
         unsigned int col;
-        for (col = 0; col < cols; col += cellWidth)	{
+        for (col = 0; col < cols; col += cellWidth)     {
             unsigned int const sumthresh = cellWidth * cellHeight * 1.0 / 2;
 
             float sumr, sumg, sumb;
@@ -181,7 +180,7 @@ ppmtoascii(pixel * const *    const pixels,
                 for (subcol = 0; subcol < cellWidth; ++subcol) {
                     pixel color;
                     pixval value;
-                
+
                     if (row + subrow < rows && col + subcol < cols)
                         color = pixels[row + subrow][col + subcol];
                     else
@@ -225,7 +224,7 @@ main(int argc, const char ** argv) {
     parseCommandLine(argc, argv, &cmdline);
 
     ifP = pm_openr(cmdline.inputFileName);
-    
+
     pixels = ppm_readppm(ifP, &cols, &rows, &maxval);
 
     pm_close(ifP);
@@ -234,3 +233,6 @@ main(int argc, const char ** argv) {
 
     return 0;
 }
+
+
+