Index: trunk/Ohana/src/imregister/imphot/dumpfits.c
===================================================================
--- trunk/Ohana/src/imregister/imphot/dumpfits.c	(revision 5014)
+++ trunk/Ohana/src/imregister/imphot/dumpfits.c	(revision 7080)
@@ -27,17 +27,17 @@
 
   /* create primary header */
-  fits_init_header (&header);    
+  gfits_init_header (&header);    
   header.extend = TRUE;
-  fits_create_header (&header);
-  fits_create_matrix (&header, &matrix);
-  fits_print (&header, "NEXTEND", "%d", 1, 1);
+  gfits_create_header (&header);
+  gfits_create_matrix (&header, &matrix);
+  gfits_print (&header, "NEXTEND", "%d", 1, 1);
 
   ftable.header = &theader;
-  fits_table_set_Image (&ftable, subset, Nmatch);
+  gfits_table_set_Image (&ftable, subset, Nmatch);
 
-  fits_fwrite_header  (f, &header);
-  fits_fwrite_matrix  (f, &matrix);
-  fits_fwrite_Theader (f, &theader);
-  fits_fwrite_table   (f, &ftable);
+  gfits_fwrite_header  (f, &header);
+  gfits_fwrite_matrix  (f, &matrix);
+  gfits_fwrite_Theader (f, &theader);
+  gfits_fwrite_table   (f, &ftable);
   fclose (f);
   exit (0);
@@ -58,9 +58,9 @@
 
   /* create primary header */
-  fits_init_header (&header);    
+  gfits_init_header (&header);    
   header.extend = TRUE;
-  fits_create_header (&header);
-  fits_create_matrix (&header, &matrix);
-  fits_print (&header, "NEXTEND", "%d", 1, 1);
+  gfits_create_header (&header);
+  gfits_create_matrix (&header, &matrix);
+  gfits_print (&header, "NEXTEND", "%d", 1, 1);
   
   /* the ASCII table is always a little harder than the binary:
@@ -69,43 +69,43 @@
 
   /* create table header */
-  fits_create_table_header (&theader, "TABLE", "ZPTS");
+  gfits_create_table_header (&theader, "TABLE", "ZPTS");
 
   /* add current date/time to header */
   str_to_time ("now", &tsecond);
   datestr = sec_to_date (tsecond);
-  fits_modify (&header,  "DATE", "%s", 1, datestr);
-  fits_modify (&theader, "DATE", "%s", 1, datestr);
+  gfits_modify (&header,  "DATE", "%s", 1, datestr);
+  gfits_modify (&theader, "DATE", "%s", 1, datestr);
   
   /* define table layout */
-  fits_define_table_column (&theader, "A20",   "START_TIME", "start time of measurement", "yyyy/mm/dd,hh:mm:ss");
-  fits_define_table_column (&theader, "A10",   "FILTER",     "filter and camera name",    "");
-  fits_define_table_column (&theader, "F8.4",  "ZP_OBS",     "measured zero point",       "mag");
-  fits_define_table_column (&theader, "F7.4",  "ZP_ERR",     "error on zero point",       "mag");
-  fits_define_table_column (&theader, "F11.6", "RA",         "RA (J2000)",                "dec. degrees");
-  fits_define_table_column (&theader, "F11.6", "DEC",        "DEC (J2000)",               "dec. degrees");
-  fits_define_table_column (&theader, "F7.3",  "C_AIRMASS",  "airmass coeff",             "mag per airmass"); 
-  fits_define_table_column (&theader, "F7.1",  "SKY",        "median sky flux",           "counts");
-  fits_define_table_column (&theader, "I6",    "NSTAR",      "Number of stars in image",  "stars");
+  gfits_define_table_column (&theader, "A20",   "START_TIME", "start time of measurement", "yyyy/mm/dd,hh:mm:ss");
+  gfits_define_table_column (&theader, "A10",   "FILTER",     "filter and camera name",    "");
+  gfits_define_table_column (&theader, "F8.4",  "ZP_OBS",     "measured zero point",       "mag");
+  gfits_define_table_column (&theader, "F7.4",  "ZP_ERR",     "error on zero point",       "mag");
+  gfits_define_table_column (&theader, "F11.6", "RA",         "RA (J2000)",                "dec. degrees");
+  gfits_define_table_column (&theader, "F11.6", "DEC",        "DEC (J2000)",               "dec. degrees");
+  gfits_define_table_column (&theader, "F7.3",  "C_AIRMASS",  "airmass coeff",             "mag per airmass"); 
+  gfits_define_table_column (&theader, "F7.1",  "SKY",        "median sky flux",           "counts");
+  gfits_define_table_column (&theader, "I6",    "NSTAR",      "Number of stars in image",  "stars");
 
   /* define TNULL, TNVAL values */
