Index: trunk/psastro/src/psastroMaskUpdates.Mosaic.c
===================================================================
--- trunk/psastro/src/psastroMaskUpdates.Mosaic.c	(revision 20650)
+++ trunk/psastro/src/psastroMaskUpdates.Mosaic.c	(revision 21183)
@@ -9,9 +9,9 @@
 pmCell *pmCellInChip (pmChip *chip, float x, float y);
 bool pmCellCoordsForChip (float *xCell, float *yCell, pmCell *cell, float xChip, float yChip);
-bool psastroMaskCircle (psImage *mask, char value, float x0, float y0, float dX, float dY);
-bool psastroMaskBox (psImage *mask, char value, float x0, float y0, float dL, float dW, float theta);
-void psastroMaskLine (psImage *mask, char value, double x1, double y1, double x2, double y2, int dW);
-void psastroMaskLineBresen (psImage *mask, char value, int X1, int Y1, int X2, int Y2, int dW, int swapcoords);
-void psastroMaskRectangle (psImage *mask, char value, int x0, int y0, int x1, int y1);
+bool psastroMaskCircle (psImage *mask, psImageMaskType value, float x0, float y0, float dX, float dY);
+bool psastroMaskBox (psImage *mask, psImageMaskType value, float x0, float y0, float dL, float dW, float theta);
+void psastroMaskLine (psImage *mask, psImageMaskType value, double x1, double y1, double x2, double y2, int dW);
+void psastroMaskLineBresen (psImage *mask, psImageMaskType value, int X1, int Y1, int X2, int Y2, int dW, int swapcoords);
+void psastroMaskRectangle (psImage *mask, psImageMaskType value, int x0, int y0, int x1, int y1);
 
 // create a mask or mask regions based on the collection of reference stars that are 
@@ -25,6 +25,6 @@
     float zeropt, exptime;
 
-    psMaskType maskValue  = pmConfigMaskGet("GHOST", config); // Mask value for ghost pixels
-    psMaskType maskBlank  = pmConfigMaskGet("BLANK", config); // Mask value for blank pixels
+    psImageMaskType maskValue  = pmConfigMaskGet("GHOST", config); // Mask value for ghost pixels
+    psImageMaskType maskBlank  = pmConfigMaskGet("BLANK", config); // Mask value for blank pixels
 
     // select the current recipe
@@ -342,5 +342,5 @@
 
 // XXX should be doing an OR
-bool psastroMaskCircle (psImage *mask, char value, float x0, float y0, float dX, float dY) {
+bool psastroMaskCircle (psImage *mask, psImageMaskType value, float x0, float y0, float dX, float dY) {
 
     // XXX need to worry about row0, col0
@@ -357,5 +357,5 @@
 	    if (r2 > 1.0) continue;
 	    
-	    mask->data.U8[jy][jx] |= value;
+	    mask->data.PS_TYPE_IMAGE_MASK_DATA[jy][jx] |= value;
 	}
     }
@@ -364,5 +364,5 @@
 
 // XXX should be doing an OR
-bool psastroMaskBox (psImage *mask, char value, float x0, float y0, float dL, float dW, float theta) {
+bool psastroMaskBox (psImage *mask, psImageMaskType value, float x0, float y0, float dL, float dW, float theta) {
 
     // draw a series of lines (from -0.5*dW to +0.5*dW) of length dL, starting at x0, y0, angle theta
@@ -379,5 +379,5 @@
 
 // identify the quadrant and draw the correct line
-void psastroMaskLine (psImage *mask, char value, double x1, double y1, double x2, double y2, int dW) {
+void psastroMaskLine (psImage *mask, psImageMaskType value, double x1, double y1, double x2, double y2, int dW) {
 
   int FlipDirect, FlipCoords;
@@ -408,5 +408,5 @@
 // use the Bresenham line drawing technique
 // integer-only Bresenham line-draw version which is fast
-void psastroMaskLineBresen (psImage *mask, char value, int X1, int Y1, int X2, int Y2, int dW, int swapcoords) {
+void psastroMaskLineBresen (psImage *mask, psImageMaskType value, int X1, int Y1, int X2, int Y2, int dW, int swapcoords) {
 
     int X, Y, dX, dY;
@@ -425,5 +425,5 @@
 		    if (y < 0) continue;
 		    if (y >= mask->numCols) continue;
-		    mask->data.U8[X][y] |= value;
+		    mask->data.PS_TYPE_IMAGE_MASK_DATA[X][y] |= value;
 		}
 	    } else {
@@ -432,5 +432,5 @@
 		    if (y < 0) continue;
 		    if (y >= mask->numRows) continue;
-		    mask->data.U8[y][X] |= value;
+		    mask->data.PS_TYPE_IMAGE_MASK_DATA[y][X] |= value;
 		}
 	    }
@@ -450,10 +450,10 @@
 }
 
-void psastroMaskRectangle (psImage *mask, char value, int x0, int y0, int x1, int y1) {
+void psastroMaskRectangle (psImage *mask, psImageMaskType value, int x0, int y0, int x1, int y1) {
     for (int iy = PS_MAX(0,y0); iy < PS_MIN(y1,mask->numRows); iy++) {
 	for (int ix = PS_MAX(0,x0); ix < PS_MIN(x1,mask->numCols); ix++) {
-	    mask->data.U8[iy][ix] |= value;
-	}
-    }
-}
-
+	    mask->data.PS_TYPE_IMAGE_MASK_DATA[iy][ix] |= value;
+	}
+    }
+}
+
