Index: /trunk/Ohana/src/addstar/src/FilterStars.c
===================================================================
--- /trunk/Ohana/src/addstar/src/FilterStars.c	(revision 15513)
+++ /trunk/Ohana/src/addstar/src/FilterStars.c	(revision 15514)
@@ -4,5 +4,5 @@
 
   int j, N;
-  float MTIME, dMs;
+  float MTIME, dMs, dMx;
   Stars *stars;
   float RMIN, RMAX, DMIN, DMAX;
Index: /trunk/Ohana/src/addstar/src/ReadImageHeader.c
===================================================================
--- /trunk/Ohana/src/addstar/src/ReadImageHeader.c	(revision 15513)
+++ /trunk/Ohana/src/addstar/src/ReadImageHeader.c	(revision 15514)
@@ -154,5 +154,5 @@
   /* secz is in units milli-airmass */
   image[0].Mcal = 0.0;
-  image[0].Xm   = NO_MAG;
+  image[0].Xm   = NAN_S_SHORT;
   image[0].code = 0;
   memset (image[0].dummy, 0, sizeof(image[0].dummy));
Index: /trunk/Ohana/src/addstar/src/ReadStarsFITS.c
===================================================================
--- /trunk/Ohana/src/addstar/src/ReadStarsFITS.c	(revision 15513)
+++ /trunk/Ohana/src/addstar/src/ReadStarsFITS.c	(revision 15514)
@@ -176,5 +176,5 @@
     stars[i].dY      = ps1data[i].dY;
     if ((ps1data[i].M >= 0.0) || isnan(ps1data[i].M)) {
-	stars[i].M   = 0.001*NO_MAG;
+	stars[i].M   = NAN;
     } else {
 	stars[i].M   = ps1data[i].M + ZeroPt;
Index: /trunk/Ohana/src/addstar/src/getgsc.c
===================================================================
--- /trunk/Ohana/src/addstar/src/getgsc.c	(revision 15513)
+++ /trunk/Ohana/src/addstar/src/getgsc.c	(revision 15514)
@@ -71,5 +71,5 @@
 
       dparse (&stars[Nstars].M, 3, &buffer[Nbyte]);
-      stars[Nstars].dM 	  = NO_ERR;
+      stars[Nstars].dM 	  = NAN;
       stars[Nstars].t  	  = 0;
       stars[Nstars].code  = GSC_M;
Index: /trunk/Ohana/src/addstar/src/getusno.c
===================================================================
--- /trunk/Ohana/src/addstar/src/getusno.c	(revision 15513)
+++ /trunk/Ohana/src/addstar/src/getusno.c	(revision 15514)
@@ -113,5 +113,5 @@
       stars[Nusno].R     = buf[0]/360000.0;
       stars[Nusno].D     = buf[1]/360000.0 - 90.0;
-      stars[Nusno].dM    = NO_ERR;
+      stars[Nusno].dM    = NAN;
       stars[Nusno].t     = 0;
       stars[Nusno].found = -1;
Index: /trunk/Ohana/src/libdvo/include/dvo.h
===================================================================
--- /trunk/Ohana/src/libdvo/include/dvo.h	(revision 15513)
+++ /trunk/Ohana/src/libdvo/include/dvo.h	(revision 15514)
@@ -57,6 +57,6 @@
 } DVO_INT_NAN;
 
-# ifndef (NAN)
-# ifndef (BYTE_SWAP)
+# ifndef NAN
+# ifndef BYTE_SWAP
 #  define __nan_bytes           { 0x7f, 0xc0, 0, 0 }
 # else
Index: /trunk/Ohana/src/libdvo/src/dvo_photcode_ops.c
===================================================================
--- /trunk/Ohana/src/libdvo/src/dvo_photcode_ops.c	(revision 15513)
+++ /trunk/Ohana/src/libdvo/src/dvo_photcode_ops.c	(revision 15514)
@@ -393,5 +393,5 @@
     m2 = (Ns == -1) ? NAN : secfilt[Ns].M;
   }	
-  mc = (isnan(m1)) || isnan(m2))) ? NAN : (m1 - m2);
+  mc = (isnan(m1) || isnan(m2)) ? NAN : (m1 - m2);
   return (mc);
 }
Index: /trunk/Ohana/src/opihi/cmd.data/histogram.c
===================================================================
--- /trunk/Ohana/src/opihi/cmd.data/histogram.c	(revision 15513)
+++ /trunk/Ohana/src/opihi/cmd.data/histogram.c	(revision 15514)
@@ -37,4 +37,5 @@
   V = xvec[0].elements;
   for (i = 0; i < xvec[0].Nelements; i++, V++) {
+    if (isnan(*V)) continue;
     bin = MIN (MAX (0, (*V - start) / delta), Nbins - 1);
     yvec[0].elements[bin] += 1.0;
Index: /trunk/Ohana/src/relphot/src/MosaicOps.c
===================================================================
--- /trunk/Ohana/src/relphot/src/MosaicOps.c	(revision 15513)
+++ /trunk/Ohana/src/relphot/src/MosaicOps.c	(revision 15514)
@@ -451,5 +451,5 @@
   int i, j, m, c, n, N;
   double *list, *dlist;
-  float Mcal;
+  float Mcal, Mgrid, Mrel;
   StatType stats;
 
Index: /trunk/Ohana/src/relphot/src/StarOps.c
===================================================================
--- /trunk/Ohana/src/relphot/src/StarOps.c	(revision 15513)
+++ /trunk/Ohana/src/relphot/src/StarOps.c	(revision 15514)
@@ -345,5 +345,5 @@
   int i, j, k, m, n, N, Ntot;
   double *list, *dlist;
-  float Mcal, Mmos;
+  float Mcal, Mmos, Mgrid;
   StatType stats;
 