-  fits_modify (&theader, "TNULL1",  "%s", 1, "NULL"); /* START_TIME */
-  fits_modify (&theader, "TNULL2",  "%s", 1, "NULL"); /* FILTER     */
-  fits_modify (&theader, "TNULL3",  "%s", 1, "NaN");  /* ZP_OBS     */
-  fits_modify (&theader, "TNULL4",  "%s", 1, "NaN");  /* ZP_ERR     */
-  fits_modify (&theader, "TNULL5",  "%s", 1, "NaN");  /* RA         */
-  fits_modify (&theader, "TNULL6",  "%s", 1, "NaN");  /* DEC        */
-  fits_modify (&theader, "TNULL7",  "%s", 1, "NaN");  /* C_AIRMASS  */
-  fits_modify (&theader, "TNULL8",  "%s", 1, "NaN");  /* SKY        */
-  fits_modify (&theader, "TNULL9",  "%s", 1,  "-1");  /* NSTAR      */
+  gfits_modify (&theader, "TNULL1",  "%s", 1, "NULL"); /* START_TIME */
+  gfits_modify (&theader, "TNULL2",  "%s", 1, "NULL"); /* FILTER     */
+  gfits_modify (&theader, "TNULL3",  "%s", 1, "NaN");  /* ZP_OBS     */
+  gfits_modify (&theader, "TNULL4",  "%s", 1, "NaN");  /* ZP_ERR     */
+  gfits_modify (&theader, "TNULL5",  "%s", 1, "NaN");  /* RA         */
+  gfits_modify (&theader, "TNULL6",  "%s", 1, "NaN");  /* DEC        */
+  gfits_modify (&theader, "TNULL7",  "%s", 1, "NaN");  /* C_AIRMASS  */
+  gfits_modify (&theader, "TNULL8",  "%s", 1, "NaN");  /* SKY        */
+  gfits_modify (&theader, "TNULL9",  "%s", 1,  "-1");  /* NSTAR      */
 
-  fits_modify (&theader, "TNVAL1",  "%s", 1, "NA");   /* START_TIME */
-  fits_modify (&theader, "TNVAL2",  "%s", 1, "NA");   /* FILTER     */
-  fits_modify (&theader, "TNVAL3",  "%s", 1, "Inf");  /* ZP_OBS     */
-  fits_modify (&theader, "TNVAL4",  "%s", 1, "Inf");  /* ZP_ERR     */
-  fits_modify (&theader, "TNVAL5",  "%s", 1, "Inf");  /* RA         */
-  fits_modify (&theader, "TNVAL6",  "%s", 1, "Inf");  /* DEC        */
-  fits_modify (&theader, "TNVAL7",  "%s", 1, "Inf");  /* C_AIRMASS  */
-  fits_modify (&theader, "TNVAL8",  "%s", 1, "Inf");  /* SKY        */
-  fits_modify (&theader, "TNVAL9",  "%s", 1,  "-2");  /* NSTAR      */
+  gfits_modify (&theader, "TNVAL1",  "%s", 1, "NA");   /* START_TIME */
+  gfits_modify (&theader, "TNVAL2",  "%s", 1, "NA");   /* FILTER     */
+  gfits_modify (&theader, "TNVAL3",  "%s", 1, "Inf");  /* ZP_OBS     */
+  gfits_modify (&theader, "TNVAL4",  "%s", 1, "Inf");  /* ZP_ERR     */
+  gfits_modify (&theader, "TNVAL5",  "%s", 1, "Inf");  /* RA         */
+  gfits_modify (&theader, "TNVAL6",  "%s", 1, "Inf");  /* DEC        */
+  gfits_modify (&theader, "TNVAL7",  "%s", 1, "Inf");  /* C_AIRMASS  */
+  gfits_modify (&theader, "TNVAL8",  "%s", 1, "Inf");  /* SKY        */
+  gfits_modify (&theader, "TNVAL9",  "%s", 1,  "-2");  /* NSTAR      */
 
   /* add data to table */
@@ -121,6 +121,6 @@
 
     /* we should get an error here if we don't construct this line correctly */
-    line = fits_table_print (&ftable, startstr, filtstr, zp, dzp, ra, dec, airmass, sky, subset[0].nstar);
-    fits_add_rows (&ftable, line, 1, strlen(line));
+    line = gfits_table_print (&ftable, startstr, filtstr, zp, dzp, ra, dec, airmass, sky, subset[0].nstar);
+    gfits_add_rows (&ftable, line, 1, strlen(line));
     free (line);
     free (startstr);
@@ -133,8 +133,8 @@
     exit (1);
   }
-  fits_fwrite_header  (f, &header);
-  fits_fwrite_matrix  (f, &matrix);
-  fits_fwrite_Theader (f, &theader);
-  fits_fwrite_table   (f, &ftable);
+  gfits_fwrite_header  (f, &header);
+  gfits_fwrite_matrix  (f, &matrix);
+  gfits_fwrite_Theader (f, &theader);
+  gfits_fwrite_table   (f, &ftable);
   fclose (f);
   return (TRUE);
