Mixes for Privacy and Anonymity in the Internet
Classes | Defines | Typedefs | Enumerations | Functions | Variables
popt.h File Reference

Classes

struct  poptOption
struct  poptAlias

Defines

#define POPT_OPTION_DEPTH   10
#define POPT_ARG_NONE   0
#define POPT_ARG_STRING   1
#define POPT_ARG_INT   2
#define POPT_ARG_LONG   3
#define POPT_ARG_INCLUDE_TABLE   4 /* arg points to table */
#define POPT_ARG_CALLBACK
#define POPT_ARG_INTL_DOMAIN
#define POPT_ARG_VAL   7 /* arg should take value val */
#define POPT_ARG_MASK   0x0000FFFF
#define POPT_ARGFLAG_ONEDASH   0x80000000 /* allow -longoption */
#define POPT_ARGFLAG_DOC_HIDDEN   0x40000000 /* don't show in help/usage */
#define POPT_ARGFLAG_STRIP   0x20000000 /* strip this arg from argv (only applies to long args) */
#define POPT_CBFLAG_PRE   0x80000000 /* call the callback before parse */
#define POPT_CBFLAG_POST   0x40000000 /* call the callback after parse */
#define POPT_CBFLAG_INC_DATA
#define POPT_ERROR_NOARG   -10
#define POPT_ERROR_BADOPT   -11
#define POPT_ERROR_OPTSTOODEEP   -13
#define POPT_ERROR_BADQUOTE   -15 /* only from poptParseArgString() */
#define POPT_ERROR_ERRNO   -16 /* only from poptParseArgString() */
#define POPT_ERROR_BADNUMBER   -17
#define POPT_ERROR_OVERFLOW   -18
#define POPT_BADOPTION_NOALIAS   (1 << 0) /* don't go into an alias */
#define POPT_CONTEXT_NO_EXEC   (1 << 0) /* ignore exec expansions */
#define POPT_CONTEXT_KEEP_FIRST   (1 << 1) /* pay attention to argv[0] */
#define POPT_CONTEXT_POSIXMEHARDER   (1 << 2) /* options can't follow args */
#define POPT_AUTOHELP

Typedefs

typedef struct poptContext_spoptContext
typedef struct poptOptionpoptOption
typedef void(* poptCallbackType )(poptContext con, enum poptCallbackReason reason, const struct poptOption *opt, const char *arg, const void *data)

Enumerations

enum  poptCallbackReason { POPT_CALLBACK_REASON_PRE, POPT_CALLBACK_REASON_POST, POPT_CALLBACK_REASON_OPTION }

Functions

poptContext poptGetContext (const char *name, int argc, const char **argv, const struct poptOption *options, int flags)
void poptResetContext (poptContext con)
int poptGetNextOpt (poptContext con)
const char * poptGetOptArg (poptContext con)
const char * poptGetArg (poptContext con)
const char * poptPeekArg (poptContext con)
const char ** poptGetArgs (poptContext con)
const char * poptBadOption (poptContext con, int flags)
void poptFreeContext (poptContext con)
int poptStuffArgs (poptContext con, const char **argv)
int poptAddAlias (poptContext con, struct poptAlias alias, int flags)
int poptReadConfigFile (poptContext con, const char *fn)
int poptReadDefaultConfig (poptContext con, int useEnv)
int poptDupArgv (int argc, const char **argv, int *argcPtr, const char ***argvPtr)
int poptParseArgvString (const char *s, int *argcPtr, const char ***argvPtr)
const char * poptStrerror (const int error)
void poptSetExecPath (poptContext con, const char *path, int allowAbsolute)
void poptPrintHelp (poptContext con, FILE *f, int flags)
void poptPrintUsage (poptContext con, FILE *f, int flags)
void poptSetOtherOptionHelp (poptContext con, const char *text)
const char * poptGetInvocationName (poptContext con)
int poptStrippedArgv (poptContext con, int argc, char **argv)

Variables

struct poptOption poptHelpOptions []

Define Documentation

Value:
5 /* table-wide callback... must be
             set first in table; arg points 
             to callback, descrip points to 
             callback data to pass */

Referenced by findOption(), and invokeCallbacks().

#define POPT_ARG_INCLUDE_TABLE   4 /* arg points to table */
#define POPT_ARG_INT   2
Value:
6       /* set the translation domain
             for this table and any
             included tables; arg points
             to the domain string */

Referenced by getTableTranslationDomain(), and singleTableUsage().

#define POPT_ARG_LONG   3

