aboutsummaryrefslogtreecommitdiffstats
path: root/common/argparse.h
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2014-10-29 16:07:51 +0000
committerWerner Koch <[email protected]>2014-10-29 16:07:51 +0000
commit0d73a242cb53522669cf712b5ece7d1ed05d003a (patch)
treeae9494b2b7b11cd349afc7a5400cbdcffdd32be7 /common/argparse.h
parentFix stdint.h problem for Apple. (diff)
downloadgnupg-0d73a242cb53522669cf712b5ece7d1ed05d003a.tar.gz
gnupg-0d73a242cb53522669cf712b5ece7d1ed05d003a.zip
common: Check option arguments for a valid range.
* common/argparse.h (ARGPARSE_INVALID_ARG): New. * common/argparse.c: Include limits h and errno.h. (initialize): Add error strings for new error constant. (set_opt_arg): Add range checking. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to '')
-rw-r--r--common/argparse.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/common/argparse.h b/common/argparse.h
index 29c7b6252..471cf7479 100644
--- a/common/argparse.h
+++ b/common/argparse.h
@@ -190,6 +190,7 @@ typedef struct
#define ARGPARSE_AMBIGUOUS_COMMAND (-9)
#define ARGPARSE_INVALID_ALIAS (-10)
#define ARGPARSE_OUT_OF_CORE (-11)
+#define ARGPARSE_INVALID_ARG (-12)
int arg_parse( ARGPARSE_ARGS *arg, ARGPARSE_OPTS *opts);