about summary refs log tree commit diff
path: root/generator
diff options
context:
space:
mode:
Diffstat (limited to 'generator')
-rw-r--r--generator/pamgauss.c32
-rw-r--r--generator/pamshadedrelief.c12
-rw-r--r--generator/pamtris/framebuffer.c2
-rw-r--r--generator/pamtris/pamtris.c2
-rw-r--r--generator/pamtris/triangle.c4
-rw-r--r--generator/pamtris/utils.c4
-rw-r--r--generator/pbmnoise.c2
-rw-r--r--generator/pbmupc.c204
-rw-r--r--generator/pgmkernel.c8
-rw-r--r--generator/pgmmake.c4
-rw-r--r--generator/ppmcolors.c10
11 files changed, 142 insertions, 142 deletions
diff --git a/generator/pamgauss.c b/generator/pamgauss.c
index 9656708b..3697fdc7 100644
--- a/generator/pamgauss.c
+++ b/generator/pamgauss.c
@@ -31,11 +31,11 @@ static void
 parseCommandLine(int argc, const char ** argv,
                  struct CmdlineInfo * const cmdlineP) {
 /*----------------------------------------------------------------------------
-  Convert program invocation arguments (argc,argv) into a format the 
+  Convert program invocation arguments (argc,argv) into a format the
   program can use easily, struct cmdlineInfo.  Validate arguments along
   the way and exit program with message if invalid.
 
-  Note that some string information we return as *cmdlineP is in the storage 
+  Note that some string information we return as *cmdlineP is in the storage
   argv[] points to.
 -----------------------------------------------------------------------------*/
     optEntry * option_def;
@@ -49,11 +49,11 @@ parseCommandLine(int argc, const char ** argv,
     MALLOCARRAY_NOFAIL(option_def, 100);
 
     option_def_index = 0;   /* incremented by OPTENTRY */
-    OPTENT3(0,   "tupletype",  OPT_STRING, &cmdlineP->tupletype, 
+    OPTENT3(0,   "tupletype",  OPT_STRING, &cmdlineP->tupletype,
             &tupletypeSpec,      0);
-    OPTENT3(0,   "maxval",     OPT_UINT,   &cmdlineP->maxval, 
+    OPTENT3(0,   "maxval",     OPT_UINT,   &cmdlineP->maxval,
             &maxvalSpec,         0);
-    OPTENT3(0,   "sigma",      OPT_FLOAT,  &cmdlineP->sigma, 
+    OPTENT3(0,   "sigma",      OPT_FLOAT,  &cmdlineP->sigma,
             &sigmaSpec,          0);
     OPTENT3(0,   "maximize",   OPT_FLAG,   NULL,
             &cmdlineP->maximize, 0);
@@ -75,12 +75,12 @@ parseCommandLine(int argc, const char ** argv,
             pm_error("The tuple type you specified is too long.  "
                      "Maximum %u characters.",
                      (unsigned)sizeof(pam.tuple_type)-1);
-    }        
+    }
 
     if (!sigmaSpec)
         pm_error("You must specify the -sigma option.");
     else if (cmdlineP->sigma <= 0.0)
-        pm_error("-sigma must be positive.  You specified %f", 
+        pm_error("-sigma must be positive.  You specified %f",
                  cmdlineP->sigma);
 
     if (!maxvalSpec)
@@ -91,7 +91,7 @@ parseCommandLine(int argc, const char ** argv,
                      "Maximum is %u", cmdlineP->maxval, PNM_OVERALLMAXVAL);
         if (cmdlineP->maxval < 1)
             pm_error("-maxval must be at least 1");
-    }    
+    }
 
     if (oversampleSpec) {
         if (cmdlineP->oversample < 1)
@@ -164,7 +164,7 @@ pixelValue(unsigned int const width,
   The gaussian function has standard deviation 'sigma' and amplitude 1.
 -----------------------------------------------------------------------------*/
     double const offset = 1.0 / (subpixDivision * 2);
-    double const y0     = (double)row + offset; 
+    double const y0     = (double)row + offset;
     double const x0     = (double)col + offset;
 
     double const subpixSize = 1.0 / subpixDivision;
@@ -236,7 +236,7 @@ maximumKernelValue(double **    const kernel,
        we know the maximum value is at the center.
     */
     return kernel[height/2][width/2];
-}        
+}
 
 
 
@@ -250,13 +250,13 @@ totalKernelValue(double **    const kernel,
 
     for (row = 0, total = 0.0; row < height; ++row) {
         unsigned int col;
-        
+
         for (col = 0; col < width; ++col)
             total += kernel[row][col];
     }
 
     return total;
-}        
+}
 
 
 
@@ -311,7 +311,7 @@ writePam(double **    const kernel,
         unsigned int col;
         for (col = 0; col < pam.width; ++col) {
             tuplerown[col][0] = kernel[row][col] / normalizer;
-        
+
             assert(tuplerown[col][0] <= 1.0);
         }
         pnm_writepamrown(&pam, tuplerown);
@@ -319,7 +319,7 @@ writePam(double **    const kernel,
 
     pnm_freepamrown(tuplerown);
 }
-    
+
 
 
 int
@@ -327,7 +327,7 @@ main(int argc, const char **argv) {
     struct CmdlineInfo cmdline;
     double ** kernel;
     double    normalizer;
-    
+
     pm_proginit(&argc, argv);
 
     parseCommandLine(argc, argv, &cmdline);
@@ -344,6 +344,6 @@ main(int argc, const char **argv) {
              normalizer, stdout);
 
     pm_freearray2((void **)kernel);
-    
+
     return 0;
 }
diff --git a/generator/pamshadedrelief.c b/generator/pamshadedrelief.c
index 35d1e3e0..80b34a0d 100644
--- a/generator/pamshadedrelief.c
+++ b/generator/pamshadedrelief.c
@@ -8,7 +8,7 @@
 
   The input array is a one-channel PAM image.  The sample values are
   elevations of terrain.
-  
+
   This is derived from John Walker's 'pgmcrater' which not only does this
   shading, but first generates a terrain map of fractal craters on which to
   run it.
@@ -95,7 +95,7 @@ parseCommandLine(int argc, const char ** const argv,
     if (cmdlineP->gamma <= 0.0)
         pm_error("gamma correction must be greater than 0");
 
-    if (argc-1 == 0) 
+    if (argc-1 == 0)
         cmdlineP->inputFileName = "-";
     else if (argc-1 != 1)
         pm_error("Program takes zero or one argument (filename).  You "
@@ -201,7 +201,7 @@ writeShadedRelief(struct pam * const terrainPamP,
         }
         {
             /* Wrap around to determine shade of pixel on right edge */
-            int const slope = 
+            int const slope =
                 terrain[row][0][0] - terrain[row][outpam.width-1][0];
             outrow[outpam.width - 1][0] =
                 brightnessOfSlope(slope, slopeGrayMap);
@@ -222,8 +222,8 @@ readTerrain(FILE *       const ifP,
 
     *tuplesP = pnm_readpam(ifP, pamP, PAM_STRUCT_SIZE(tuple_type));
 }
-            
-            
+
+
 
 int
 main(int argc, const char ** argv) {
@@ -243,7 +243,7 @@ main(int argc, const char ** argv) {
     readTerrain(ifP, &terrainPam, &terrain);
 
     writeShadedRelief(&terrainPam, terrain, cmdline.gamma, stdout);
-    
+
     return 0;
 }
 
diff --git a/generator/pamtris/framebuffer.c b/generator/pamtris/framebuffer.c
index 5665e9a4..4318b1fc 100644
--- a/generator/pamtris/framebuffer.c
+++ b/generator/pamtris/framebuffer.c
@@ -320,7 +320,7 @@ draw_span(uint32_t           const base,
         fbi->z.buffer[j] = (fbi->z.buffer[j] & ~d_mask) | (d & d_mask);
 
         for (l = 0; l < z; l++) {
-	    varying const newval = multiply_varyings(attribs[l], inverse_w);
+            varying const newval = multiply_varyings(attribs[l], inverse_w);
 
             fbi->img.buffer[k + l] =
                 (fbi->img.buffer[k + l] & ~d_mask) |
diff --git a/generator/pamtris/pamtris.c b/generator/pamtris/pamtris.c
index e0becf7a..477b657e 100644
--- a/generator/pamtris/pamtris.c
+++ b/generator/pamtris/pamtris.c
@@ -54,7 +54,7 @@ parse_command_line(int *         const argc_ptr,
     if (!width_spec || !height_spec || (!attribs_spec && !(rgb_spec || grayscale_spec))) {
         pm_errormsg(
             "you must at least specify -width, -height and "
-	    "either -num_attribs, -rgb or -grayscale.");
+            "either -num_attribs, -rgb or -grayscale.");
 
         return 0;
     }
diff --git a/generator/pamtris/triangle.c b/generator/pamtris/triangle.c
index 5143f9ee..264fc221 100644
--- a/generator/pamtris/triangle.c
+++ b/generator/pamtris/triangle.c
@@ -190,8 +190,8 @@ draw_triangle(Xy                 const xy_input,
 
     for (i = 0; i < 3; i++) {
         int32_to_varying_array(attribs_input._[i], attribs[i], n);
-	attribs[i][z] = compute_varying_z(attribs_input._[i][z]);
-	attribs[i][w] = inverse_varying(attribs[i][w]);
+        attribs[i][z] = compute_varying_z(attribs_input._[i][z]);
+        attribs[i][w] = inverse_varying(attribs[i][w]);
         multiply_varying_array_by_varying(attribs[i], attribs[i][w], z);
     }
 
diff --git a/generator/pamtris/utils.c b/generator/pamtris/utils.c
index a6b6e7d4..53f1ea9e 100644
--- a/generator/pamtris/utils.c
+++ b/generator/pamtris/utils.c
@@ -61,7 +61,7 @@ multiply_varying_array_by_varying(varying * const vars,
 
     for (i = 0; i < elements; i++) {
         vars[i].v *= multiplier.v;
-	vars[i].s  = 0.0;
+        vars[i].s  = 0.0;
     }
 }
 
@@ -77,7 +77,7 @@ divide_varying_array_by_varying(varying * const vars,
 
     for (i = 0; i < elements; i++) {
         vars[i].v *= inverse_divisor;
-	vars[i].s  = 0.0;
+        vars[i].s  = 0.0;
     }
 }
 
diff --git a/generator/pbmnoise.c b/generator/pbmnoise.c
index e316dafc..541ce92e 100644
--- a/generator/pbmnoise.c
+++ b/generator/pbmnoise.c
@@ -1,7 +1,7 @@
 /* pbmnoise.c - create a random bitmap of a specified size
                 with a specified ratio of white/black pixels
 
-   Written by Akira F Urushibata and contributed to the public domain 
+   Written by Akira F Urushibata and contributed to the public domain
    December 2021
 */
 
diff --git a/generator/pbmupc.c b/generator/pbmupc.c
index 6ef75654..9d9e6721 100644
--- a/generator/pbmupc.c
+++ b/generator/pbmupc.c
@@ -52,31 +52,31 @@ main( argc, argv )
 
     /* Check for flags. */
     while ( argn < argc && argv[argn][0] == '-' && argv[argn][1] != '\0' )
-	{
-	if ( pm_keymatch( argv[argn], "-s1", 3 ) )
-	    style = 1;
-	else if ( pm_keymatch( argv[argn], "-s2", 3 ) )
-	    style = 2;
-	else
-	    pm_usage( usage );
-	argn++;
-	}
+        {
+        if ( pm_keymatch( argv[argn], "-s1", 3 ) )
+            style = 1;
+        else if ( pm_keymatch( argv[argn], "-s2", 3 ) )
+            style = 2;
+        else
+            pm_usage( usage );
+        argn++;
+        }
 
     if ( argn + 3 < argc )
-	pm_usage( usage );
+        pm_usage( usage );
     typecode = argv[argn];
     manufcode = argv[argn + 1];
     prodcode = argv[argn + 2];
     argn += 3;
 
     if ( argn != argc )
-	pm_usage( usage );
+        pm_usage( usage );
 
     if ( strlen( typecode ) != 1 || ( ! alldig( typecode ) ) ||
-	 strlen( manufcode ) != 5 || ( ! alldig ( manufcode ) ) ||
-	 strlen( prodcode ) != 5 || ( ! alldig ( prodcode ) ) )
-	pm_error(
-	    "type code must be one digit, and\n    manufacturer and product codes must be five digits" );
+         strlen( manufcode ) != 5 || ( ! alldig ( manufcode ) ) ||
+         strlen( prodcode ) != 5 || ( ! alldig ( prodcode ) ) )
+        pm_error(
+            "type code must be one digit, and\n    manufacturer and product codes must be five digits" );
     p = typecode[0] - '0';
     lc0 = manufcode[0] - '0';
     lc1 = manufcode[1] - '0';
@@ -95,17 +95,17 @@ main( argc, argv )
     bits = pbm_allocarray( cols, rows );
 
     (void) rect( bits, 0, 0, rows, cols, PBM_WHITE );
-    
+
     row = MARGIN;
     digrow = row + SHORT_HEIGHT;
     col = MARGIN;
     digcolofs = ( LINES_WIDTH - DIGIT_WIDTH ) / 2;
 
     if ( style == 1 )
-	putdigit( p, bits, digrow, col - DIGIT_WIDTH - LINE1_WIDTH );
+        putdigit( p, bits, digrow, col - DIGIT_WIDTH - LINE1_WIDTH );
     else if ( style == 2 )
-	putdigit(
-	    p, bits, row + SHORT_HEIGHT / 2, col - DIGIT_WIDTH - LINE1_WIDTH );
+        putdigit(
+            p, bits, row + SHORT_HEIGHT / 2, col - DIGIT_WIDTH - LINE1_WIDTH );
     col = rect( bits, row, col, TALL_HEIGHT, LINE1_WIDTH, PBM_BLACK );
     col = rect( bits, row, col, TALL_HEIGHT, LINE1_WIDTH, PBM_WHITE );
     col = rect( bits, row, col, TALL_HEIGHT, LINE1_WIDTH, PBM_BLACK );
@@ -140,7 +140,7 @@ main( argc, argv )
     col = rect( bits, row, col, TALL_HEIGHT, LINE1_WIDTH, PBM_WHITE );
     col = rect( bits, row, col, TALL_HEIGHT, LINE1_WIDTH, PBM_BLACK );
     if ( style == 1 )
-	putdigit( sum, bits, digrow, col + LINE1_WIDTH );
+        putdigit( sum, bits, digrow, col + LINE1_WIDTH );
 
     pbm_writepbm( stdout, bits, cols, rows, 0 );
     pm_close( stdout );
@@ -153,8 +153,8 @@ alldig( cp )
     char* cp;
     {
     for ( ; *cp != '\0'; cp++ )
-	if ( *cp < '0' || *cp > '9' )
-	    return 0;
+        if ( *cp < '0' || *cp > '9' )
+            return 0;
     return 1;
     }
 
@@ -399,7 +399,7 @@ putdigit( d, bits, row0, col0 )
             {0,0,0,1,1,1,1,1,1,1,1,0,0,0},
             {0,0,0,0,0,0,0,0,0,0,0,0,0,0},
             {0,0,0,0,0,0,0,0,0,0,0,0,0,0}
-        }, 
+        },
         /* 9 */
         {
             {0,0,0,0,0,0,0,0,0,0,0,0,0,0},
@@ -425,92 +425,92 @@ putdigit( d, bits, row0, col0 )
             {0,0,0,0,0,1,1,0,0,0,0,0,0,0},
             {0,0,0,0,0,0,0,0,0,0,0,0,0,0},
             {0,0,0,0,0,0,0,0,0,0,0,0,0,0}
-        } 
+        }
     };
 
     for ( row = 0; row < DIGIT_HEIGHT; row++ )
-	for ( col = 0; col < DIGIT_WIDTH; col++ )
-	    bits[row0 + row][col0 + col] = digits[d][row][col];
+        for ( col = 0; col < DIGIT_WIDTH; col++ )
+            bits[row0 + row][col0 + col] = digits[d][row][col];
     }
 
 static int
 addlines( int d, bit** bits, int row0, int col0, int height, bit color )
     {
     switch ( d )
-	{
-	case 0:
-	col0 = rect( bits, row0, col0, height, LINE3_WIDTH, color );
-	col0 = rect( bits, row0, col0, height, LINE2_WIDTH, 1 - color );
-	col0 = rect( bits, row0, col0, height, LINE1_WIDTH, color );
-	col0 = rect( bits, row0, col0, height, LINE1_WIDTH, 1 - color );
-	break;
-
-	case 1:
-	col0 = rect( bits, row0, col0, height, LINE2_WIDTH, color );
-	col0 = rect( bits, row0, col0, height, LINE2_WIDTH, 1 - color );
-	col0 = rect( bits, row0, col0, height, LINE2_WIDTH, color );
-	col0 = rect( bits, row0, col0, height, LINE1_WIDTH, 1 - color );
-	break;
-
-	case 2:
-	col0 = rect( bits, row0, col0, height, LINE2_WIDTH, color );
-	col0 = rect( bits, row0, col0, height, LINE1_WIDTH, 1 - color );
-	col0 = rect( bits, row0, col0, height, LINE2_WIDTH, color );
-	col0 = rect( bits, row0, col0, height, LINE2_WIDTH, 1 - color );
-	break;
-
-	case 3:
-	col0 = rect( bits, row0, col0, height, LINE1_WIDTH, color );
-	col0 = rect( bits, row0, col0, height, LINE4_WIDTH, 1 - color );
-	col0 = rect( bits, row0, col0, height, LINE1_WIDTH, color );
-	col0 = rect( bits, row0, col0, height, LINE1_WIDTH, 1 - color );
-	break;
-
-	case 4:
-	col0 = rect( bits, row0, col0, height, LINE1_WIDTH, color );
-	col0 = rect( bits, row0, col0, height, LINE1_WIDTH, 1 - color );
-	col0 = rect( bits, row0, col0, height, LINE3_WIDTH, color );
-	col0 = rect( bits, row0, col0, height, LINE2_WIDTH, 1 - color );
-	break;
-
-	case 5:
-	col0 = rect( bits, row0, col0, height, LINE1_WIDTH, color );
-	col0 = rect( bits, row0, col0, height, LINE2_WIDTH, 1 - color );
-	col0 = rect( bits, row0, col0, height, LINE3_WIDTH, color );
-	col0 = rect( bits, row0, col0, height, LINE1_WIDTH, 1 - color );
-	break;
-
-	case 6:
-	col0 = rect( bits, row0, col0, height, LINE1_WIDTH, color );
-	col0 = rect( bits, row0, col0, height, LINE1_WIDTH, 1 - color );
-	col0 = rect( bits, row0, col0, height, LINE1_WIDTH, color );
-	col0 = rect( bits, row0, col0, height, LINE4_WIDTH, 1 - color );
-	break;
-
-	case 7:
-	col0 = rect( bits, row0, col0, height, LINE1_WIDTH, color );
-	col0 = rect( bits, row0, col0, height, LINE3_WIDTH, 1 - color );
-	col0 = rect( bits, row0, col0, height, LINE1_WIDTH, color );
-	col0 = rect( bits, row0, col0, height, LINE2_WIDTH, 1 - color );
-	break;
-
-	case 8:
-	col0 = rect( bits, row0, col0, height, LINE1_WIDTH, color );
-	col0 = rect( bits, row0, col0, height, LINE2_WIDTH, 1 - color );
-	col0 = rect( bits, row0, col0, height, LINE1_WIDTH, color );
-	col0 = rect( bits, row0, col0, height, LINE3_WIDTH, 1 - color );
-	break;
-
-	case 9:
-	col0 = rect( bits, row0, col0, height, LINE3_WIDTH, color );
-	col0 = rect( bits, row0, col0, height, LINE1_WIDTH, 1 - color );
-	col0 = rect( bits, row0, col0, height, LINE1_WIDTH, color );
-	col0 = rect( bits, row0, col0, height, LINE2_WIDTH, 1 - color );
-	break;
-
-	default:
-	pm_error( "can't happen" );
-	}
+        {
+        case 0:
+        col0 = rect( bits, row0, col0, height, LINE3_WIDTH, color );
+        col0 = rect( bits, row0, col0, height, LINE2_WIDTH, 1 - color );
+        col0 = rect( bits, row0, col0, height, LINE1_WIDTH, color );
+        col0 = rect( bits, row0, col0, height, LINE1_WIDTH, 1 - color );
+        break;
+
+        case 1:
+        col0 = rect( bits, row0, col0, height, LINE2_WIDTH, color );
+        col0 = rect( bits, row0, col0, height, LINE2_WIDTH, 1 - color );
+        col0 = rect( bits, row0, col0, height, LINE2_WIDTH, color );
+        col0 = rect( bits, row0, col0, height, LINE1_WIDTH, 1 - color );
+        break;
+
+        case 2:
+        col0 = rect( bits, row0, col0, height, LINE2_WIDTH, color );
+        col0 = rect( bits, row0, col0, height, LINE1_WIDTH, 1 - color );
+        col0 = rect( bits, row0, col0, height, LINE2_WIDTH, color );
+        col0 = rect( bits, row0, col0, height, LINE2_WIDTH, 1 - color );
+        break;
+
+        case 3:
+        col0 = rect( bits, row0, col0, height, LINE1_WIDTH, color );
+        col0 = rect( bits, row0, col0, height, LINE4_WIDTH, 1 - color );
+        col0 = rect( bits, row0, col0, height, LINE1_WIDTH, color );
+        col0 = rect( bits, row0, col0, height, LINE1_WIDTH, 1 - color );
+        break;
+
+        case 4:
+        col0 = rect( bits, row0, col0, height, LINE1_WIDTH, color );
+        col0 = rect( bits, row0, col0, height, LINE1_WIDTH, 1 - color );
+        col0 = rect( bits, row0, col0, height, LINE3_WIDTH, color );
+        col0 = rect( bits, row0, col0, height, LINE2_WIDTH, 1 - color );
+        break;
+
+        case 5:
+        col0 = rect( bits, row0, col0, height, LINE1_WIDTH, color );
+        col0 = rect( bits, row0, col0, height, LINE2_WIDTH, 1 - color );
+        col0 = rect( bits, row0, col0, height, LINE3_WIDTH, color );
+        col0 = rect( bits, row0, col0, height, LINE1_WIDTH, 1 - color );
+        break;
+
+        case 6:
+        col0 = rect( bits, row0, col0, height, LINE1_WIDTH, color );
+        col0 = rect( bits, row0, col0, height, LINE1_WIDTH, 1 - color );
+        col0 = rect( bits, row0, col0, height, LINE1_WIDTH, color );
+        col0 = rect( bits, row0, col0, height, LINE4_WIDTH, 1 - color );
+        break;
+
+        case 7:
+        col0 = rect( bits, row0, col0, height, LINE1_WIDTH, color );
+        col0 = rect( bits, row0, col0, height, LINE3_WIDTH, 1 - color );
+        col0 = rect( bits, row0, col0, height, LINE1_WIDTH, color );
+        col0 = rect( bits, row0, col0, height, LINE2_WIDTH, 1 - color );
+        break;
+
+        case 8:
+        col0 = rect( bits, row0, col0, height, LINE1_WIDTH, color );
+        col0 = rect( bits, row0, col0, height, LINE2_WIDTH, 1 - color );
+        col0 = rect( bits, row0, col0, height, LINE1_WIDTH, color );
+        col0 = rect( bits, row0, col0, height, LINE3_WIDTH, 1 - color );
+        break;
+
+        case 9:
+        col0 = rect( bits, row0, col0, height, LINE3_WIDTH, color );
+        col0 = rect( bits, row0, col0, height, LINE1_WIDTH, 1 - color );
+        col0 = rect( bits, row0, col0, height, LINE1_WIDTH, color );
+        col0 = rect( bits, row0, col0, height, LINE2_WIDTH, 1 - color );
+        break;
+
+        default:
+        pm_error( "can't happen" );
+        }
 
     return col0;
     }
@@ -521,7 +521,7 @@ rect( bit** bits, int row0, int col0, int height, int width, bit color )
     int row, col;
 
     for ( row = row0; row < row0 + height; row++ )
-	for ( col = col0; col < col0 + width; col++ )
-	    bits[row][col] = color;
+        for ( col = col0; col < col0 + width; col++ )
+            bits[row][col] = color;
     return col0 + width;
     }
diff --git a/generator/pgmkernel.c b/generator/pgmkernel.c
index 37072c38..cbae0882 100644
--- a/generator/pgmkernel.c
+++ b/generator/pgmkernel.c
@@ -39,11 +39,11 @@ static void
 parseCommandLine(int argc, const char ** argv,
                  struct CmdlineInfo * const cmdlineP) {
 /*----------------------------------------------------------------------------
-  Convert program invocation arguments (argc,argv) into a format the 
+  Convert program invocation arguments (argc,argv) into a format the
   program can use easily, struct cmdlineInfo.  Validate arguments along
   the way and exit program with message if invalid.
 
-  Note that some string information we return as *cmdlineP is in the storage 
+  Note that some string information we return as *cmdlineP is in the storage
   argv[] points to.
 -----------------------------------------------------------------------------*/
     optEntry *option_def;
@@ -57,9 +57,9 @@ parseCommandLine(int argc, const char ** argv,
     MALLOCARRAY_NOFAIL(option_def, 100);
 
     option_def_index = 0;   /* incremented by OPTENTRY */
-    OPTENT3(0,   "weight",  OPT_FLOAT, &cmdlineP->weight, 
+    OPTENT3(0,   "weight",  OPT_FLOAT, &cmdlineP->weight,
             &weightSpec,     0);
-    OPTENT3(0,   "maxval",  OPT_UINT, &cmdlineP->maxval, 
+    OPTENT3(0,   "maxval",  OPT_UINT, &cmdlineP->maxval,
             &maxvalSpec,     0);
 
     opt.opt_table = option_def;
diff --git a/generator/pgmmake.c b/generator/pgmmake.c
index ae706639..6fd8d426 100644
--- a/generator/pgmmake.c
+++ b/generator/pgmmake.c
@@ -52,11 +52,11 @@ static void
 parseCommandLine(int argc, const char ** argv,
                  struct CmdlineInfo * const cmdlineP) {
 /*----------------------------------------------------------------------------
-  Convert program invocation arguments (argc,argv) into a format the 
+  Convert program invocation arguments (argc,argv) into a format the
   program can use easily, struct cmdlineInfo.  Validate arguments along
   the way and exit program with message if invalid.
 
-  Note that some string information we return as *cmdlineP is in the storage 
+  Note that some string information we return as *cmdlineP is in the storage
   argv[] points to.
 -----------------------------------------------------------------------------*/
     optEntry * option_def;
diff --git a/generator/ppmcolors.c b/generator/ppmcolors.c
index 701812d1..ecbadf72 100644
--- a/generator/ppmcolors.c
+++ b/generator/ppmcolors.c
@@ -3,7 +3,7 @@
 *******************************************************************************
   Generate a color map containing all the colors representable with a certain
   maxval.
-  
+
   THIS PROGRAM IS OBSOLETE.  USE PAMSEQ INSTEAD.  WE KEEP THIS AROUND
   FOR BACKWARD COMPATIBILITY.
 
@@ -18,7 +18,7 @@ struct cmdlineInfo {
     /* All the information the user supplied in the command line,
        in a form easy for the program to use.
     */
-    unsigned int maxval;   
+    unsigned int maxval;
 };
 
 
@@ -34,9 +34,9 @@ parseCommandLine(int argc, char ** argv, struct cmdlineInfo *cmdlineP) {
     unsigned int option_def_index;
 
     option_def_index = 0;   /* incremented by OPTENT3 */
-    OPTENT3(0,   "maxval",       OPT_UINT,   
+    OPTENT3(0,   "maxval",       OPT_UINT,
             &cmdlineP->maxval,  NULL, 0);
-    
+
 
     opt.opt_table = option_def;
     opt.short_allowed = FALSE;  /* We have no short (old-fashioned) options */
@@ -76,7 +76,7 @@ main(int argc, char *argv[]) {
 
     rc = system(cmd);
 
-    if (rc != 0) 
+    if (rc != 0)
         pm_error("pamseq|pamtopnm pipeline failed.  system() rc = %d", rc);
 
     pm_strfree(cmd);