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

    r7960 r8427  
    7272  /* lock, load, unlock catalog */
    7373  catalog.filename = skylist[0].filename[0];
    74   switch (lock_catalog (&catalog, LCK_SOFT)) {
    75     case 2:
    76       unlock_catalog (&catalog);
    77     case 0:
    78       return (FALSE);
    79   }
    8074  catalog.catflags = LOAD_AVES | LOAD_MEAS | LOAD_SECF;
    81   if (!load_catalog (&catalog, TRUE)) {
    82     unlock_catalog (&catalog);
    83     return (FALSE);
    84   }
    85   unlock_catalog (&catalog);
     75
     76  // an error exit status here is a significant error
     77  if (!dvo_catalog_open (&catalog, NULL, FALSE, "r")) {
     78      fprintf (stderr, "ERROR: failure to open catalog file %s\n", catalog.filename);
     79      exit (2);
     80  }
     81  dvo_catalog_unlock (&catalog);
    8682
    8783  Nstars = catalog.Naverage;
     
    209205  free (DEC);
    210206  free (N1);
    211   if (catalog.average != 0) free (catalog.average);
    212   if (catalog.measure != 0) free (catalog.measure);
    213   if (catalog.secfilt != 0) free (catalog.secfilt);
     207  dvo_catalog_free (&catalog);
    214208
    215209  freePhotcodeSequence ();
Note: See TracChangeset for help on using the changeset viewer.