14 #define POPT_OPTION_DEPTH 10
16 #define POPT_ARG_NONE 0
17 #define POPT_ARG_STRING 1
18 #define POPT_ARG_INT 2
19 #define POPT_ARG_LONG 3
20 #define POPT_ARG_INCLUDE_TABLE 4
21 #define POPT_ARG_CALLBACK 5
25 #define POPT_ARG_INTL_DOMAIN 6
29 #define POPT_ARG_VAL 7
30 #define POPT_ARG_MASK 0x0000FFFF
31 #define POPT_ARGFLAG_ONEDASH 0x80000000
32 #define POPT_ARGFLAG_DOC_HIDDEN 0x40000000
33 #define POPT_ARGFLAG_STRIP 0x20000000
34 #define POPT_CBFLAG_PRE 0x80000000
35 #define POPT_CBFLAG_POST 0x40000000
36 #define POPT_CBFLAG_INC_DATA 0x20000000
39 #define POPT_ERROR_NOARG -10
40 #define POPT_ERROR_BADOPT -11
41 #define POPT_ERROR_OPTSTOODEEP -13
42 #define POPT_ERROR_BADQUOTE -15
43 #define POPT_ERROR_ERRNO -16
44 #define POPT_ERROR_BADNUMBER -17
45 #define POPT_ERROR_OVERFLOW -18
48 #define POPT_BADOPTION_NOALIAS (1 << 0)
51 #define POPT_CONTEXT_NO_EXEC (1 << 0)
52 #define POPT_CONTEXT_KEEP_FIRST (1 << 1)
53 #define POPT_CONTEXT_POSIXMEHARDER (1 << 2)
73 #define POPT_AUTOHELP { NULL, '\0', POPT_ARG_INCLUDE_TABLE, poptHelpOptions, \
74 0, "Help options", NULL },
87 const char *
arg,
const void *
data);
90 int argc,
const char ** argv,
114 int * argcPtr,
const char *** argvPtr);
116 int * argcPtr,
const char *** argvPtr);
struct poptOption poptHelpOptions[]
void poptSetExecPath(poptContext con, const char *path, int allowAbsolute)
const char * poptPeekArg(poptContext con)
void(* poptCallbackType)(poptContext con, enum poptCallbackReason reason, const struct poptOption *opt, const char *arg, const void *data)
struct poptOption * poptOption
int poptStuffArgs(poptContext con, const char **argv)
const char * poptGetInvocationName(poptContext con)
const char ** poptGetArgs(poptContext con)
const char * poptGetOptArg(poptContext con)
int poptAddAlias(poptContext con, struct poptAlias alias, int flags)
int poptStrippedArgv(poptContext con, int argc, char **argv)
void poptPrintHelp(poptContext con, FILE *f, int flags)
int poptDupArgv(int argc, const char **argv, int *argcPtr, const char ***argvPtr)
void poptResetContext(poptContext con)
const char * poptStrerror(const int error)
int poptGetNextOpt(poptContext con)
void poptFreeContext(poptContext con)
int poptReadConfigFile(poptContext con, const char *fn)
int poptParseArgvString(const char *s, int *argcPtr, const char ***argvPtr)
void poptSetOtherOptionHelp(poptContext con, const char *text)
const char * poptGetArg(poptContext con)
struct poptContext_s * poptContext
poptContext poptGetContext(const char *name, int argc, const char **argv, const struct poptOption *options, int flags)
const char * poptBadOption(poptContext con, int flags)
void poptPrintUsage(poptContext con, FILE *f, int flags)
@ POPT_CALLBACK_REASON_PRE
@ POPT_CALLBACK_REASON_OPTION
@ POPT_CALLBACK_REASON_POST
int poptReadDefaultConfig(poptContext con, int useEnv)