Index: trunk/Ohana/src/opihi/dvo/cmatch.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/cmatch.c	(revision 4849)
+++ trunk/Ohana/src/opihi/dvo/cmatch.c	(revision 4852)
@@ -3,10 +3,7 @@
 int cmatch (int argc, char **argv) {
   
-  FILE *f;
   Catalog catalog1, catalog2;
-  int i, Nbytes, nbytes, Nitems, nitems;
-  char *tbuffer, filename[128];
-  int nstar, NSTARS;
-  double R, D, M, radius;
+  char filename[128];
+  double radius;
   char catdir[256], gscdir[256];
   Vector *rvec, *dvec, *mvec, *drvec, *ddvec, *dmvec;
@@ -14,6 +11,6 @@
   VarConfig ("GSCDIR", "%s", gscdir);
   VarConfig ("CATDIR", "%s", catdir);
-  if (VarConfig ("CATMODE", "%s", catalog.catmode) == NULL) 
-    strcpy (catalog.catmode, "RAW");
+  if (VarConfig ("CATMODE", "%s", catalog1.catmode) == NULL) 
+    strcpy (catalog1.catmode, "RAW");
       
   if (argc != 9) {
@@ -39,17 +36,19 @@
   sprintf (filename, "%s/%s", catdir, argv[1]);
   catalog1.filename = filename;
-  switch (lock_catalog (&catalog, LCK_SOFT)) {
+  switch (lock_catalog (&catalog1, LCK_SOFT)) {
   case 2:
-    unlock_catalog (&catalog);
+    unlock_catalog (&catalog1);
   case 0:
     return (FALSE);
   }
-  if (!load_catalog (&catalog, LOAD_AVES | LOAD_MEAS | LOAD_SECF, TRUE)) {
-    unlock_catalog (&catalog);
+  if (!load_catalog (&catalog1, LOAD_AVES | LOAD_MEAS | LOAD_SECF, TRUE)) {
+    unlock_catalog (&catalog1);
     return (FALSE);
   }
-  unlock_catalog (&catalog);
+  unlock_catalog (&catalog1);
   fprintf (stderr, "read %d stars from phot catalog file %s\n", catalog1.Naverage, filename);
 
+  /* this is for loading from a text file, presumably hstgsc or usno
+     replace this with references to the ra and dec vectors?
   nstar = 0;
   NSTARS = DNSTARS;
@@ -76,4 +75,5 @@
   catalog2.Naverage = nstar;
   fclose (f);
+  */
 
   /* sort data in order of RA */
