summaryrefslogtreecommitdiff
path: root/popt.h
diff options
context:
space:
mode:
authorewt <ewt>1998-10-21 21:44:18 +0000
committerewt <ewt>1998-10-21 21:44:18 +0000
commit2187e9f136d1044c0658a58623a94bc7583a904a (patch)
treece33d0f4c2661def1b97a7c438ed4ae3a322d49b /popt.h
parent65aa14709bab57bbd5691d5cc7e790728b6469e1 (diff)
downloadlibpopt-2187e9f136d1044c0658a58623a94bc7583a904a.tar.gz
implemented POPT_ARGFLAG_DOC_HIDDEN, POPT_CBFLAG_PRE, POPT_CBFLAG_POST
Diffstat (limited to 'popt.h')
-rw-r--r--popt.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/popt.h b/popt.h
index a759f21..7f953ac 100644
--- a/popt.h
+++ b/popt.h
@@ -20,6 +20,9 @@
callback data to pass */
#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_CBFLAG_PRE 0x80000000 /* call the callback before parse */
+#define POPT_CBFLAG_POST 0x40000000 /* call the callback after parse */
#define POPT_ERROR_NOARG -10
#define POPT_ERROR_BADOPT -11
@@ -62,7 +65,11 @@ typedef struct poptContext_s * poptContext;
typedef struct poptOption * poptOption;
#define POPT_CB_USE_INCLUDE_DATA ((void *) -1)
+enum poptCallbackReason { POPT_CALLBACK_REASON_PRE,
+ POPT_CALLBACK_REASON_POST,
+ POPT_CALLBACK_REASON_OPTION };
typedef void (*poptCallbackType)(poptContext con,
+ enum poptCallbackReason reason,
const struct poptOption * opt,
const char * arg, void * data);