diff options
author | jsing <> | 2014-08-30 15:14:03 +0000 |
---|---|---|
committer | jsing <> | 2014-08-30 15:14:03 +0000 |
commit | 3016f0d916cff2fa5c93e769e25ded6c34e7fb73 (patch) | |
tree | 8ed740b7b669337787dbbd76c503eee8d41199e2 /src/usr.bin/openssl/apps.h | |
parent | 8e6e28726f906fbe995c6de7cd80d82e57955744 (diff) | |
download | openbsd-3016f0d916cff2fa5c93e769e25ded6c34e7fb73.tar.gz openbsd-3016f0d916cff2fa5c93e769e25ded6c34e7fb73.tar.bz2 openbsd-3016f0d916cff2fa5c93e769e25ded6c34e7fb73.zip |
Move the callback function pointer outside the opt union so that the option
values are useable by the function. Also provide an option type that calls
a function without consuming/passing an argument.
Diffstat (limited to 'src/usr.bin/openssl/apps.h')
-rw-r--r-- | src/usr.bin/openssl/apps.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/usr.bin/openssl/apps.h b/src/usr.bin/openssl/apps.h index 277dcc3699..ea6be60a44 100644 --- a/src/usr.bin/openssl/apps.h +++ b/src/usr.bin/openssl/apps.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: apps.h,v 1.6 2014/08/28 14:15:28 jsing Exp $ */ | 1 | /* $OpenBSD: apps.h,v 1.7 2014/08/30 15:14:03 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -291,6 +291,7 @@ struct option { | |||
291 | OPTION_ARG_FORMAT, | 291 | OPTION_ARG_FORMAT, |
292 | OPTION_ARG_FUNC, | 292 | OPTION_ARG_FUNC, |
293 | OPTION_ARG_INT, | 293 | OPTION_ARG_INT, |
294 | OPTION_FUNC, | ||
294 | OPTION_FLAG, | 295 | OPTION_FLAG, |
295 | OPTION_FLAG_ORD, | 296 | OPTION_FLAG_ORD, |
296 | OPTION_VALUE, | 297 | OPTION_VALUE, |
@@ -298,9 +299,9 @@ struct option { | |||
298 | union { | 299 | union { |
299 | char **arg; | 300 | char **arg; |
300 | int *flag; | 301 | int *flag; |
301 | int (*func)(struct option *opt, char *arg); | ||
302 | int *value; | 302 | int *value; |
303 | } opt; | 303 | } opt; |
304 | int (*func)(struct option *opt, char *arg); | ||
304 | const int value; | 305 | const int value; |
305 | }; | 306 | }; |
306 | 307 | ||