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

    r7917 r8427  
    5858  /* set filename, read in header */
    5959  catalog.filename = skylist[0].filename[0];
    60   switch (lock_catalog (&catalog, LCK_SOFT)) {
    61     case 2:
    62       unlock_catalog (&catalog);
    63     case 0:
    64       return (FALSE);
     60  catalog.catflags = LOAD_AVES | LOAD_MEAS | LOAD_SECF;
     61
     62  // an error exit status here is a significant error
     63  if (!dvo_catalog_open (&catalog, NULL, FALSE, "r")) {
     64      fprintf (stderr, "ERROR: failure to open catalog file %s\n", catalog.filename);
     65      exit (2);
    6566  }
    66   catalog.catflags = LOAD_AVES | LOAD_MEAS | LOAD_SECF;
    67   if (!load_catalog (&catalog, TRUE)) {
    68     unlock_catalog (&catalog);
    69     return (FALSE);
    70   }
    71   unlock_catalog (&catalog);
     67  dvo_catalog_unlock (&catalog);
    7268
    7369  Nstars = catalog.Naverage;
     
    143139  free (DEC);
    144140  free (N1);
    145   if (catalog.average != 0) free (catalog.average);
    146   if (catalog.measure != 0) free (catalog.measure);
    147   if (catalog.secfilt != 0) free (catalog.secfilt);
    148  
     141  dvo_catalog_free (&catalog);
    149142  SkyListFree (skylist, FALSE);
    150143  return (TRUE);
Note: See TracChangeset for help on using the changeset viewer.