IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 2, 2008, 6:24:28 PM (18 years ago)
Author:
eugene
Message:

fixes for interger-type vectors; finish imextract upgrade

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branch_20081124/Ohana/src/opihi/dvo/mextract.c

    r20860 r20873  
    1111  Catalog catalog;
    1212  SkyList *skylist;
    13   PhotCode *code;
    1413  Vector **vec;
    1514  dbField *fields;
     
    1817
    1918  /* defaults */
     19  vec = NULL;
     20  stack = NULL;
     21  fields = NULL;
     22  values = NULL;
    2023  skylist = NULL;
    21   code = NULL;
    22   fields = NULL;
    23   stack = NULL;
     24  selection = NULL;
    2425
    2526  if ((N = get_argument (argc, argv, "-h"))) goto help;
     
    4950  fields = dbCmdlineFields (argc, argv, DVO_TABLE_MEASURE, &last, &Nfields);
    5051  if (fields == NULL) return (FALSE);
     52  if (Nfields == 0) {
     53    FreeSkyRegionSelection (selection);
     54    dbFreeFields (fields, Nfields);
     55    dvo_catalog_free (&catalog);
     56    goto help;
     57  }
    5158
    5259  // examine line for 'where' or 'match to'.  'match to' is forbidden
     
    168175  }
    169176
    170   free (values);
     177  if (vec) free (vec);
     178  if (values) free (values);
    171179  dbFreeFields (fields, Nfields);
    172180  dbFreeStack (stack, Nstack);
     
    178186
    179187escape:
     188  if (vec) free (vec);
    180189  free (values);
    181190  dbFreeFields (fields, Nfields);
Note: See TracChangeset for help on using the changeset viewer.