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

    r7917 r8427  
    6262    /* lock, load, unlock catalog */
    6363    catalog.filename = skylist[0].filename[Nr];
    64     switch (lock_catalog (&catalog, LCK_SOFT)) {
    65       case 2:
    66         unlock_catalog (&catalog);
    67       case 0:
    68         continue;
     64    catalog.catflags = LOAD_AVES | LOAD_MEAS | LOAD_SECF;
     65
     66    // an error exit status here is a significant error
     67    if (!dvo_catalog_open (&catalog, NULL, FALSE, "r")) {
     68      fprintf (stderr, "ERROR: failure to open catalog file %s\n", catalog.filename);
     69      exit (2);
    6970    }
    70     catalog.catflags = LOAD_AVES | LOAD_MEAS | LOAD_SECF;
    71     if (!load_catalog (&catalog, FALSE)) {
    72       unlock_catalog (&catalog);
    73       continue;
    74     }
    75     unlock_catalog (&catalog);
     71    dvo_catalog_unlock (&catalog);
    7672
    7773    /* extract values, assign to vectors */
     
    115111      }
    116112    }
    117     if (catalog.average != (Average *) NULL) free (catalog.average);
    118     if (catalog.measure != (Measure *) NULL) free (catalog.measure);
    119     if (catalog.secfilt != (SecFilt *) NULL) free (catalog.secfilt);
    120     catalog.average = (Average *) NULL;
    121     catalog.secfilt = (SecFilt *) NULL;
    122     catalog.measure = (Measure *) NULL;
     113    dvo_catalog_free (&catalog);
    123114  }
    124115
     
    134125
    135126escape:
    136  
    137127  if (RegionName != NULL) free (RegionName);
    138128  if (RegionList != NULL) free (RegionList);
Note: See TracChangeset for help on using the changeset viewer.