Index: trunk/Ohana/src/opihi/dvo/gstar.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/gstar.c	(revision 7680)
+++ trunk/Ohana/src/opihi/dvo/gstar.c	(revision 7917)
@@ -1,5 +1,5 @@
 # include "dvoshell.h"
 
-void print_value (FILE *f, double value, short int ival);
+void print_value (double value, short int ival);
 void initPhotcodeSequence (int Nsec);
 void freePhotcodeSequence ();
@@ -50,5 +50,5 @@
 
   if (argc != 4) {
-    fprintf (stderr, "USAGE: gstar RA DEC Radius [-m]\n");
+    gprint (GP_ERR, "USAGE: gstar RA DEC Radius [-m]\n");
     return (FALSE);
   }
@@ -68,5 +68,5 @@
 
   if (skylist[0].Nregions > 1) {
-    fprintf (stderr, "warning, radius overlaps region boundary, not yet implemented\n");
+    gprint (GP_ERR, "warning, radius overlaps region boundary, not yet implemented\n");
   }
 
@@ -142,6 +142,6 @@
       k = N1[i];
       if (!QUIET) {
-	fprintf (GetOutfile(), "star: %d\n", k);
-	fprintf (GetOutfile(), "%9.5f %9.5f %3d of %3d  %4.1f %5d\n", catalog.average[k].R, catalog.average[k].D, 
+	gprint (GP_LOG, "star: %d\n", k);
+	gprint (GP_LOG, "%9.5f %9.5f %3d of %3d  %4.1f %5d\n", catalog.average[k].R, catalog.average[k].D, 
 		 catalog.average[k].Nm, catalog.average[k].Nn + catalog.average[k].Nm,
 		 0.01*catalog.average[k].Xp, catalog.average[k].code);
@@ -149,17 +149,17 @@
 	/* filter names */
 	for (j = 0; j < Nsec + 1; j++) printPhotcodeSequence (&catalog.average[k], &catalog.secfilt[Nsec*k], j, 3);
-	fprintf (GetOutfile (), "\n");
+	gprint (GP_LOG, "\n");
 
 	/* average mags */
 	for (j = 0; j < Nsec + 1; j++) printPhotcodeSequence (&catalog.average[k], &catalog.secfilt[Nsec*k], j, 0);
-	fprintf (GetOutfile(), "\n");
+	gprint (GP_LOG, "\n");
 
 	/* average mag errors */
 	for (j = 0; j < Nsec + 1; j++) printPhotcodeSequence (&catalog.average[k], &catalog.secfilt[Nsec*k], j, 1);
-	fprintf (GetOutfile(), "\n");
+	gprint (GP_LOG, "\n");
 
 	/* average mag chisq */
 	for (j = 0; j < Nsec + 1; j++) printPhotcodeSequence (&catalog.average[k], &catalog.secfilt[Nsec*k], j, 2);
-	fprintf (GetOutfile(), "\n");
+	gprint (GP_LOG, "\n");
       }
 
@@ -173,5 +173,5 @@
 	  if (GetMeasures && !QUIET) {
 	    date = sec_to_date (catalog.measure[m].t);
-	    fprintf (GetOutfile(), "%6.3f %6.3f %5.3f  %20s  %5.2f %5.2f %2d %3x %3d %-20s\n", 
+	    gprint (GP_LOG, "%6.3f %6.3f %5.3f  %20s  %5.2f %5.2f %2d %3x %3d %-20s\n", 
 		     Mcat, Mrel, catalog.measure[m].dM_PS,
 		     date, catalog.measure[m].dR_PS, catalog.measure[m].dD_PS,
@@ -219,9 +219,9 @@
 }
 
-void print_value (FILE *f, double value, short int ival) {
+void print_value (double value, short int ival) {
   if (ival == NO_MAG) 
-    fprintf (f, "NaN    ");
+    gprint (GP_LOG, "NaN    ");
   else 
-    fprintf (f, "%6.3f ", value);
+    gprint (GP_LOG, "%6.3f ", value);
 }
 
@@ -265,7 +265,7 @@
     case 0: /* average mags */
       if (seq == -1) {
-	print_value (GetOutfile(), average[0].M, average[0].M);
+	print_value (average[0].M, average[0].M);
       } else {
-	print_value (GetOutfile(), secfilt[seq].M_PS, secfilt[seq].M_PS);
+	print_value (secfilt[seq].M_PS, secfilt[seq].M_PS);
       }
       break;
@@ -273,7 +273,7 @@
     case 1: /* average mags errors */
       if (seq == -1) {
-	print_value (GetOutfile(), average[0].dM, average[0].dM);
+	print_value (average[0].dM, average[0].dM);
       } else {
-	print_value (GetOutfile(), secfilt[seq].dM_PS, secfilt[seq].dM_PS);
+	print_value (secfilt[seq].dM_PS, secfilt[seq].dM_PS);
       }
       break;
@@ -281,7 +281,7 @@
     case 2: /* average mag chisq */
       if (seq == -1) {
-	print_value (GetOutfile(), pow (10.0, 0.01*average[0].Xm), average[0].Xm);
+	print_value (pow (10.0, 0.01*average[0].Xm), average[0].Xm);
       } else {
-	print_value (GetOutfile(), pow (10.0, 0.01*secfilt[seq].Xm), secfilt[seq].Xm);
+	print_value (pow (10.0, 0.01*secfilt[seq].Xm), secfilt[seq].Xm);
       }
       break;
@@ -289,6 +289,6 @@
     case 3: /* filter names */
       code = GetPhotcodebyNsec (seq + 1);
-      fprintf (GetOutfile (), "%6s ", code[0].name);
-      break;
-  }
-}
+      gprint (GP_LOG, "%6s ", code[0].name);
+      break;
+  }
+}
