25#define OPTARG_MAX_OPTION_ARGS (20)
28#define OPTARG_MAX_OPTION_LENGTH (16)
31#define OPTARG_MAX_SHORT_OPTION_LENGTH (5)
34#define OPTARG_MAX_ARG_STR_LENGTH (16)
37#define OPTARG_MAX_DESCRIPTION_STRING_LEN (800)
40#define OPTARG_MAX_IP_STRING_LEN (20)
43#define OPTARG_OPTION_ARRAY_MAX_CHAR_LEN (400)
46#define OPTARG_USAGE_DESCRIPTION_INDENT (1 + OPTARG_MAX_SHORT_OPTION_LENGTH + 5 + OPTARG_MAX_OPTION_LENGTH + 1 + OPTARG_MAX_ARG_STR_LENGTH + 3)
49#define OPTARG_AVM_USAGE_LIST_INDENT (29)
128bool GetOpt(
int argc,
const char* argv_ptr[],
int* index_ptr,
OptDef* opt_array_ptr,
OptArg* this_opt_ptr);
This file declares the public API data types, structures and functions that comprise the CDI low-leve...
static void PrintUsage()
Print usage message.
Definition dump_riff.c:53
void PrintOption(const OptDef *option_ptr)
Definition optarg.c:302
#define OPTARG_MAX_SHORT_OPTION_LENGTH
The maximum length of any short option string.
Definition optarg.h:31
bool GetOpt(int argc, const char *argv_ptr[], int *index_ptr, OptDef *opt_array_ptr, OptArg *this_opt_ptr)
Definition optarg.c:387
#define OPTARG_MAX_OPTION_ARGS
The maximum number of arguments allowed for any command line option.
Definition optarg.h:25
void PrintKeyArrayNames(const CdiEnumStringKey *key_array, const int indent)
Definition optarg.c:223
Type used for holding arrays of enums and related string representations.
Definition cdi_utility_api.h:46
A structure that describes a single command line option and its associated arguments.
Definition optarg.h:75
int num_args
The number of arguments discovered for the option.
Definition optarg.h:81
int option_index
The index of this option.
Definition optarg.h:77
A structure that is used by the user to define a single option. An array of these option structs is p...
Definition optarg.h:56
const CdiEnumStringKey * arg_choices_array_ptr
Pointer to array of strings of option argument choices.
Definition optarg.h:66
const char * argument_str
A string that describes the arguments to the option.
Definition optarg.h:64
int num_args
The number of expected arguments for the option.
Definition optarg.h:62
const char * short_name_str
The short multi-character short name of the option (short opt).
Definition optarg.h:58
const char * description_str
A string that describes the function of the option. Max length is OPTARG_MAX_DESCRIPTION_STRING_LEN.
Definition optarg.h:68
const char * long_name_str
The multiple-character long name of the option (long opt).
Definition optarg.h:60