diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2023-02-10 15:27:06 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2023-02-10 15:27:06 +0100 |
commit | 7501bff8432444b7ae8e7f3d9289c0d61f3f0b64 (patch) | |
tree | bd53603f464c3747e897a8996158a0fef7b41bc3 /include/libHX/option.h | |
parent | 0f124df68d87c9073f76efeff1a901a69b1f3e13 (diff) | |
parent | 9e9336185f86bd97ff22f54e4d561c2cccccecf5 (diff) |
Merge branch 'release/debian/4.10-1'debian/4.10-1
Diffstat (limited to 'include/libHX/option.h')
-rw-r--r-- | include/libHX/option.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/include/libHX/option.h b/include/libHX/option.h index 82255d3..40cc6e7 100644 --- a/include/libHX/option.h +++ b/include/libHX/option.h @@ -27,12 +27,12 @@ extern struct HXformat_map *HXformat_init(void); extern void HXformat_free(struct HXformat_map *); extern int HXformat_add(struct HXformat_map *, const char *, const void *, unsigned int); -extern int HXformat_aprintf(const struct HXformat_map *, - hxmc_t **, const char *); -extern int HXformat_sprintf(const struct HXformat_map *, - char *, size_t, const char *); -extern int HXformat_fprintf(const struct HXformat_map *, - FILE *, const char *); +#define HXformat_aprintf(a, b, c) HXformat3_aprintf((a), (b), (c)) +#define HXformat_fprintf(a, b, c) HXformat3_fprintf((a), (b), (c)) +#define HXformat_sprintf(a, b, c, d) HXformat3_sprintf((a), (b), (c), (d)) +extern ssize_t HXformat3_aprintf(const struct HXformat_map *, hxmc_t **, const char *); +extern ssize_t HXformat3_fprintf(const struct HXformat_map *, FILE *, const char *); +extern ssize_t HXformat3_sprintf(const struct HXformat_map *, char *, size_t, const char *); /* * OPT.C @@ -77,7 +77,7 @@ extern int HXformat_fprintf(const struct HXformat_map *, * Type expected of struct HXoption.ptr is given in (). * HX_getopt (o) and HXformat_* (f) support different sets, marked with []. */ -enum HX_option_type { +enum { HXTYPE_NONE = 0, HXTYPE_VAL, HXTYPE_SVAL, @@ -110,7 +110,6 @@ enum HX_option_type { HXTYPE_XSNTMARK, HXTYPE_XHELP, /* 30 */ HXTYPE_SIZE_T, -}; /** * Extra flags to be OR'ed into struct HXoption.type. @@ -125,7 +124,6 @@ enum HX_option_type { * %HXOPT_AND: AND *ptr by argument * %HXOPT_XOR: XOR *ptr by argument */ -enum { HXOPT_OPTIONAL = 1 << 6, HXOPT_INC = 1 << 7, HXOPT_DEC = 1 << 8, @@ -144,6 +142,7 @@ enum { * %HXOPT_USAGEONERR: print out short usage when a parsing error occurs * %HXOPT_RQ_ORDER: require option order/POSIX mode: * first non-option terminates option processing + * %HXOPT_KEEP_ARGV: do not replace argc/argv at all */ enum { HXOPT_PTHRU = 1 << 0, @@ -152,6 +151,7 @@ enum { HXOPT_HELPONERR = 1 << 3, HXOPT_USAGEONERR = 1 << 4, HXOPT_RQ_ORDER = 1 << 5, + HXOPT_KEEP_ARGV = 1 << 6, }; /** |