summaryrefslogtreecommitdiff
path: root/support/poptint.h
diff options
context:
space:
mode:
Diffstat (limited to 'support/poptint.h')
-rw-r--r--support/poptint.h48
1 files changed, 15 insertions, 33 deletions
diff --git a/support/poptint.h b/support/poptint.h
index 1688095..62cc60a 100644
--- a/support/poptint.h
+++ b/support/poptint.h
@@ -5,30 +5,13 @@
#ifndef H_POPTINT
#define H_POPTINT
-/* Bit mask macros. */
-typedef unsigned int __pbm_bits;
-#define __PBM_NBITS (8 * sizeof (__pbm_bits))
-#define __PBM_IX(d) ((d) / __PBM_NBITS)
-#define __PBM_MASK(d) ((__pbm_bits) 1 << ((d) % __PBM_NBITS))
-typedef struct {
- __pbm_bits bits[1];
-} pbm_set;
-#define __PBM_BITS(set) ((set)->bits)
-
-#define PBM_ALLOC(d) calloc(__PBM_IX (d) + 1, sizeof(__pbm_bits))
-#define PBM_FREE(s) free(s);
-#define PBM_SET(d, s) (__PBM_BITS (s)[__PBM_IX (d)] |= __PBM_MASK (d))
-#define PBM_CLR(d, s) (__PBM_BITS (s)[__PBM_IX (d)] &= ~__PBM_MASK (d))
-#define PBM_ISSET(d, s) ((__PBM_BITS (s)[__PBM_IX (d)] & __PBM_MASK (d)) != 0)
-
struct optionStackEntry {
int argc;
- /*@only@*/ const char ** argv;
- /*@only@*/ pbm_set * argb;
+ const char ** argv;
int next;
- /*@only@*/ const char * nextArg;
- /*@keep@*/ const char * nextCharArg;
- /*@dependent@*/ struct poptAlias * currAlias;
+ const char * nextArg;
+ const char * nextCharArg;
+ struct poptAlias * currAlias;
int stuffed;
};
@@ -39,26 +22,25 @@ struct execEntry {
};
struct poptContext_s {
- struct optionStackEntry optionStack[POPT_OPTION_DEPTH];
- /*@dependent@*/ struct optionStackEntry * os;
- /*@owned@*/ const char ** leftovers;
+ struct optionStackEntry optionStack[POPT_OPTION_DEPTH], * os;
+ const char ** leftovers;
int numLeftovers;
int nextLeftover;
- /*@keep@*/ const struct poptOption * options;
+ const struct poptOption * options;
int restLeftover;
- /*@only@*/ const char * appName;
- /*@only@*/ struct poptAlias * aliases;
+ const char * appName;
+ struct poptAlias * aliases;
int numAliases;
int flags;
struct execEntry * execs;
int numExecs;
- /*@only@*/ const char ** finalArgv;
+ const char ** finalArgv;
int finalArgvCount;
int finalArgvAlloced;
- /*@dependent@*/ struct execEntry * doExec;
- /*@only@*/ const char * execPath;
+ struct execEntry * doExec;
+ const char * execPath;
int execAbsolute;
- /*@only@*/ const char * otherHelp;
+ const char * otherHelp;
};
#define xfree(_a) free((void *)_a)
@@ -67,13 +49,13 @@ struct poptContext_s {
#include <libintl.h>
#endif
-#if defined(HAVE_GETTEXT) && !defined(__LCLINT__)
+#ifdef HAVE_GETTEXT
#define _(foo) gettext(foo)
#else
#define _(foo) (foo)
#endif
-#if defined(HAVE_DGETTEXT) && !defined(__LCLINT__)
+#ifdef HAVE_DGETTEXT
#define D_(dom, str) dgettext(dom, str)
#define POPT_(foo) D_("popt", foo)
#else