Index: /trunk/psphot/src/psphotParseCamera.c
===================================================================
--- /trunk/psphot/src/psphotParseCamera.c	(revision 19140)
+++ /trunk/psphot/src/psphotParseCamera.c	(revision 19141)
@@ -10,6 +10,6 @@
     pmFPAfile *load = pmFPAfileDefineFromArgs (&status, config, "PSPHOT.LOAD", "INPUT");
     if (!status) {
-	psError(PSPHOT_ERR_CONFIG, false, "Failed to build FPA from PSPHOT.LOAD");
-	return status;
+        psError(PSPHOT_ERR_CONFIG, false, "Failed to build FPA from PSPHOT.LOAD");
+        return status;
     }
     load->dataLevel = PM_FPA_LEVEL_CHIP; // force load at the CHIP level
@@ -17,32 +17,18 @@
     // if MASK or WEIGHT was supplied on command line, bind files to 'load'
     // the mask and weight will be mosaicked with the image
-    pmFPAfile *mask = pmFPAfileBindFromArgs (&status, load, config, "PSPHOT.MASK", "MASK");
+    pmFPAfileBindFromArgs (&status, load, config, "PSPHOT.MASK", "MASK");
     if (!status) {
-	psError (PS_ERR_UNKNOWN, false, "failed to load find definition");
-	return NULL;
-    }
-    if (mask) {
-	// XXX need to load the mask bit names from one of the headers
-	// this grabs the first available hdu : no guarantee that it will be valid, though
-	pmHDU *hdu = pmHDUGetFirst (mask->fpa);
-	if (!hdu) {
-	    psError(PS_ERR_IO, true, "no valid HDU for PSPHOT.MASK");
-	    return NULL;
-	}
-	// XXX should this be done in pmFPAfileIO.c read functions?
-	if (!pmConfigMaskReadHeader (config, hdu->header)) {
-	    psError(PS_ERR_IO, false, "error in mask bits");
-	    return NULL;
-	}
+        psError (PS_ERR_UNKNOWN, false, "failed to load find definition");
+        return NULL;
     }
     if (!psphotSetMaskBits (config)) {
-	psError (PS_ERR_UNKNOWN, false, "failed to set mask bit values");
-	return NULL;
+        psError (PS_ERR_UNKNOWN, false, "failed to set mask bit values");
+        return NULL;
     }
-    
+
     pmFPAfileBindFromArgs (&status, load, config, "PSPHOT.WEIGHT", "WEIGHT");
     if (!status) {
-	psError (PS_ERR_UNKNOWN, false, "failed to load find definition");
-	return NULL;
+        psError (PS_ERR_UNKNOWN, false, "failed to load find definition");
+        return NULL;
     }
 
@@ -54,8 +40,8 @@
     }
 
-    // define the additional input/output files associated with psphot 
+    // define the additional input/output files associated with psphot
     if (!psphotDefineFiles (config, input)) {
-	psError(PSPHOT_ERR_CONFIG, false, "Trouble defining the additional input/output files");
-	return false;
+        psError(PSPHOT_ERR_CONFIG, false, "Trouble defining the additional input/output files");
+        return false;
     }
 
@@ -64,12 +50,12 @@
     psArray *chips = psStringSplitArray (chipLine, ",", false);
     if (chips->n > 0) {
-	// select on the basis of extname?
-	pmFPASelectChip (load->fpa, -1, true); // deselect all chips
-	for (int i = 0; i < chips->n; i++) {
-	    int chipNum = atoi(chips->data[i]);
-	    if (! pmFPASelectChip(load->fpa, chipNum, false)) {
-		psError(PSPHOT_ERR_CONFIG, false, "Chip number %d doesn't exist in camera.\n", chipNum);
-		return false;
-	    }
+        // select on the basis of extname?
+        pmFPASelectChip (load->fpa, -1, true); // deselect all chips
+        for (int i = 0; i < chips->n; i++) {
+            int chipNum = atoi(chips->data[i]);
+            if (! pmFPASelectChip(load->fpa, chipNum, false)) {
+                psError(PSPHOT_ERR_CONFIG, false, "Chip number %d doesn't exist in camera.\n", chipNum);
+                return false;
+            }
         }
     }
@@ -77,5 +63,5 @@
     psTrace("psphot", 1, "Done with psphotParseCamera...\n");
 
-    psErrorClear();			// some metadata lookup may have failed
+    psErrorClear();                     // some metadata lookup may have failed
     return true;
 }
