Files | |
file | findme.c |
file | findme.h |
file | popt.c |
file | popt.h |
file | poptconfig.c |
file | popthelp.c |
file | poptint.h |
file | poptparse.c |
Compounds | |
struct | poptAlias |
struct | poptOption |
Arg type identifiers | |
#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 |
#define | POPT_ARG_CALLBACK 5 |
#define | POPT_ARG_INTL_DOMAIN 6 |
#define | POPT_ARG_VAL 7 |
#define | POPT_ARG_FLOAT 8 |
#define | POPT_ARG_DOUBLE 9 |
#define | POPT_ARG_MASK 0x0000FFFF |
Arg modifiers | |
#define | POPT_ARGFLAG_ONEDASH 0x80000000 |
#define | POPT_ARGFLAG_DOC_HIDDEN 0x40000000 |
#define | POPT_ARGFLAG_STRIP 0x20000000 |
#define | POPT_ARGFLAG_OPTIONAL 0x10000000 |
#define | POPT_ARGFLAG_OR 0x08000000 |
#define | POPT_ARGFLAG_NOR 0x09000000 |
#define | POPT_ARGFLAG_AND 0x04000000 |
#define | POPT_ARGFLAG_NAND 0x05000000 |
#define | POPT_ARGFLAG_XOR 0x02000000 |
#define | POPT_ARGFLAG_NOT 0x01000000 |
#define | POPT_ARGFLAG_LOGICALOPS |
Callback modifiers | |
#define | POPT_CBFLAG_PRE 0x80000000 |
#define | POPT_CBFLAG_POST 0x40000000 |
#define | POPT_CBFLAG_INC_DATA 0x20000000 |
#define | POPT_CBFLAG_SKIPOPTION 0x10000000 |
#define | POPT_CBFLAG_CONTINUE 0x08000000 |
Error return values | |
#define | POPT_ERROR_NOARG -10 |
#define | POPT_ERROR_BADOPT -11 |
#define | POPT_ERROR_OPTSTOODEEP -13 |
#define | POPT_ERROR_BADQUOTE -15 |
#define | POPT_ERROR_ERRNO -16 |
#define | POPT_ERROR_BADNUMBER -17 |
#define | POPT_ERROR_OVERFLOW -18 |
#define | POPT_ERROR_BADOPERATION -19 |
poptBadOption() flags | |
#define | POPT_BADOPTION_NOALIAS (1 << 0) |
poptGetContext() flags | |
#define | POPT_CONTEXT_NO_EXEC (1 << 0) |
#define | POPT_CONTEXT_KEEP_FIRST (1 << 1) |
#define | POPT_CONTEXT_POSIXMEHARDER (1 << 2) |
Auto-generated help/usage | |
struct poptOption | poptHelpOptions [] |
Typedefs | |
typedef struct poptContext_s* | poptContext |
typedef struct poptOption* | poptOption |
typedef void (* | poptCallbackType )(poptContext con, enum poptCallbackReason reason, const struct poptOption *opt, const char *arg, const void *data) |
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* const | 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) |
|
arg will be and'ed |
|
don't show in help/usage |
|
Value: (POPT_ARGFLAG_OR|POPT_ARGFLAG_AND|POPT_ARGFLAG_XOR) |
|
arg will be nand'ed |
|
arg will be nor'ed |
|
arg will be negated |
|
allow -longoption |
|
arg may be missing |
|
arg will be or'ed |
|
strip this arg from argv(only applies to long args) |
|
arg will be xor'ed |
|
table-wide callback... must be set first in table; arg points to callback, descrip points to callback data to pass |
|
arg will be converted to double |
|
arg will be converted to float |
|
arg points to table |
|
arg will be converted to int |
|
set the translation domain for this table and any included tables; arg points to the domain string |
|
arg will be converted to long |
|
|
|
no arg |
|
arg will be saved as string |
|
arg should take value val |
|
don't go into an alias |
|
continue callbacks with option |
|
use data from the include line, not the subtable |
|
call the callback after parse |
|
call the callback before parse |
|
don't callback with option |
|
pay attention to argv[0] |
|
ignore exec expansions |
|
options can't follow args |
|
invalid numeric value |
|
mutually exclusive logical operations requested |
|
unknown option |
|
error in paramter quoting |
|
errno set, use strerror(errno) |
|
missing argument |
|
aliases nested too deeply |
|
number too large or too small |
|
Table callback prototype.
|
|
|
|
|
|
Add alias to context.
Definition at line 855 of file popt.c. Referenced by configLine(). |
|
Return the option which caused the most recent error.
Definition at line 879 of file popt.c. Referenced by doSetupMacro(), main(), parseDescription(), parseFiles(), and parseScript(). |
|
Duplicate an argument array. @note: The argument array is malloc'd as a single area, so only argv must be free'd.
Definition at line 13 of file poptparse.c. |
|
Destroy context.
Definition at line 827 of file popt.c. Referenced by doSetupMacro(), main(), parseDescription(), parseFiles(), and parseScript(). |
|
Return current option's argument.
Definition at line 806 of file popt.c. Referenced by main(), parseDescription(), parseFiles(), and parseScript(). |
|
Return remaining arguments.
Definition at line 818 of file popt.c. Referenced by main(). |
|
Initialize popt context.
Definition at line 102 of file popt.c. Referenced by doSetupMacro(), main(), parseDescription(), parseFiles(), and parseScript(). |
|
Return argv[0] from context.
|
|
Return value of next option found.
Definition at line 531 of file popt.c. Referenced by doSetupMacro(), main(), parseDescription(), parseFiles(), and parseScript(). |
|
Definition at line 800 of file popt.c. Referenced by doSetupMacro(), and main(). |
|
Parse a string into an argument array. The parse allows ', ", and \ quoting, but ' is treated the same as " and both may include \ quotes. @note: The argument array is malloc'd as a single area, so only argv must be free'd.
Definition at line 42 of file poptparse.c. |
|
Peek at current option's argument.
Definition at line 812 of file popt.c. Referenced by main(), parseDescription(), parseFiles(), and parseScript(). |
|
Print detailed description of options.
Definition at line 252 of file popthelp.c. |
|
Print terse description of options.
Definition at line 346 of file popthelp.c. |
|
Read configuration file.
Definition at line 61 of file poptconfig.c. |
|
Read default configuration from /etc/popt and $HOME/.popt.
Definition at line 121 of file poptconfig.c. |
|
Reinitialize popt context.
Definition at line 156 of file popt.c. Referenced by main(), and poptFreeContext(). |
|
Limit search for executables.
Definition at line 33 of file popt.c. Referenced by main(). |
|
Provide text to replace default "[OPTION...]" in help/usage output.
Definition at line 363 of file popthelp.c. |
|
Return formatted error string for popt failure.
Definition at line 890 of file popt.c. Referenced by doSetupMacro(), main(), parseDescription(), parseFiles(), and parseScript(). |
|
Shuffle argv pointers to remove stripped args, returns new argc.
|
|
Add arguments to context.
Definition at line 913 of file popt.c. Referenced by main(). |
|
|