Typedefs | Enumerations | Functions
ExArg module: functions to parse command line argument in your program

Typedefs

typedef struct _ExArgument ExArgument
 Free argument definition. More...
 

Enumerations

enum  ExArgType { EXARG_NONE, EXARG_INT, EXARG_STRING }
 Enum type which defines how a argument must be interpreted. More...
 

Functions

void exarg_accept_free_args (int accept)
 Allows to configure exarg library to accept or not free arguments. More...
 
void exarg_add_dependency (const char *arg_name, const char *arg_dependency)
 Allows to define a parameter dependency between the to arguments defined. More...
 
void exarg_add_exclusion (const char *arg_name, const char *arg_excluded)
 Allows to configure arguments that are mutually excluyents. More...
 
void exarg_add_help_header (char *header)
 Adds user defined header to automatic help command generated. More...
 
void exarg_add_usage_header (char *header)
 Adds user defined header to automatic usage command generated. More...
 
void exarg_define (char *arg_name, char *value)
 Allows to simulate user defined command line options alread installed by exarg_install_arg, without requiring the user to set those values. More...
 
void exarg_disable_help ()
 Disable autohelp. More...
 
void exarg_end ()
 Ends exarg library execution. More...
 
int exarg_get_int (char *arg_name)
 Allows to get int value for a given command line argument. More...
 
ExArgumentexarg_get_params ()
 Returns free params defined at command line. More...
 
int exarg_get_params_num ()
 Allows to get the number of parameters that were defined by the user. More...
 
char * exarg_get_string (char *arg_name)
 Allows to get defined string for a given command line. More...
 
char * exarg_get_string_alloc (char *arg_name)
 Allows to get defined string for a given command line allocating the result. More...
 
void exarg_install_arg (const char *arg_name, const char *arg_short_name, ExArgType type, const char *description)
 Installs a new command line to be accepted. More...
 
void exarg_install_argv (int num_arg,...)
 Installs several command lines to be accepted. More...
 
int exarg_is_defined (char *arg_name)
 Allows to check if a user have defined a command. More...
 
int exarg_is_definedv (char *first_value,...)
 Allows to check several values to be defined at the same time. More...
 
const char * exarg_param_get (ExArgument *arg)
 Allows to get the string value that is represeting the argument received. More...
 
ExArgumentexarg_param_next (ExArgument *arg)
 Allows to get the next parameters defined at the command line option that is following the argument provided. More...
 
void exarg_parse (int argc, char **argv)
 Makes exarg to start parsing argument options. More...
 
void exarg_post_help_header (char *post_header)
 Adds user defined post header for help command. More...
 
void exarg_post_usage_header (char *post_header)
 Adds user defined post header for usage command. More...
 
void exarg_set_obligatory (char *arg_name)
 Makes an argument installed to be obligatory (not optional at the user command line input). More...
 
char * exarg_strdup_printfv (char *chunk, va_list args)
 
void exarg_undef (char *arg_name)
 Allows to undef the value associated and the definition itself of the option provided (arg_name). More...
 
int exarg_vprintf_len (const char *format, va_list args)
 

Detailed Description