ocssw
V2022
|
argpar.c
Go to the documentation of this file.
182 ck_assert_int_eq(argpar_parse_args(¶ms, argc, argv, ARGPAR_NO_EXIT, NULL, &arguments), ARGPAR_ERR_ABORT);
199 char *argv_const[] = {(char*)argpar_program_name, "ifile=input", "arg1", "unknown=bad", "--", "ofile=output", "arg3"};
209 ck_assert_int_eq(argpar_parse_args(¶ms, argc, argv, 0, NULL, &arguments), ARGPAR_ERR_UNKNOWN);
352 argpar_program_name, "parfile=parfiles/initial.par", "ofile=keyarg_ofile1", "parfile=parfiles/final.par",
425 argpar params_parent = { options_parent, parse_options_parent, args_doc_parent, doc_parent, children };
478 ck_assert_int_eq(argpar_parse_file(¶ms_parent, "parfiles/initial.par", 0, &arguments_parent), 0);
535 char *argv_const[] = {(char*)argpar_program_name, "ofile=keyarg_ofile1", "parfile=parfiles/initial.par"};
544 ck_assert_int_eq(argpar_parse_args(¶ms, argc, argv, ARGPAR_SKIP_PARFILES, NULL, &arguments), 0);
571 ck_assert_int_eq(argpar_parse_args(¶ms, argc, argv, ARGPAR_NO_KEYARGS, NULL, &arguments), 0);
599 ck_assert_int_eq(argpar_parse_args(¶ms, argc, argv, ARGPAR_NO_KEYARGS, NULL, &arguments), 0);
780 ck_assert_int_eq(argpar_parse_args(¶ms, argc, argv, ARGPAR_ACCEPT_ANY, NULL, &arguments), 0);
Master structure containing options, document strings, child parsers, and text filters....
Definition: argpar.h:398
#define ARGPAR_KEY_END
Passed as the key to the parser callback function when there are no more arguments left to parse.
Definition: argpar.h:282
char ** argpar_split_trim(char *str, const char *delim)
Splits a string on a delimiter, returning a NULL-terminated list of strings, trimming left and right ...
Definition: argpar.c:769
Definition: argpar.c:41
#define OPTION_INT
Cast this option as a long. The value and any error will be reflected in the argpar_state struct duri...
Definition: argpar.h:160
int * argpar_split_int(char *str, const char *delim)
Splits a string on a delimiter, returning a NULL_INT-terminated list of ints.
Definition: argpar.c:785
#define ARGPAR_ERR_USAGE
Returned from the parser callback to signal argpar to stop parsing, print a usage summary,...
Definition: argpar.h:338
#define ARGPAR_KEY_ARG
This is not an option at all, but rather a command line argument. If a parser receiving this key retu...
Definition: argpar.h:271
#define ARGPAR_KEY_INIT
Passed as the key to each parser callback function before any parsing occurs. For most cases,...
Definition: argpar.h:287
#define OPTION_ATTR
This option serves to document additional attributes for an option. These are hidden from the normal ...
Definition: argpar.h:183
int argpar_parse_file(argpar *p, const char *path, unsigned flags, void *input)
Parse a key=value store file.
Definition: argpar.c:730
#define ARGPAR_NO_KEYARGS
Passed to the argpar_parse_ functions, this tells the parser to accept options without equal signs,...
Definition: argpar.h:125
#define ARGPAR_ERR_UNKNOWN
What to return for unrecognized keys within an argpar_parser function.
Definition: argpar.h:341
int state(double tjdTDB, JPLIntUtilType *util, double posvel[13][6], double *pnut)
#define OPTION_ENUM
This option serves to document a valid value for an option. This is not enforced by argpar.
Definition: argpar.h:179
#define ARGPAR_NO_EXIT
Passed to the argpar_parse_ functions, this tells argpar not to call exit after printing help/usage,...
Definition: argpar.h:132
char * strdup(const char *)
#define ARGPAR_ERR_ABORT
Returned from the parser callback to signal argpar to stop parsing and return to the caller.
Definition: argpar.h:334
#define ARGPAR_SKIP_PARFILES
Passed to argpar_parse_args, this tells the parser to ignore parfile= arguments, useful for overwriti...
Definition: argpar.h:120
int argpar_parse_args(argpar *p, unsigned argc, char *argv[], unsigned flags, unsigned *end_index, void *input)
Parse an array of key=value pairs and/or key arguments.
Definition: argpar.c:679
Definition: __init__.py:1
Definition: argpar.c:397
double * argpar_split_dbl(char *str, const char *delim)
Splits a string on a delimiter, returning a NAN-terminated list of doubles.
Definition: argpar.c:809
#define OPTION_ALIAS
Do not add an extra newline after this documentation string. Useful for lists and manual formatting.
Definition: argpar.h:175
#define OPTION_DOC
This option isn't actually an option, merely text for the usage summary.
Definition: argpar.h:152
State variable to be filled before each call to the parser callback.
Definition: argpar.h:196
Library for reading command-line arguments in the form of key=value.
char ** argpar_split_str(char *str, const char *delim)
Splits a string on a delimiter, returning a NULL-terminated list of strings.
Definition: argpar.c:744
#define ARGPAR_ACCEPT_ANY
Passed to the argpar_parse_ functions, this tells argpar to call every parser with every option found...
Definition: argpar.h:136
no change in intended resolving MODur00064 Corrected handling of bad ephemeris attitude resolving resolving GSFcd00179 Corrected handling of fill values for[Sensor|Solar][Zenith|Azimuth] resolving MODxl01751 Changed to validate LUT version against a value retrieved from the resolving MODxl02056 Changed to calculate Solar Diffuser angles without adjustment for estimated post launch changes in the MODIS orientation relative to incidentally resolving defects MODxl01766 Also resolves MODxl01947 Changed to ignore fill values in SCI_ABNORM and SCI_STATE rather than treating them as errors
Definition: HISTORY.txt:401
#define ARGPAR_KEY_UNKNOWN
Passed as the key to each parser callback function when an unknown option has been found....
Definition: argpar.h:307
How many dimensions is the output array Default is Not sure if anything above will work correctly strcpy(l2prod->title, "no title yet")
PGE01 indicating that PGE02 PGE01 V6 for and PGE01 V2 for MOD03 were used to produce the granule By convention adopted in all MODIS Terra PGE02 code versions are The fourth digit of the PGE02 version denotes the LUT version used to produce the granule The source of the metadata environment variable ProcessingCenter was changed from a QA LUT value to the Process Configuration A sign used in error in the second order term was changed to a
Definition: HISTORY.txt:424
#define OPTION_DBL
Cast this option as a double. The value and any error will be reflected in the argpar_state struct du...
Definition: argpar.h:156