Referenced by poptGetNextOpt().

#define POPT_ARG_MASK   0x0000FFFF
#define POPT_ARG_NONE   0
#define POPT_ARG_STRING   1
#define POPT_ARG_VAL   7 /* arg should take value val */

Referenced by poptGetNextOpt().

#define POPT_ARGFLAG_DOC_HIDDEN   0x40000000 /* don't show in help/usage */
#define POPT_ARGFLAG_ONEDASH   0x80000000 /* allow -longoption */

Referenced by findOption().

#define POPT_ARGFLAG_STRIP   0x20000000 /* strip this arg from argv (only applies to long args) */

Referenced by poptGetNextOpt().

#define POPT_AUTOHELP
Value:
{ NULL, '\0', POPT_ARG_INCLUDE_TABLE, poptHelpOptions, \
      0, "Help options", NULL },

Referenced by CACmdLnOptions::parse().

#define POPT_BADOPTION_NOALIAS   (1 << 0) /* don't go into an alias */

Referenced by poptBadOption().

Value:
0x20000000  /* use data from the include line,
                 not the subtable */

Referenced by findOption().

#define POPT_CBFLAG_POST   0x40000000 /* call the callback after parse */

Referenced by invokeCallbacks().

#define POPT_CBFLAG_PRE   0x80000000 /* call the callback before parse */

Referenced by invokeCallbacks().

#define POPT_CONTEXT_KEEP_FIRST   (1 << 1) /* pay attention to argv[0] */

Referenced by poptGetContext(), and showHelpIntro().

#define POPT_CONTEXT_NO_EXEC   (1 << 0) /* ignore exec expansions */

Referenced by handleExec().

#define POPT_CONTEXT_POSIXMEHARDER   (1 << 2) /* options can't follow args */

Referenced by poptGetContext(), and poptGetNextOpt().

#define POPT_ERROR_BADNUMBER   -17

Referenced by poptGetNextOpt(), and poptStrerror().

#define POPT_ERROR_BADOPT   -11
#define POPT_ERROR_BADQUOTE   -15 /* only from poptParseArgString() */
#define POPT_ERROR_ERRNO   -16 /* only from poptParseArgString() */
#define POPT_ERROR_NOARG   -10
#define POPT_ERROR_OPTSTOODEEP   -13
#define POPT_ERROR_OVERFLOW   -18

Referenced by poptGetNextOpt(), and poptStrerror().

#define POPT_OPTION_DEPTH   10

Referenced by handleAlias(), and poptStuffArgs().


Typedef Documentation

typedef void(* poptCallbackType)(poptContext con, enum poptCallbackReason reason, const struct poptOption *opt, const char *arg, const void *data)
typedef struct poptContext_s* poptContext
typedef struct poptOption* poptOption

Enumeration Type Documentation

Enumerator:
POPT_CALLBACK_REASON_PRE 
POPT_CALLBACK_REASON_POST 
POPT_CALLBACK_REASON_OPTION 

Function Documentation

int poptAddAlias ( poptContext  con,
struct poptAlias  alias,
int  flags 
)
const char* poptBadOption ( poptContext  con,
int  flags 
)
int poptDupArgv ( int  argc,
const char **  argv,
int *  argcPtr,
const char ***  argvPtr 
)
const char* poptGetArg ( poptContext  con)
const char** poptGetArgs ( poptContext  con)
poptContext poptGetContext ( const char *  name,
int  argc,
const char **  argv,
const struct poptOption options,
int  flags 
)
const char* poptGetInvocationName ( poptContext  con)
const char* poptGetOptArg ( poptContext  con)
int poptParseArgvString ( const char *  s,
int *  argcPtr,
const char ***  argvPtr 
)
const char* poptPeekArg ( poptContext  con)
void poptPrintHelp ( poptContext  con,
FILE *  f,
int  flags 
)
void poptPrintUsage ( poptContext  con,
FILE *  f,
int  flags 
)
int poptReadConfigFile ( poptContext  con,
const char *  fn 
)
int poptReadDefaultConfig ( poptContext  con,
int  useEnv 
)
void poptSetExecPath ( poptContext  con,
const char *  path,
int  allowAbsolute 
)
void poptSetOtherOptionHelp ( poptContext  con,
const char *  text 
)
const char* poptStrerror ( const int  error)
int poptStrippedArgv ( poptContext  con,
int  argc,
char **  argv 
)
int poptStuffArgs ( poptContext  con,
const char **  argv 
)

Variable Documentation