IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 20, 2006, 5:36:41 PM (20 years ago)
Author:
eugene
Message:

updated to the new DVO APIs; minor cleanups (unused variables, etc)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/dvo/cmatch.c

    r7917 r8427  
    2929  /* load data from the photometry database file */
    3030  catalog1.filename = filename;
    31   switch (lock_catalog (&catalog1, LCK_SOFT)) {
    32   case 2:
    33     unlock_catalog (&catalog1);
    34   case 0:
    35     return (FALSE);
     31  catalog1.catflags = LOAD_AVES | LOAD_MEAS | LOAD_SECF;
     32
     33  // an error exit status here is a significant error
     34  if (!dvo_catalog_open (&catalog1, NULL, FALSE, "r")) {
     35      fprintf (stderr, "ERROR: failure to open catalog file %s\n", catalog1.filename);
     36      exit (2);
    3637  }
    37   catalog1.catflags = LOAD_AVES | LOAD_MEAS | LOAD_SECF;
    38   if (!load_catalog (&catalog1, TRUE)) {
    39     unlock_catalog (&catalog1);
    40     return (FALSE);
    41   }
    42   unlock_catalog (&catalog1);
     38  dvo_catalog_unlock (&catalog1);
    4339  gprint (GP_ERR, "read %d stars from phot catalog file %s\n", catalog1.Naverage, filename);
    4440
     
    7874  compare (&catalog1, &catalog2, rvec, dvec, mvec, drvec, ddvec, dmvec, radius);
    7975
    80   free (catalog1.average);
     76  dvo_catalog_free (&catalog1);
    8177  free (catalog2.average);
    8278
Note: See TracChangeset for help on using the changeset viewer.