Index: trunk/Ohana/src/opihi/dvo/cmatch.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/cmatch.c	(revision 7917)
+++ trunk/Ohana/src/opihi/dvo/cmatch.c	(revision 8427)
@@ -29,16 +29,12 @@
   /* load data from the photometry database file */
   catalog1.filename = filename;
-  switch (lock_catalog (&catalog1, LCK_SOFT)) {
-  case 2:
-    unlock_catalog (&catalog1);
-  case 0:
-    return (FALSE);
+  catalog1.catflags = LOAD_AVES | LOAD_MEAS | LOAD_SECF;
+
+  // an error exit status here is a significant error
+  if (!dvo_catalog_open (&catalog1, NULL, FALSE, "r")) {
+      fprintf (stderr, "ERROR: failure to open catalog file %s\n", catalog1.filename);
+      exit (2);
   }
-  catalog1.catflags = LOAD_AVES | LOAD_MEAS | LOAD_SECF;
-  if (!load_catalog (&catalog1, TRUE)) {
-    unlock_catalog (&catalog1);
-    return (FALSE);
-  }
-  unlock_catalog (&catalog1);
+  dvo_catalog_unlock (&catalog1);
   gprint (GP_ERR, "read %d stars from phot catalog file %s\n", catalog1.Naverage, filename);
 
@@ -78,5 +74,5 @@
   compare (&catalog1, &catalog2, rvec, dvec, mvec, drvec, ddvec, dmvec, radius);
 
-  free (catalog1.average);
+  dvo_catalog_free (&catalog1);
   free (catalog2.average);
 
