51 #define POPT_OPTION_DEPTH 10 56 #define POPT_ARG_NONE 0U 57 #define POPT_ARG_STRING 1U 58 #define POPT_ARG_INT 2U 59 #define POPT_ARG_LONG 3U 60 #define POPT_ARG_INCLUDE_TABLE 4U 61 #define POPT_ARG_CALLBACK 5U 65 #define POPT_ARG_INTL_DOMAIN 6U 69 #define POPT_ARG_VAL 7U 70 #define POPT_ARG_FLOAT 8U 71 #define POPT_ARG_DOUBLE 9U 72 #define POPT_ARG_LONGLONG 10U 74 #define POPT_ARG_MAINCALL 16U+11U 75 #define POPT_ARG_ARGV 12U 76 #define POPT_ARG_SHORT 13U 77 #define POPT_ARG_BITSET 16U+14U 79 #define POPT_ARG_MASK 0x000000FFU 80 #define POPT_GROUP_MASK 0x0000FF00U 85 #define POPT_ARGFLAG_ONEDASH 0x80000000U 86 #define POPT_ARGFLAG_DOC_HIDDEN 0x40000000U 87 #define POPT_ARGFLAG_STRIP 0x20000000U 88 #define POPT_ARGFLAG_OPTIONAL 0x10000000U 90 #define POPT_ARGFLAG_OR 0x08000000U 91 #define POPT_ARGFLAG_NOR 0x09000000U 92 #define POPT_ARGFLAG_AND 0x04000000U 93 #define POPT_ARGFLAG_NAND 0x05000000U 94 #define POPT_ARGFLAG_XOR 0x02000000U 95 #define POPT_ARGFLAG_NOT 0x01000000U 96 #define POPT_ARGFLAG_LOGICALOPS \ 97 (POPT_ARGFLAG_OR|POPT_ARGFLAG_AND|POPT_ARGFLAG_XOR) 99 #define POPT_BIT_SET (POPT_ARG_VAL|POPT_ARGFLAG_OR) 101 #define POPT_BIT_CLR (POPT_ARG_VAL|POPT_ARGFLAG_NAND) 104 #define POPT_ARGFLAG_SHOW_DEFAULT 0x00800000U 105 #define POPT_ARGFLAG_RANDOM 0x00400000U 106 #define POPT_ARGFLAG_TOGGLE 0x00200000U 111 #define POPT_CBFLAG_PRE 0x80000000U 112 #define POPT_CBFLAG_POST 0x40000000U 113 #define POPT_CBFLAG_INC_DATA 0x20000000U 115 #define POPT_CBFLAG_SKIPOPTION 0x10000000U 116 #define POPT_CBFLAG_CONTINUE 0x08000000U 121 #define POPT_ERROR_NOARG -10 122 #define POPT_ERROR_BADOPT -11 123 #define POPT_ERROR_OPTSTOODEEP -13 124 #define POPT_ERROR_BADQUOTE -15 125 #define POPT_ERROR_ERRNO -16 126 #define POPT_ERROR_BADNUMBER -17 127 #define POPT_ERROR_OVERFLOW -18 128 #define POPT_ERROR_BADOPERATION -19 129 #define POPT_ERROR_NULLARG -20 130 #define POPT_ERROR_MALLOC -21 131 #define POPT_ERROR_BADCONFIG -22 136 #define POPT_BADOPTION_NOALIAS (1U << 0) 141 #define POPT_CONTEXT_NO_EXEC (1U << 0) 142 #define POPT_CONTEXT_KEEP_FIRST (1U << 1) 143 #define POPT_CONTEXT_POSIXMEHARDER (1U << 2) 144 #define POPT_CONTEXT_ARG_OPTS (1U << 4) 149 const char * longName;
151 unsigned int argInfo;
154 const char * descrip;
155 const char * argDescrip;
185 #define POPT_AUTOALIAS { NULL, '\0', POPT_ARG_INCLUDE_TABLE, poptAliasOptions, \ 186 0, "Options implemented via popt alias/exec:", NULL }, 204 #define __attribute__(x) 207 #define UNUSED(x) x __attribute__((__unused__)) 215 #define POPT_TABLEEND { NULL, '\0', 0, NULL, 0, NULL, NULL } 220 #define POPT_AUTOHELP { NULL, '\0', POPT_ARG_INCLUDE_TABLE, poptHelpOptionsAutoHelp, \ 221 0, "Help options:", NULL }, 265 int argc,
const char ** argv,
287 const char * configPaths);
382 size_t * nbp,
int flags);
383 #define POPT_READFILE_TRIMNEWLINES 1 425 const char *** argvPtr);
439 int * argcPtr,
const char *** argvPtr);
562 long long aLongLong);
596 unsigned int bits[1];
599 #define _POPT_BITS_N 1024U 600 #define _POPT_BITS_M ((3U * _POPT_BITS_N) / 2U) 601 #define _POPT_BITS_K 16U int poptBitsChk(poptBits bits, const char *s)
int poptDupArgv(int argc, const char **argv, int *argcPtr, const char ***argvPtr)
const char ** poptGetArgs(poptContext con)
poptContext poptFreeContext(poptContext con)
void poptSetExecPath(poptContext con, const char *path, int allowAbsolute)
struct poptOption poptAliasOptions[]
int poptStuffArgs(poptContext con, const char **argv)
const char * poptGetInvocationName(poptContext con)
Declares system-dependent import/export macros and libraries.
int poptBitsIntersect(poptBits *ap, const poptBits b)
void poptPrintHelp(poptContext con, FILE *fp, int flags)
int poptBitsArgs(poptContext con, poptBits *ap)
int poptSaneFile(const char *fn)
int poptBitsDel(poptBits bits, const char *s)
int poptReadConfigFile(poptContext con, const char *fn)
struct poptItem_s * poptItem
struct poptOption * poptOption
int poptStrippedArgv(poptContext con, int argc, char **argv)
struct poptOption * poptHelpOptionsAutoHelp
int poptSaveBits(poptBits *bitsp, unsigned int argInfo, const char *s)
char * poptGetOptArg(poptContext con)
int poptBitsClr(poptBits bits)
poptContext poptFini(poptContext con)
void poptResetContext(poptContext con)
void poptSetOtherOptionHelp(poptContext con, const char *text)
int poptSaveString(const char ***argvp, unsigned int argInfo, const char *val)
const char * poptGetArg(poptContext con)
int poptReadFile(const char *fn, char **bp, size_t *nbp, int flags)
void poptPrintUsage(poptContext con, FILE *fp, int flags)
int poptSaveShort(short *arg, unsigned int argInfo, long aLong)
struct poptContext_s * poptContext
int poptReadConfigFiles(poptContext con, const char *paths)
int poptAddAlias(poptContext con, struct poptAlias alias, int flags)
int poptSaveLong(long *arg, unsigned int argInfo, long aLong)
int poptAddItem(poptContext con, poptItem newItem, int flags)
int poptGetNextOpt(poptContext con)
int poptSaveInt(int *arg, unsigned int argInfo, long aLong)
const char * poptPeekArg(poptContext con)
int poptConfigFileToString(FILE *fp, char **argstrp, int flags)
struct poptOption * poptHelpOptionsI18N
void displayArgs(poptContext con, enum poptCallbackReason foo __attribute__((__unused__)), struct poptOption *key, const char *arg __attribute__((__unused__)), void *data __attribute__((__unused__)))
struct poptBits_s * poptBits
int poptReadDefaultConfig(poptContext con, int useEnv)
poptContext poptGetContext(const char *name, int argc, const char **argv, const struct poptOption *options, unsigned int flags)
poptContext poptInit(int argc, const char **argv, const struct poptOption *options, const char *configPaths)
int poptParseArgvString(const char *s, int *argcPtr, const char ***argvPtr)
const char * poptStrerror(const int error)
int poptBitsAdd(poptBits bits, const char *s)
int poptBitsUnion(poptBits *ap, const poptBits b)
const char * poptBadOption(poptContext con, unsigned int flags)
int poptSaveLongLong(long long *arg, unsigned int argInfo, long long aLongLong)
void(* poptCallbackType)(poptContext con, enum poptCallbackReason reason, const struct poptOption *opt, const char *arg, const void *data)