Main Page | Modules | Namespace List | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages | Examples

Command Argument Parsing


Data Structures

struct  apr_getopt_t
struct  apr_getopt_option_t

Typedefs

typedef void( apr_getopt_err_fn_t )(void *arg, const char *err,...)
typedef apr_getopt_t apr_getopt_t
typedef apr_getopt_option_t apr_getopt_option_t

Functions

 APR_DECLARE (apr_status_t) apr_getopt_init(apr_getopt_t **os

Variables

apr_pool_tcont
apr_pool_t int argc
apr_pool_t int const char
*const * 
argv
const char * opts
const char char * option_ch
const char char const char ** option_arg

Typedef Documentation

typedef void( apr_getopt_err_fn_t)(void *arg, const char *err,...)
 

defintion of a error function

Definition at line 40 of file apr_getopt.h.

typedef struct apr_getopt_option_t apr_getopt_option_t
 

See also:
apr_getopt_option_t

Definition at line 76 of file apr_getopt.h.

typedef struct apr_getopt_t apr_getopt_t
 

See also:
apr_getopt_t

Definition at line 43 of file apr_getopt.h.


Function Documentation

APR_DECLARE apr_status_t   ) 
 

Initialize the arguments for parsing by apr_getopt().

Parameters:
os The options structure created for apr_getopt()
cont The pool to operate on
argc The number of arguments to parse
argv The array of arguments to parse
Remarks:
Arguments 2 and 3 are most commonly argc and argv from main(argc, argv) The errfn is initialized to fprintf(stderr... but may be overridden.

Definition at line 24 of file netware/dso.c.


Variable Documentation

apr_pool_t int argc
 

Definition at line 101 of file apr_getopt.h.

apr_pool_t int const char* const* argv
 

Definition at line 101 of file apr_getopt.h.

apr_pool_t* cont
 

Definition at line 101 of file apr_getopt.h.

const apr_getopt_option_t int const char ** option_arg
 

Definition at line 149 of file apr_getopt.h.

const apr_getopt_option_t int * option_ch
 

Definition at line 149 of file apr_getopt.h.

const apr_getopt_option_t * opts
 

Definition at line 149 of file apr_getopt.h.

Referenced by add_opts().