- Timestamp:
- Dec 2, 2008, 6:24:28 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branch_20081124/Ohana/src/opihi/dvo/mmextract.c
r20857 r20873 13 13 Catalog catalog; 14 14 SkyList *skylist; 15 PhotCode *code;16 15 Vector **vec; 17 16 dbField *fields; … … 21 20 22 21 /* defaults */ 23 skylist = NULL; 24 code = NULL; 25 fields = NULL; 22 vec = NULL; 26 23 stack1 = NULL; 27 24 stack2 = NULL; 25 fields = NULL; 26 values = NULL; 27 skylist = NULL; 28 selection = NULL; 28 29 29 30 if ((N = get_argument (argc, argv, "-h"))) goto help; … … 57 58 // parse the fields to be extracted and returned : last points to end, or first 'where' or 'matched' 58 59 fields = dbCmdlineFields (argc, argv, DVO_TABLE_MEASURE, &last, &Nfields); 59 if (fields == NULL) return (FALSE); 60 if (fields == NULL) goto escape; 61 if (Nfields == 0) { 62 FreeSkyRegionSelection (selection); 63 dbFreeFields (fields, Nfields); 64 dvo_catalog_free (&catalog); 65 goto help; 66 } 60 67 61 68 // examine line for 'where' and 'match to'. neither is required, but order is fixed … … 298 305 299 306 escape: 307 if (vec) free (vec); 308 if (values) free (values); 300 309 dbFreeFields (fields, Nfields); 301 310 dbFreeStack (stack1, Nstack1); … … 310 319 311 320 help: 312 gprint (GP_ERR, "USAGE: mextract field[,field,field...] where (expression)\n"); 321 gprint (GP_ERR, "USAGE: mmextract field[,field,field...] where (expression) match to (expression)\n"); 322 gprint (GP_ERR, " pairs of fields are returned: the first set are restricted by the 'where' expression, the second by the 'match to' expression\n"); 313 323 314 324 if ((argc > N + 1) && !strcasecmp (argv[N+1], "fields")) { … … 362 372 return (FALSE); 363 373 } 364 gprint (GP_ERR, " m extract --help fields : for a complete listing of allowed fields\n");374 gprint (GP_ERR, " mmextract --help fields : for a complete listing of allowed fields\n"); 365 375 return (FALSE); 366 376 }
Note:
See TracChangeset
for help on using the changeset viewer.
