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

    r7917 r8427  
    121121    /* get file name and open */
    122122    catalog.filename = skylist[0].filename[j];
    123     switch (lock_catalog (&catalog, LCK_SOFT)) {
    124       case 2:
    125         unlock_catalog (&catalog);
    126       case 0:
    127         continue;
    128     }
    129     catalog.catflags = LOAD_AVES;
    130     if (!load_catalog (&catalog, TRUE)) {
    131       unlock_catalog (&catalog);
    132       continue;
    133     }
    134     unlock_catalog (&catalog);
     123    catalog.catflags = LOAD_AVES | LOAD_MEAS | LOAD_SECF;
     124
     125    // an error exit status here is a significant error
     126    if (!dvo_catalog_open (&catalog, NULL, FALSE, "r")) {
     127      fprintf (stderr, "ERROR: failure to open catalog file %s\n", catalog.filename);
     128      exit (2);
     129    }
     130    dvo_catalog_unlock (&catalog);
    135131
    136132    /* assign vector values */
     
    203199        break;
    204200    }
    205     if (catalog.average != 0) {
    206       free (catalog.average);
    207     }
    208     if (catalog.measure != 0) {
    209       free (catalog.measure);
    210     }
     201    dvo_catalog_free (&catalog);
    211202  }
    212203 
Note: See TracChangeset for help on using the changeset viewer.