Index: trunk/pswarp/src/pswarpTransformReadout_Threaded.c
===================================================================
--- trunk/pswarp/src/pswarpTransformReadout_Threaded.c	(revision 18839)
+++ trunk/pswarp/src/pswarpTransformReadout_Threaded.c	(revision 18884)
@@ -23,11 +23,11 @@
 
     // output mask bits
-    psMaskType maskIn   = psMetadataLookupU8(&mdok, recipe, "MASK.INPUT"); 
-    psMaskType maskPoor = pmConfigMaskGet("POOR.WARP", config); 
-    psMaskType maskBad  = pmConfigMaskGet("BAD.WARP", config); 
+    psMaskType maskIn   = psMetadataLookupU8(&mdok, recipe, "MASK.INPUT");
+    psMaskType maskPoor = pmConfigMaskGet("POOR.WARP", config);
+    psMaskType maskBad  = pmConfigMaskGet("BAD.WARP", config);
     psAssert (mdok, "MASK.INPUT was not defined");
 
     // Flux fraction for "poor"
-    float poorFrac = psMetadataLookupF32(NULL, config->arguments, "POOR.FRAC"); 
+    float poorFrac = psMetadataLookupF32(NULL, config->arguments, "POOR.FRAC");
 
     // find the output pixel range
@@ -58,15 +58,15 @@
 
     // Interpolation options
-    psImageInterpolateOptions *interp = psImageInterpolateOptionsAlloc(interpolationMode, inImage, 
+    psImageInterpolateOptions *interp = psImageInterpolateOptionsAlloc(interpolationMode, inImage,
                                                                        inVar, inMask, maskIn, NAN, NAN,
                                                                        maskBad, maskPoor, poorFrac);
 
     if (inVar && !output->weight) {
-	output->weight = psImageAlloc(output->image->numCols, output->image->numRows, PS_TYPE_F32);
-	psImageInit(output->weight, NAN);
+        output->weight = psImageAlloc(output->image->numCols, output->image->numRows, PS_TYPE_F32);
+        psImageInit(output->weight, NAN);
     }
     if ((inMask || maskPoor || maskBad) && !output->mask) {
-	output->mask = psImageAlloc(output->image->numCols, output->image->numRows, PS_TYPE_MASK);
-	psImageInit(output->mask, maskBad);
+        output->mask = psImageAlloc(output->image->numCols, output->image->numRows, PS_TYPE_MASK);
+        psImageInit(output->mask, maskBad);
     }
 
@@ -76,42 +76,41 @@
     // create jobs and supply them to the threads
     for (gridY = 0; gridY < nGridX; gridY++) {
-	for (gridX = 0; gridX < nGridY; gridX++) {
-
-	    pswarpTransformTileArgs *args = pswarpTransformTileArgsAlloc();
-
-	    // these items are just views to the data; they are not freed with args
-	    args->input = input;
-	    args->output = output;
-	    args->grid = grid;
-	    args->interp = interp;
-	    args->region = region;
-
-	    args->gridX = gridX;
-	    args->gridY = gridY;
-	    args->goodPixels = 0;
-
-# if (THREADED)	    
-	    // allocate a job
-	    psThreadJob *job = psThreadJobAlloc ("PSWARP_TRANSFORM_TILE", 0);
-
-	    // construct the arguments for this job
-	    // job is pswarpTransformTile (gridX, gridY);
-	    psArrayAdd (job->args, 1, args);
-	    psThreadJobAddPending (job);
+        for (gridX = 0; gridX < nGridY; gridX++) {
+
+            pswarpTransformTileArgs *args = pswarpTransformTileArgsAlloc();
+
+            // these items are just views to the data; they are not freed with args
+            args->input = input;
+            args->output = output;
+            args->grid = grid;
+            args->interp = interp;
+            args->region = region;
+
+            args->gridX = gridX;
+            args->gridY = gridY;
+            args->goodPixels = 0;
+
+# if (THREADED)
+            // allocate a job
+            psThreadJob *job = psThreadJobAlloc ("PSWARP_TRANSFORM_TILE", 0);
+
+            // construct the arguments for this job
+            // job is pswarpTransformTile (gridX, gridY);
+            psArrayAdd (job->args, 1, args);
+            psThreadJobAddPending (job);
 # else
-	    pswarpTransformTile (args);
-	    goodPixels += args->goodPixels;
+            pswarpTransformTile (args);
+            goodPixels += args->goodPixels;
 # endif
-	    psFree (args);
-	}
-    }
-
-# if (THREADED)	    
+            psFree (args);
+        }
+    }
+
+# if (THREADED)
     // wait here for the threaded jobs to finish
     if (!psThreadPoolWait ()) {
-	psError(PS_ERR_UNKNOWN, false, "Unable to interpolate image.");
-	return false;
-    }
-    fprintf (stderr, "success for threaded jobs\n");
+        psError(PS_ERR_UNKNOWN, false, "Unable to interpolate image.");
+        return false;
+    }
 
     // each job records its own goodPixel values; sum them here
@@ -119,7 +118,7 @@
     psThreadJob *job = NULL;
     while ((job = psThreadJobGetDone()) != NULL) {
-	pswarpTransformTileArgs *args = job->args->data[0];
-	goodPixels += args->goodPixels;
-	psFree (job);
+        pswarpTransformTileArgs *args = job->args->data[0];
+        goodPixels += args->goodPixels;
+        psFree (job);
     }
 # endif
