summaryrefslogtreecommitdiff
path: root/popt.h
diff options
context:
space:
mode:
authorjbj <jbj>2008-02-12 23:53:18 +0000
committerjbj <jbj>2008-02-12 23:53:18 +0000
commit2e0e4b219baf0e3901432fd7241d1537735840bc (patch)
tree921712411a42ffc42f7575ba7e0a820074bee1c0 /popt.h
parentb85d91fda8a38a797d0ecb5e761e0f14930c4974 (diff)
downloadlibpopt-2e0e4b219baf0e3901432fd7241d1537735840bc.tar.gz
- jbj: hmmm, POSIXly correct --echo-args needs fixing, disable for now.
- jbj: poptint.h: typedef's for string and string arrays. - jbj: add POPT_ARG_LONGLONG, and poptSaveLongLong().
Diffstat (limited to 'popt.h')
-rw-r--r--popt.h28
1 files changed, 23 insertions, 5 deletions
diff --git a/popt.h b/popt.h
index 9300ec9..406cfb6 100644
--- a/popt.h
+++ b/popt.h
@@ -19,8 +19,8 @@
/*@{*/
#define POPT_ARG_NONE 0U /*!< no arg */
#define POPT_ARG_STRING 1U /*!< arg will be saved as string */
-#define POPT_ARG_INT 2U /*!< arg will be converted to int */
-#define POPT_ARG_LONG 3U /*!< arg will be converted to long */
+#define POPT_ARG_INT 2U /*!< arg ==> int */
+#define POPT_ARG_LONG 3U /*!< arg ==> long */
#define POPT_ARG_INCLUDE_TABLE 4U /*!< arg points to table */
#define POPT_ARG_CALLBACK 5U /*!< table-wide callback... must be
set first in table; arg points
@@ -31,10 +31,11 @@
included tables; arg points
to the domain string */
#define POPT_ARG_VAL 7U /*!< arg should take value val */
-#define POPT_ARG_FLOAT 8U /*!< arg will be converted to float */
-#define POPT_ARG_DOUBLE 9U /*!< arg will be converted to double */
+#define POPT_ARG_FLOAT 8U /*!< arg ==> float */
+#define POPT_ARG_DOUBLE 9U /*!< arg ==> double */
+#define POPT_ARG_LONGLONG 10U /*!< arg ==> long long */
-#define POPT_ARG_MAINCALL 10U /*!< return (*arg) (argc, argv) */
+#define POPT_ARG_MAINCALL 256+10U /*!< EXPERIMENTAL: return (*arg) (argc, argv) */
#define POPT_ARG_MASK 0x0000FFFFU
/*@}*/
@@ -532,6 +533,23 @@ int poptStrippedArgv(poptContext con, int argc, char ** argv)
/*@=fcnuse@*/
/**
+ * Save a long long, performing logical operation with value.
+ * @warning Alignment check may be too strict on certain platorms.
+ * @param arg integer pointer, aligned on int boundary.
+ * @param argInfo logical operation (see POPT_ARGFLAG_*)
+ * @param aLongLong value to use
+ * @return 0 on success, POPT_ERROR_NULLARG/POPT_ERROR_BADOPERATION
+ */
+/*@-incondefs@*/
+/*@unused@*/
+int poptSaveLongLong(/*@null@*/ long long * arg, unsigned int argInfo,
+ long long aLongLong)
+ /*@globals internalState @*/
+ /*@modifies *arg, internalState @*/
+ /*@requires maxSet(arg) >= 0 /\ maxRead(arg) == 0 @*/;
+/*@=incondefs@*/
+
+/**
* Save a long, performing logical operation with value.
* @warning Alignment check may be too strict on certain platorms.
* @param arg integer pointer, aligned on int boundary.