Index: trunk/psphot/src/psphot-utils.c
===================================================================
--- trunk/psphot/src/psphot-utils.c	(revision 4216)
+++ trunk/psphot/src/psphot-utils.c	(revision 4251)
@@ -135,7 +135,8 @@
     psFitsWriteImage (fits, NULL, image, 0, NULL);
     psFree (fits);
-    return;
+    return true;
 }
 
+# if (0)
 void pmSourceMaskSaturated (psSource *source, float saturate) {
 
@@ -150,86 +151,5 @@
     }
 }
-
-// mask the area contained by the region
-// the region is defined wrt the parent image
-void psImageMaskRegion (psImage *image, psRegion *region, bool logical_and, int maskValue) {
-
-    for (int iy = 0; iy < image->numRows; iy++) {
-	for (int ix = 0; ix < image->numCols; ix++) {
-	    if (ix + image->col0 <  region->x0) continue;
-	    if (ix + image->col0 >= region->x1) continue;
-	    if (iy + image->row0 <  region->y0) continue;
-	    if (iy + image->row0 >= region->y1) continue;
-	    if (logical_and) {
-		image->data.U8[iy][ix] &= maskValue;
-	    } else {
-		image->data.U8[iy][ix] |= maskValue;
-	    }
-	}
-    }
-}
-
-// mask the area not contained by the region
-// the region is defined wrt the parent image
-void psImageKeepRegion (psImage *image, psRegion *region, bool logical_and, int maskValue) {
-
-    for (int iy = 0; iy < image->numRows; iy++) {
-	for (int ix = 0; ix < image->numCols; ix++) {
-	    if (ix + image->col0 <  region->x0) goto maskit;
-	    if (ix + image->col0 >= region->x1) goto maskit;
-	    if (iy + image->row0 <  region->y0) goto maskit;
-	    if (iy + image->row0 >= region->y1) goto maskit;
-	    continue;
-	maskit:
-	    if (logical_and) {
-		image->data.U8[iy][ix] &= maskValue;
-	    } else {
-		image->data.U8[iy][ix] |= maskValue;
-	    }
-	}
-    }
-}
-
-// mask the area contained by the region
-// the region is defined wrt the parent image
-void psImageMaskCircle (psImage *image, double x, double y, double radius, bool logical_and, int maskValue) {
-
-    double R2 = PS_SQR(radius);
-
-    for (int iy = 0; iy < image->numRows; iy++) {
-	for (int ix = 0; ix < image->numCols; ix++) {
-	    dx = ix + image->col0 - x;
-	    dy = iy + image->row0 - y;
-	    r2 = PS_SQR(dx) + PS_SQR(dy);
-	    if (r2 > R2) continue;
-	    if (logical_and) {
-		image->data.U8[iy][ix] &= maskValue;
-	    } else {
-		image->data.U8[iy][ix] |= maskValue;
-	    }
-	}
-    }
-}
-
-// mask the area contained by the region
-// the region is defined wrt the parent image
-void psImageKeepCircle (psImage *image, double x, double y, double radius, bool logical_and, int maskValue) {
-
-    double R2 = PS_SQR(radius);
-
-    for (int iy = 0; iy < image->numRows; iy++) {
-	for (int ix = 0; ix < image->numCols; ix++) {
-	    dx = ix + image->col0 - x;
-	    dy = iy + image->row0 - y;
-	    r2 = PS_SQR(dx) + PS_SQR(dy);
-	    if (r2 < R2) continue;
-	    if (logical_and) {
-		image->data.U8[iy][ix] &= maskValue;
-	    } else {
-		image->data.U8[iy][ix] |= maskValue;
-	    }
-	}
-    }
-}
+# endif
 
 // create a subset of sources for the PS_SOURCE_PSFSTAR entries
