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

    r7917 r8427  
    8282  /* set filename, read in header */
    8383  catalog.filename = skylist[0].filename[0];
    84   switch (lock_catalog (&catalog, LCK_SOFT)) {
    85     case 2:
    86       unlock_catalog (&catalog);
    87     case 0:
    88       return (FALSE);
     84  catalog.catflags = LOAD_AVES | LOAD_MEAS;
     85
     86  // an error exit status here is a significant error
     87  if (!dvo_catalog_open (&catalog, NULL, FALSE, "r")) {
     88      fprintf (stderr, "ERROR: failure to open catalog file %s\n", catalog.filename);
     89      exit (2);
    8990  }
    90   catalog.catflags = LOAD_AVES | LOAD_MEAS;
    91   if (!load_catalog (&catalog, TRUE)) {
    92     unlock_catalog (&catalog);
    93     return (FALSE);
    94   }
    95   unlock_catalog (&catalog);
     91  dvo_catalog_unlock (&catalog);
    9692
    9793  Nstars = catalog.Naverage;
     
    195191
    196192  if (ErrorBars) free (dYvec.elements);
    197   if (catalog.average != 0) free (catalog.average);
    198   if (catalog.measure != 0) free (catalog.measure);
    199  
     193  dvo_catalog_free (&catalog);
     194
    200195  SkyListFree (skylist, FALSE);
    201196  return (TRUE);
Note: See TracChangeset for help on using the changeset viewer.