Mercurial > hg > th-libs
diff th_args.h @ 137:0f43a94516f4
Improve argument handling module.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 25 Sep 2014 03:37:08 +0300 |
parents | 286b2249c5d2 |
children | f81c6dc7bd0f |
line wrap: on
line diff
--- a/th_args.h Thu Sep 25 03:18:27 2014 +0300 +++ b/th_args.h Thu Sep 25 03:37:08 2014 +0300 @@ -21,6 +21,11 @@ #define OPT_ARGREQ (1) // Option requires an argument #define OPT_ARGMASK (3) // Mask for option argument flags +#define OPTH_BAILOUT 0x0001 // Bail out on errors +#define OPTH_ONLY_OPTS 0x0010 // Handle only options +#define OPTH_ONLY_OTHER 0x0020 // Handle only "non-options" +#define OPTH_ONLY_MASK 0x00f0 // Mask + typedef struct { @@ -35,7 +40,7 @@ BOOL th_args_process(int argc, char *argv[], optarg_t argList[], int argListN, BOOL (*handleOpt)(int, char *, char *), - BOOL (*handleFile)(char *), BOOL); + BOOL (*handleFile)(char *), int flags); void th_args_help(FILE *, optarg_t optList[], int optListN);