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 |
Arg modifiers | |
#define | POPT_ARGFLAG_ONEDASH 0x80000000 |
Callback modifiers | |
#define | POPT_CBFLAG_PRE 0x80000000 |
Error return values | |
#define | POPT_ERROR_NOARG -10 |
poptBadOption() flags | |
#define | POPT_BADOPTION_NOALIAS (1 << 0) |
poptGetContext() flags | |
#define | POPT_CONTEXT_NO_EXEC (1 << 0) |
Auto-generated help/usage | |
struct poptOption | poptHelpOptions [] |
Functions | |
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) |
void | poptPrintHelp (poptContext con, FILE * f, int flags) |
void | poptPrintUsage (poptContext con, FILE * f, int flags) |
void | poptSetOtherOptionHelp (poptContext con, const char * text) |
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 newAlias, int flags) |
const char* const | poptStrerror (const int error) |
void | poptSetExecPath (poptContext con, const char * path, int allowAbsolute) |
const char* | poptGetInvocationName (poptContext con) |
int | poptStrippedArgv (poptContext con, int argc, char **argv) |
|
allow -longoption |
|
no arg |
|
don't go into an alias |
|
call the callback before parse |
|
ignore exec expansions |
|
missing argument |
|
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. Referenced by handleAlias(), poptParseArgvString(), and poptStuffArgs(). |
|
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. Referenced by addOrAppendListEntry(), configLine(), doScript(), doSetupMacro(), execCommand(), ftpGlob(), handlePreambleTag(), parseDescription(), parseFiles(), parseScript(), and rpmGlob(). |
|
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. Referenced by displayArgs(). |
|
Print terse description of options.
Definition at line 346 of file popthelp.c. Referenced by displayArgs(). |
|
Read configuration file.
Definition at line 61 of file poptconfig.c. Referenced by main(), and poptReadDefaultConfig(). |
|
Read default configuration from /etc/popt and $HOME/.popt.
Definition at line 121 of file poptconfig.c. Referenced by main(). |
|
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(). |
|
Initializer: { { NULL, '\0', POPT_ARG_CALLBACK, (void *)&displayArgs, '\0', NULL, NULL }, { "help", '?', 0, NULL, '?', "Show this help message" , NULL }, { "usage", '\0', 0, NULL, 'u', "Display brief usage message" , NULL }, POPT_TABLEEND } Definition at line 26 of file popthelp.c. |