Index: /trunk/Ohana/src/delstar/src/gcatalog.c
===================================================================
--- /trunk/Ohana/src/delstar/src/gcatalog.c	(revision 5319)
+++ /trunk/Ohana/src/delstar/src/gcatalog.c	(revision 5320)
@@ -9,6 +9,6 @@
 
   /* read catalog header */
-  mode = LOAD_AVES | LOAD_MEAS | LOAD_MISS | LOAD_SECF;
-  if (!load_catalog (catalog, mode, VERBOSE)) {
+  catalog[0].catflags = LOAD_AVES | LOAD_MEAS | LOAD_MISS | LOAD_SECF;
+  if (!load_catalog (catalog, VERBOSE)) {
     fprintf (stderr, "ERROR: failure loading catalog\n");
     exit (1);
Index: /trunk/Ohana/src/gastro/src/gptolemy.c
===================================================================
--- /trunk/Ohana/src/gastro/src/gptolemy.c	(revision 5319)
+++ /trunk/Ohana/src/gastro/src/gptolemy.c	(revision 5320)
@@ -25,5 +25,6 @@
 
   /* CATMODE and CATFORMAT determined from catalog */
-  if (!load_catalog (&catalog, LOAD_AVES | LOAD_MEAS, FALSE)) {
+  catalog.catflags = LOAD_AVES | LOAD_MEAS;
+  if (!load_catalog (&catalog, FALSE)) {
     fprintf (stderr, "can't load catalog data\n");
     return (FALSE);
Index: /trunk/Ohana/src/gastro2/src/gptolemy2.c
===================================================================
--- /trunk/Ohana/src/gastro2/src/gptolemy2.c	(revision 5319)
+++ /trunk/Ohana/src/gastro2/src/gptolemy2.c	(revision 5320)
@@ -27,5 +27,6 @@
 
   /* CATMODE and CATFORMAT determined from catalog */
-  if (!load_catalog (&catalog, LOAD_AVES | LOAD_MEAS, FALSE)) {
+  catalog.catflags = LOAD_AVES | LOAD_MEAS;
+  if (!load_catalog (&catalog, FALSE)) {
     fprintf (stderr, "can't load catalog data %s\n", filename);
     return ((GSCdata *)NULL);
Index: /trunk/Ohana/src/libdvo/include/dvo.h
===================================================================
--- /trunk/Ohana/src/libdvo/include/dvo.h	(revision 5319)
+++ /trunk/Ohana/src/libdvo/include/dvo.h	(revision 5320)
@@ -145,4 +145,5 @@
   int catmode;				/* storage mode (raw, mef, split, mysql) */
   int catformat;			/* storage format (elixir, panstarrs, etc) */
+  int catflags;				/* choices to be loaded */
   int sorted;				/* is measure table average-sorted? */
   
@@ -181,5 +182,5 @@
 int lock_catalog (Catalog *catalog, int lockmode);
 int unlock_catalog (Catalog *catalog);
-int load_catalog (Catalog *catalog, char mode, int VERBOSE);
+int load_catalog (Catalog *catalog, int VERBOSE);
 int save_catalog (Catalog *catalog, char VERBOSE);
 int update_catalog (Catalog *catalog, char VERBOSE);
@@ -292,9 +293,9 @@
 int SecFiltToFtable (FTable *ftable, SecFilt *secfilt, int Nsecfilt, int format);
 
-int load_catalog_raw (Catalog *catalog, char mode, int VERBOSE);
+int load_catalog_raw (Catalog *catalog, int VERBOSE);
 int save_catalog_raw (Catalog *catalog, char VERBOSE);
-int load_catalog_mef (Catalog *catalog, char mode, int VERBOSE);
+int load_catalog_mef (Catalog *catalog, int VERBOSE);
 int save_catalog_mef (Catalog *catalog, char VERBOSE);
-int load_catalog_split (Catalog *catalog, char mode, int VERBOSE);
+int load_catalog_split (Catalog *catalog, int VERBOSE);
 int save_catalog_split (Catalog *catalog, char VERBOSE);
 int update_catalog_split (Catalog *catalog, char VERBOSE);
Index: /trunk/Ohana/src/libdvo/src/dvo_catalog.c
===================================================================
--- /trunk/Ohana/src/libdvo/src/dvo_catalog.c	(revision 5319)
+++ /trunk/Ohana/src/libdvo/src/dvo_catalog.c	(revision 5320)
@@ -35,5 +35,5 @@
 }
 
-int load_catalog (Catalog *catalog, char mode, int VERBOSE) {
+int load_catalog (Catalog *catalog, int VERBOSE) {
   
   int Naxis, split;
@@ -63,13 +63,13 @@
     case DVO_MODE_RAW:
       if (VERBOSE) fprintf (stderr, "reading catalog (mode DVO_MODE_RAW)\n");
-      load_catalog_raw (catalog, mode, VERBOSE);
+      load_catalog_raw (catalog, VERBOSE);
       break;
     case DVO_MODE_MEF:
       if (VERBOSE) fprintf (stderr, "reading catalog (mode DVO_MODE_MEF)\n");
-      load_catalog_mef (catalog, mode, VERBOSE);
+      load_catalog_mef (catalog, VERBOSE);
       break;
     case DVO_MODE_SPLIT:
       if (VERBOSE) fprintf (stderr, "reading catalog (mode DVO_MODE_SPLIT)\n");
-      load_catalog_split (catalog, mode, VERBOSE);
+      load_catalog_split (catalog, VERBOSE);
       break;
     default:
Index: /trunk/Ohana/src/libdvo/src/dvo_catalog_mef.c
===================================================================
--- /trunk/Ohana/src/libdvo/src/dvo_catalog_mef.c	(revision 5319)
+++ /trunk/Ohana/src/libdvo/src/dvo_catalog_mef.c	(revision 5320)
@@ -1,5 +1,5 @@
 # include <dvo.h>
 
-int load_catalog_mef (Catalog *catalog, char mode, int VERBOSE) {
+int load_catalog_mef (Catalog *catalog, int VERBOSE) {
   
   int Nitems, Nbytes, Nexpect, Naverage, Nmeasure, Nmissing, Nsecfilt;
@@ -39,5 +39,5 @@
   }
   /* read Average table data (or skip) */
-  if (mode & LOAD_AVES) {
+  if (catalog[0].catflags & LOAD_AVES) {
     if (!fits_fread_ftable_data (f, &ftable)) {
       if (VERBOSE) fprintf (stderr, "can't read table average data");
@@ -61,5 +61,5 @@
   }
   /* read Measure table data */
-  if (mode & LOAD_MEAS) {
+  if (catalog[0].catflags & LOAD_MEAS) {
     if (!fits_fread_ftable_data (f, &ftable)) {
       if (VERBOSE) fprintf (stderr, "can't read table measure data");
@@ -81,5 +81,5 @@
   }
   /* read Missing table data */
-  if (mode & LOAD_MISS) {
+  if (catalog[0].catflags & LOAD_MISS) {
     if (!fits_fread_ftable_data (f, &ftable)) {
       if (VERBOSE) fprintf (stderr, "can't read table missing data");
@@ -105,5 +105,5 @@
   }
   /* read secfilt table data */
-  if (mode & LOAD_SECF) {
+  if (catalog[0].catflags & LOAD_SECF) {
     if (!fits_fread_ftable_data (f, &ftable)) {
       if (VERBOSE) fprintf (stderr, "can't read table secfilt data");
Index: /trunk/Ohana/src/libdvo/src/dvo_catalog_raw.c
===================================================================
--- /trunk/Ohana/src/libdvo/src/dvo_catalog_raw.c	(revision 5319)
+++ /trunk/Ohana/src/libdvo/src/dvo_catalog_raw.c	(revision 5320)
@@ -3,5 +3,5 @@
 /* read data from raw-style catalog file; set data format values based on file */
 
-int load_catalog_raw (Catalog *catalog, char mode, int VERBOSE) {
+int load_catalog_raw (Catalog *catalog, int VERBOSE) {
   
   int Nitems, nitems;
@@ -113,5 +113,5 @@
 
   /* read and convert the averages (use a macro to clean this up?) */
-  if (mode & LOAD_AVES) {
+  if (catalog[0].catflags & LOAD_AVES) {
     catalog[0].average = ReadRawAverage (catalog[0].f, catalog[0].Naverage, catalog[0].catformat);
   } else {
@@ -122,5 +122,5 @@
   
   /* read and convert the measures (use a macro to clean this up?) */
-  if (mode & LOAD_MEAS) {
+  if (catalog[0].catflags & LOAD_MEAS) {
     catalog[0].measure = ReadRawMeasure (catalog[0].f, catalog[0].Nmeasure, catalog[0].catformat);
   } else {
@@ -131,5 +131,5 @@
 
   /* read and convert missing */
-  if (mode & LOAD_MISS) {
+  if (catalog[0].catflags & LOAD_MISS) {
     ALLOCATE (catalog[0].missing, Missing, MAX (catalog[0].Nmissing, 1));
     Nitems = catalog[0].Nmissing;
@@ -147,5 +147,5 @@
   
   /* read and convert secfilt */
-  if (mode & LOAD_SECF) {
+  if (catalog[0].catflags & LOAD_SECF) {
     Nitems = catalog[0].Naverage * catalog[0].Nsecfilt;
     catalog[0].secfilt = ReadRawSecFilt (catalog[0].f, Nitems, catalog[0].catformat);
@@ -160,5 +160,5 @@
 
   /* check data integrity */
-  if (mode & LOAD_AVES) {
+  if (catalog[0].catflags & LOAD_AVES) {
     for (i = Nmeas = Nmiss = 0; i < catalog[0].Naverage; i++) {
       Nmeas += catalog[0].average[i].Nm; 
Index: /trunk/Ohana/src/libdvo/src/dvo_catalog_split.c
===================================================================
--- /trunk/Ohana/src/libdvo/src/dvo_catalog_split.c	(revision 5319)
+++ /trunk/Ohana/src/libdvo/src/dvo_catalog_split.c	(revision 5320)
@@ -1,5 +1,5 @@
 # include <dvo.h>
 
-int load_catalog_split (Catalog *catalog, char mode, int VERBOSE) {
+int load_catalog_split (Catalog *catalog, int VERBOSE) {
 
   int Nitems, Nexpect, Naverage, Nmeasure, Nmissing, Nsecfilt;
@@ -36,5 +36,5 @@
   /*** Average Table ***/
 
-  if (mode & LOAD_AVES) {
+  if (catalog[0].catflags & LOAD_AVES) {
     /* move pointer past header -- must be already read (load_catalog) */
     fseek (catalog[0].f, catalog[0].header.size, SEEK_SET);
@@ -66,5 +66,5 @@
 
   /* (Full Load) */
-  if (mode & LOAD_MEAS) {
+  if (catalog[0].catflags & LOAD_MEAS) {
     ALLOCATE (measure, Catalog, 1);
 
@@ -111,5 +111,5 @@
 
   /* (Meta Load) */
-  if (mode & LOAD_MEAS_META) {
+  if (catalog[0].catflags & LOAD_MEAS_META) {
     ALLOCATE (measure, Catalog, 1);
 
@@ -143,5 +143,5 @@
 
   missing = NULL;
-  if (mode & LOAD_MISS) {
+  if (catalog[0].catflags & LOAD_MISS) {
     ALLOCATE (missing, Catalog, 1);
 
@@ -190,5 +190,5 @@
 
   secfilt = NULL;
-  if (mode & LOAD_SECF) {
+  if (catalog[0].catflags & LOAD_SECF) {
     ALLOCATE (secfilt, Catalog, 1);
   
Index: /trunk/Ohana/src/misc/src/applyscat.c
===================================================================
--- /trunk/Ohana/src/misc/src/applyscat.c	(revision 5319)
+++ /trunk/Ohana/src/misc/src/applyscat.c	(revision 5320)
@@ -2,10 +2,4 @@
 # include <dvo.h>
 # define BYTES_STAR 66
-
-typedef struct {
-  double X;
-  double Y;
-  double M;
-} Stars;
 
 int main (int argc, char **argv) {
Index: /trunk/Ohana/src/mosastro/src/gptolemy.c
===================================================================
--- /trunk/Ohana/src/mosastro/src/gptolemy.c	(revision 5319)
+++ /trunk/Ohana/src/mosastro/src/gptolemy.c	(revision 5320)
@@ -20,5 +20,6 @@
 
   /* CATMODE and CATFORMAT determined from catalog */
-  if (!load_catalog (&catalog, LOAD_AVES | LOAD_MEAS, FALSE)) {
+  catalog.catflags = LOAD_AVES | LOAD_MEAS;
+  if (!load_catalog (&catalog, FALSE)) {
     fprintf (stderr, "can't load catalog data %s\n", filename);
     *NSTARS = Nstars;
Index: /trunk/Ohana/src/opihi/dvo/avextract.c
===================================================================
--- /trunk/Ohana/src/opihi/dvo/avextract.c	(revision 5319)
+++ /trunk/Ohana/src/opihi/dvo/avextract.c	(revision 5320)
@@ -67,5 +67,6 @@
       continue;
     }
-    if (!load_catalog (&catalog, LOAD_AVES | LOAD_MEAS | LOAD_SECF, FALSE)) {
+    catalog.catflags = LOAD_AVES | LOAD_MEAS | LOAD_SECF;
+    if (!load_catalog (&catalog, FALSE)) {
       unlock_catalog (&catalog);
       continue;
Index: /trunk/Ohana/src/opihi/dvo/calextract.c
===================================================================
--- /trunk/Ohana/src/opihi/dvo/calextract.c	(revision 5319)
+++ /trunk/Ohana/src/opihi/dvo/calextract.c	(revision 5320)
@@ -73,5 +73,6 @@
       continue;
     }
-    if (!load_catalog (&catalog, LOAD_AVES | LOAD_MEAS | LOAD_SECF, FALSE)) {
+    catalog.catflags = LOAD_AVES | LOAD_MEAS | LOAD_SECF;
+    if (!load_catalog (&catalog, FALSE)) {
       unlock_catalog (&catalog);
       continue;
Index: /trunk/Ohana/src/opihi/dvo/calmextract.c
===================================================================
--- /trunk/Ohana/src/opihi/dvo/calmextract.c	(revision 5319)
+++ /trunk/Ohana/src/opihi/dvo/calmextract.c	(revision 5320)
@@ -86,5 +86,6 @@
       continue;
     }
-    if (!load_catalog (&catalog, LOAD_AVES | LOAD_MEAS | LOAD_SECF, FALSE)) {
+    catalog.catflags = LOAD_AVES | LOAD_MEAS | LOAD_SECF;
+    if (!load_catalog (&catalog, FALSE)) {
       unlock_catalog (&catalog);
       continue;
Index: /trunk/Ohana/src/opihi/dvo/catalog.c
===================================================================
--- /trunk/Ohana/src/opihi/dvo/catalog.c	(revision 5319)
+++ /trunk/Ohana/src/opihi/dvo/catalog.c	(revision 5320)
@@ -321,5 +321,6 @@
 	continue;
       }
-      if (!load_catalog (&catalog, LOAD_AVES, TRUE)) {
+      catalog.catflags = LOAD_AVES;
+      if (!load_catalog (&catalog, TRUE)) {
 	unlock_catalog (&catalog);
 	continue;
Index: /trunk/Ohana/src/opihi/dvo/ccd.c
===================================================================
--- /trunk/Ohana/src/opihi/dvo/ccd.c	(revision 5319)
+++ /trunk/Ohana/src/opihi/dvo/ccd.c	(revision 5320)
@@ -70,5 +70,6 @@
 	continue;
     }
-    if (!load_catalog (&catalog, LOAD_AVES | LOAD_MEAS | LOAD_SECF, FALSE)) {
+    catalog.catflags = LOAD_AVES | LOAD_MEAS | LOAD_SECF;
+    if (!load_catalog (&catalog, FALSE)) {
       unlock_catalog (&catalog);
       continue;
Index: /trunk/Ohana/src/opihi/dvo/cmatch.c
===================================================================
--- /trunk/Ohana/src/opihi/dvo/cmatch.c	(revision 5319)
+++ /trunk/Ohana/src/opihi/dvo/cmatch.c	(revision 5320)
@@ -40,5 +40,6 @@
     return (FALSE);
   }
-  if (!load_catalog (&catalog1, LOAD_AVES | LOAD_MEAS | LOAD_SECF, TRUE)) {
+  catalog1.catflags = LOAD_AVES | LOAD_MEAS | LOAD_SECF;
+  if (!load_catalog (&catalog1, TRUE)) {
     unlock_catalog (&catalog1);
     return (FALSE);
Index: /trunk/Ohana/src/opihi/dvo/cmd.c
===================================================================
--- /trunk/Ohana/src/opihi/dvo/cmd.c	(revision 5319)
+++ /trunk/Ohana/src/opihi/dvo/cmd.c	(revision 5320)
@@ -68,5 +68,6 @@
       continue;
     }
-    if (!load_catalog (&catalog, LOAD_AVES | LOAD_MEAS | LOAD_SECF, FALSE)) {
+    catalog.catflags = LOAD_AVES | LOAD_MEAS | LOAD_SECF;
+    if (!load_catalog (&catalog, FALSE)) {
       unlock_catalog (&catalog);
       continue;
Index: /trunk/Ohana/src/opihi/dvo/ddmags.c
===================================================================
--- /trunk/Ohana/src/opihi/dvo/ddmags.c	(revision 5319)
+++ /trunk/Ohana/src/opihi/dvo/ddmags.c	(revision 5320)
@@ -70,5 +70,6 @@
 	continue;
     }
-    if (!load_catalog (&catalog, LOAD_AVES | LOAD_MEAS | LOAD_SECF, FALSE)) {
+    catalog.catflags = LOAD_AVES | LOAD_MEAS | LOAD_SECF;
+    if (!load_catalog (&catalog, FALSE)) {
       unlock_catalog (&catalog);
       continue;
Index: /trunk/Ohana/src/opihi/dvo/dmagaves.c
===================================================================
--- /trunk/Ohana/src/opihi/dvo/dmagaves.c	(revision 5319)
+++ /trunk/Ohana/src/opihi/dvo/dmagaves.c	(revision 5320)
@@ -62,5 +62,6 @@
       continue;
     }
-    if (!load_catalog (&catalog, LOAD_AVES | LOAD_MEAS | LOAD_SECF, FALSE)) {
+    catalog.catflags = LOAD_AVES | LOAD_MEAS | LOAD_SECF;
+    if (!load_catalog (&catalog, FALSE)) {
       unlock_catalog (&catalog);
       continue;
Index: /trunk/Ohana/src/opihi/dvo/dmagmeas.c
===================================================================
--- /trunk/Ohana/src/opihi/dvo/dmagmeas.c	(revision 5319)
+++ /trunk/Ohana/src/opihi/dvo/dmagmeas.c	(revision 5320)
@@ -70,5 +70,6 @@
 	continue;
     }
-    if (!load_catalog (&catalog, LOAD_AVES | LOAD_MEAS | LOAD_SECF, FALSE)) {
+    catalog.catflags = LOAD_AVES | LOAD_MEAS | LOAD_SECF;
+    if (!load_catalog (&catalog, FALSE)) {
       unlock_catalog (&catalog);
       continue;
Index: /trunk/Ohana/src/opihi/dvo/dmags.c
===================================================================
--- /trunk/Ohana/src/opihi/dvo/dmags.c	(revision 5319)
+++ /trunk/Ohana/src/opihi/dvo/dmags.c	(revision 5320)
@@ -68,5 +68,6 @@
 	continue;
     }
-    if (!load_catalog (&catalog, LOAD_AVES | LOAD_MEAS | LOAD_SECF, FALSE)) {
+    catalog.catflags = LOAD_AVES | LOAD_MEAS | LOAD_SECF;
+    if (!load_catalog (&catalog, FALSE)) {
       unlock_catalog (&catalog);
       continue;
Index: /trunk/Ohana/src/opihi/dvo/dmt.c
===================================================================
--- /trunk/Ohana/src/opihi/dvo/dmt.c	(revision 5319)
+++ /trunk/Ohana/src/opihi/dvo/dmt.c	(revision 5320)
@@ -77,5 +77,6 @@
       continue;
     }
-    if (!load_catalog (&catalog, LOAD_AVES | LOAD_MEAS | LOAD_SECF, TRUE)) {
+    catalog.catflags = LOAD_AVES | LOAD_MEAS | LOAD_SECF;
+    if (!load_catalog (&catalog, TRUE)) {
       unlock_catalog (&catalog);
       continue;
Index: /trunk/Ohana/src/opihi/dvo/extract.c
===================================================================
--- /trunk/Ohana/src/opihi/dvo/extract.c	(revision 5319)
+++ /trunk/Ohana/src/opihi/dvo/extract.c	(revision 5320)
@@ -264,5 +264,6 @@
 	continue;
       }
-      if (!load_catalog (&catalog, loadmode, TRUE)) {
+      catalog.catflags = loadmode;
+      if (!load_catalog (&catalog, TRUE)) {
 	unlock_catalog (&catalog);
 	continue;
Index: /trunk/Ohana/src/opihi/dvo/fitcolors.c
===================================================================
--- /trunk/Ohana/src/opihi/dvo/fitcolors.c	(revision 5319)
+++ /trunk/Ohana/src/opihi/dvo/fitcolors.c	(revision 5320)
@@ -112,5 +112,6 @@
 	continue;
     }
-    if (!load_catalog (&catalog[k], LOAD_AVES | LOAD_MEAS | LOAD_SECF, TRUE)) {
+    catalog[k].catflags = LOAD_AVES | LOAD_MEAS | LOAD_SECF;
+    if (!load_catalog (&catalog[k], TRUE)) {
       catalog[k].Naverage = 0;
       unlock_catalog (&catalog[k]);
Index: /trunk/Ohana/src/opihi/dvo/gstar.c
===================================================================
--- /trunk/Ohana/src/opihi/dvo/gstar.c	(revision 5319)
+++ /trunk/Ohana/src/opihi/dvo/gstar.c	(revision 5320)
@@ -68,5 +68,6 @@
     return (FALSE);
   }
-  if (!load_catalog (&catalog, LOAD_AVES | LOAD_MEAS | LOAD_SECF, TRUE)) {
+  catalog.catflags = LOAD_AVES | LOAD_MEAS | LOAD_SECF;
+  if (!load_catalog (&catalog, TRUE)) {
     unlock_catalog (&catalog);
     return (FALSE);
Index: /trunk/Ohana/src/opihi/dvo/imdata.c
===================================================================
--- /trunk/Ohana/src/opihi/dvo/imdata.c	(revision 5319)
+++ /trunk/Ohana/src/opihi/dvo/imdata.c	(revision 5320)
@@ -122,5 +122,6 @@
       continue;
     }
-    if (!load_catalog (&catalog, LOAD_AVES, TRUE)) {
+    catalog.catflags = LOAD_AVES;
+    if (!load_catalog (&catalog, TRUE)) {
       unlock_catalog (&catalog);
       continue;
Index: /trunk/Ohana/src/opihi/dvo/lcurve.c
===================================================================
--- /trunk/Ohana/src/opihi/dvo/lcurve.c	(revision 5319)
+++ /trunk/Ohana/src/opihi/dvo/lcurve.c	(revision 5320)
@@ -88,5 +88,6 @@
     return (FALSE);
   }
-  if (!load_catalog (&catalog, LOAD_AVES | LOAD_MEAS, TRUE)) {
+  catalog.catflags = LOAD_AVES | LOAD_MEAS;
+  if (!load_catalog (&catalog, TRUE)) {
     unlock_catalog (&catalog);
     return (FALSE);
Index: /trunk/Ohana/src/opihi/dvo/lightcurve.c
===================================================================
--- /trunk/Ohana/src/opihi/dvo/lightcurve.c	(revision 5319)
+++ /trunk/Ohana/src/opihi/dvo/lightcurve.c	(revision 5320)
@@ -65,5 +65,6 @@
     return (FALSE);
   }
-  if (!load_catalog (&catalog, LOAD_AVES | LOAD_MEAS | LOAD_SECF, TRUE)) {
+  catalog.catflags = LOAD_AVES | LOAD_MEAS | LOAD_SECF;
+  if (!load_catalog (&catalog, TRUE)) {
     unlock_catalog (&catalog);
     return (FALSE);
Index: /trunk/Ohana/src/opihi/dvo/mextract.c
===================================================================
--- /trunk/Ohana/src/opihi/dvo/mextract.c	(revision 5319)
+++ /trunk/Ohana/src/opihi/dvo/mextract.c	(revision 5320)
@@ -69,5 +69,6 @@
       continue;
     }
-    if (!load_catalog (&catalog, LOAD_AVES | LOAD_MEAS | LOAD_SECF, FALSE)) {
+    catalog.catflags = LOAD_AVES | LOAD_MEAS | LOAD_SECF;
+    if (!load_catalog (&catalog, FALSE)) {
       unlock_catalog (&catalog);
       continue;
Index: /trunk/Ohana/src/opihi/dvo/pmeasure.c
===================================================================
--- /trunk/Ohana/src/opihi/dvo/pmeasure.c	(revision 5319)
+++ /trunk/Ohana/src/opihi/dvo/pmeasure.c	(revision 5320)
@@ -103,5 +103,6 @@
       continue;
     }
-    if (!load_catalog (&catalog, LOAD_AVES | LOAD_MEAS, TRUE)) {
+    catalog.catflags = LOAD_AVES | LOAD_MEAS;
+    if (!load_catalog (&catalog, TRUE)) {
       unlock_catalog (&catalog);
       continue;
Index: /trunk/Ohana/src/opihi/dvo/subpix.c
===================================================================
--- /trunk/Ohana/src/opihi/dvo/subpix.c	(revision 5319)
+++ /trunk/Ohana/src/opihi/dvo/subpix.c	(revision 5320)
@@ -50,5 +50,6 @@
     return (FALSE);
   }
-  if (!load_catalog (&catalog, LOAD_AVES | LOAD_MEAS, TRUE)) {
+  catalog.catflags = LOAD_AVES | LOAD_MEAS;
+  if (!load_catalog (&catalog, TRUE)) {
     unlock_catalog (&catalog);
     return (FALSE);
Index: /trunk/Ohana/src/opihi/include/data.h
===================================================================
--- /trunk/Ohana/src/opihi/include/data.h	(revision 5319)
+++ /trunk/Ohana/src/opihi/include/data.h	(revision 5320)
@@ -7,13 +7,4 @@
 # ifndef DATA_H
 # define DATA_H
-
-/* socket / pipe communication buffer */
-typedef struct {
-  char *buffer;
-  int   Nalloc;
-  int   Nreset;
-  int   Nblock;
-  int   Nbuffer;
-} IOBuffer;
 
 /*** typedef structs used by math functions ***/
@@ -26,11 +17,4 @@
 
 void InitData ();
-
-/* IOBuffersOps.c */
-int InitIOBuffer (IOBuffer *buffer, int Nalloc);
-int FlushIOBuffer (IOBuffer *buffer);
-int ReadtoIOBuffer (IOBuffer *buffer, int fd);
-int EmptyIOBuffer (IOBuffer *buffer, int Nmax, int fd);
-void FreeIOBuffer (IOBuffer *buffer);
 
 /* in queues.c */
Index: /trunk/Ohana/src/opihi/lib.data/Makefile
===================================================================
--- /trunk/Ohana/src/opihi/lib.data/Makefile	(revision 5319)
+++ /trunk/Ohana/src/opihi/lib.data/Makefile	(revision 5320)
@@ -37,5 +37,4 @@
 $(SDIR)/open_image.$(ARCH).o            \
 $(SDIR)/queues.$(ARCH).o		\
-$(SDIR)/IOBufferOps.$(ARCH).o           \
 $(SDIR)/PlotVectors.$(ARCH).o
 
Index: /trunk/Ohana/src/relphot/src/gcatalog.c
===================================================================
--- /trunk/Ohana/src/relphot/src/gcatalog.c	(revision 5319)
+++ /trunk/Ohana/src/relphot/src/gcatalog.c	(revision 5320)
@@ -6,12 +6,12 @@
 
   if (FINAL) {
-    mode = LOAD_AVES | LOAD_MEAS | LOAD_MISS | LOAD_SECF;
+    catalog[0].catflags = LOAD_AVES | LOAD_MEAS | LOAD_MISS | LOAD_SECF;
   } else {
-    mode = LOAD_AVES | LOAD_MEAS | LOAD_SECF;
+    catalog[0].catflags = LOAD_AVES | LOAD_MEAS | LOAD_SECF;
   }    
 
   /* CATMODE and CATFORMAT determined from catalog */
 
-  if (!load_catalog (catalog, mode, VERBOSE)) {
+  if (!load_catalog (catalog, VERBOSE)) {
     fprintf (stderr, "ERROR: failure loading catalog %s\n", catalog[0].filename);
     exit (1);
Index: /trunk/Ohana/src/uniphot/include/uniphot.h
===================================================================
--- /trunk/Ohana/src/uniphot/include/uniphot.h	(revision 5319)
+++ /trunk/Ohana/src/uniphot/include/uniphot.h	(revision 5320)
@@ -90,5 +90,5 @@
 void          sortB              PROTO((double *X, double *Y, int N));
 void          sortD              PROTO((double *X, double *Y, double *Z, int N));
-void          update_catalog     PROTO((Catalog *catalog, Group *sgroup, int warn));
+void          update_dvo_catalog PROTO((Catalog *catalog, Group *sgroup, int warn));
 void          wcatalog           PROTO((Catalog *catalog));
 void          wimages            PROTO((Image *image, int Nimage));
Index: /trunk/Ohana/src/uniphot/src/gcatalog.c
===================================================================
--- /trunk/Ohana/src/uniphot/src/gcatalog.c	(revision 5319)
+++ /trunk/Ohana/src/uniphot/src/gcatalog.c	(revision 5320)
@@ -3,7 +3,5 @@
 int gcatalog (Catalog *catalog) {
 
-  int mode;
-
-  mode = LOAD_AVES | LOAD_MEAS | LOAD_MISS | LOAD_SECF;
+  catalog[0].catflags = LOAD_AVES | LOAD_MEAS | LOAD_MISS | LOAD_SECF;
 
   /* CATMODE and CATFORMAT determined from catalog */
@@ -14,5 +12,5 @@
     exit (1);
   case 1:
-    if (!load_catalog (catalog, mode, VERBOSE)) {
+    if (!load_catalog (catalog, VERBOSE)) {
       fprintf (stderr, "ERROR: failure loading catalog %s\n", catalog[0].filename);
       exit (1);
Index: /trunk/Ohana/src/uniphot/src/update.c
===================================================================
--- /trunk/Ohana/src/uniphot/src/update.c	(revision 5319)
+++ /trunk/Ohana/src/uniphot/src/update.c	(revision 5320)
@@ -69,5 +69,5 @@
 
     fprintf (stderr, "catalog: %s sgroup: %d %s %f\n", catalog.filename, Nmin, sgroup[Nmin].label, Rmin);
-    update_catalog (&catalog, &sgroup[Nmin], (Rmin > 2*RADIUS)); 
+    update_dvo_catalog (&catalog, &sgroup[Nmin], (Rmin > 2*RADIUS)); 
     wcatalog (&catalog); 
   }
Index: /trunk/Ohana/src/uniphot/src/update_catalog.c
===================================================================
--- /trunk/Ohana/src/uniphot/src/update_catalog.c	(revision 5319)
+++ /trunk/Ohana/src/uniphot/src/update_catalog.c	(revision 5320)
@@ -1,5 +1,5 @@
 # include "uniphot.h"
 
-void update_catalog (Catalog *catalog, Group *sgroup, int warn) {
+void update_dvo_catalog (Catalog *catalog, Group *sgroup, int warn) {
 
   int i, j, m, found;
