Changeset 9574 for trunk/psastro/src/psastroArguments.c
- Timestamp:
- Oct 13, 2006, 5:10:34 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psastro/src/psastroArguments.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psastro/src/psastroArguments.c
r9373 r9574 1 1 # include "psastro.h" 2 2 # include <glob.h> 3 // XXX leak free 2006.04.274 5 static void usage (void) {6 fprintf (stderr, "USAGE: psastro [-file image(s)] [-list imagelist] (output)\n");7 exit (2);8 }9 3 10 4 pmConfig *psastroArguments (int argc, char **argv) { … … 13 7 int N; 14 8 15 if (argc == 1) usage (); 9 if (argc == 1) { 10 psError(PSASTRO_ERR_ARGUMENTS, true, "No arguments supplied"); 11 return NULL; 12 } 16 13 17 14 // basic pslib options … … 50 47 51 48 status = pmConfigFileSetsMD (config->arguments, config, "INPUT", "-file", "-list"); 52 if (!status) { usage ();} 53 54 if (argc != 2) usage (); 55 49 if (!status) { 50 psError(PSASTRO_ERR_ARGUMENTS, true, "Missing -file (input) or -list (input)"); 51 return NULL; 52 } 53 54 if (argc != 2) { 55 psError(PSASTRO_ERR_ARGUMENTS, true, "Incorrect arguments supplied"); 56 return NULL; 57 } 58 56 59 // output positions is fixed 57 60 psMetadataAddStr (config->arguments, PS_LIST_TAIL, "OUTPUT", 0, "", argv[1]); 58 61 59 psTrace( __func__, 1, "Done with psastroArguments...\n");62 psTrace("psastro", 1, "Done with psastroArguments...\n"); 60 63 return (config); 61 64 }
Note:
See TracChangeset
for help on using the changeset viewer.
