Index: trunk/Ohana/src/opihi/dvo/subpix.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/subpix.c	(revision 7917)
+++ trunk/Ohana/src/opihi/dvo/subpix.c	(revision 8427)
@@ -42,16 +42,12 @@
   /* lock, load, unlock catalog */
   catalog.filename = skylist[0].filename[0];
-  switch (lock_catalog (&catalog, LCK_SOFT)) {
-    case 2:
-      unlock_catalog (&catalog);
-    case 0:
-      return (FALSE);
+  catalog.catflags = LOAD_AVES | LOAD_MEAS;
+
+  // an error exit status here is a significant error
+  if (!dvo_catalog_open (&catalog, NULL, FALSE, "r")) {
+      fprintf (stderr, "ERROR: failure to open catalog file %s\n", catalog.filename);
+      exit (2);
   }
-  catalog.catflags = LOAD_AVES | LOAD_MEAS;
-  if (!load_catalog (&catalog, TRUE)) {
-    unlock_catalog (&catalog);
-    return (FALSE);
-  }
-  unlock_catalog (&catalog);
+  dvo_catalog_unlock (&catalog);
 
   /* quick search of star list for Ra, Dec */
@@ -88,6 +84,5 @@
     free (entry);
     free (index);
-    if (catalog.average != 0) free (catalog.average);
-    if (catalog.measure != 0) free (catalog.measure);
+    dvo_catalog_free (&catalog);
     SkyListFree (skylist, FALSE);
     return (TRUE);
@@ -152,6 +147,5 @@
   }
 
-  if (catalog.average != 0) free (catalog.average);
-  if (catalog.measure != 0) free (catalog.measure);
+  dvo_catalog_free (&catalog);
   free (image);
   free (index);
