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/subpix.c

    r7917 r8427  
    4242  /* lock, load, unlock catalog */
    4343  catalog.filename = skylist[0].filename[0];
    44   switch (lock_catalog (&catalog, LCK_SOFT)) {
    45     case 2:
    46       unlock_catalog (&catalog);
    47     case 0:
    48       return (FALSE);
     44  catalog.catflags = LOAD_AVES | LOAD_MEAS;
     45
     46  // an error exit status here is a significant error
     47  if (!dvo_catalog_open (&catalog, NULL, FALSE, "r")) {
     48      fprintf (stderr, "ERROR: failure to open catalog file %s\n", catalog.filename);
     49      exit (2);
    4950  }
    50   catalog.catflags = LOAD_AVES | LOAD_MEAS;
    51   if (!load_catalog (&catalog, TRUE)) {
    52     unlock_catalog (&catalog);
    53     return (FALSE);
    54   }
    55   unlock_catalog (&catalog);
     51  dvo_catalog_unlock (&catalog);
    5652
    5753  /* quick search of star list for Ra, Dec */
     
    8884    free (entry);
    8985    free (index);
    90     if (catalog.average != 0) free (catalog.average);
    91     if (catalog.measure != 0) free (catalog.measure);
     86    dvo_catalog_free (&catalog);
    9287    SkyListFree (skylist, FALSE);
    9388    return (TRUE);
     
    152147  }
    153148
    154   if (catalog.average != 0) free (catalog.average);
    155   if (catalog.measure != 0) free (catalog.measure);
     149  dvo_catalog_free (&catalog);
    156150  free (image);
    157151  free (index);
Note: See TracChangeset for help on using the changeset viewer.