aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_getopt_lib.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-04-07 20:54:53 +0000
committerChristian Grothoff <christian@grothoff.org>2016-04-07 20:54:53 +0000
commited28dd2141e77aa073d81089cb5a07e0a0fc013c (patch)
tree51caa9ce91662983b6f44fdd3f0a0045a1bf2b32 /src/include/gnunet_getopt_lib.h
parent69667eaa594670ae1bb209fda2761798426ec7b1 (diff)
downloadgnunet-ed28dd2141e77aa073d81089cb5a07e0a0fc013c.tar.gz
gnunet-ed28dd2141e77aa073d81089cb5a07e0a0fc013c.zip
expand GNUNET_OS_ProjectData API to also enable de-duplcation of logic for --help
Diffstat (limited to 'src/include/gnunet_getopt_lib.h')
-rw-r--r--src/include/gnunet_getopt_lib.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/include/gnunet_getopt_lib.h b/src/include/gnunet_getopt_lib.h
index 100854e0f..b04020a70 100644
--- a/src/include/gnunet_getopt_lib.h
+++ b/src/include/gnunet_getopt_lib.h
@@ -80,6 +80,7 @@ struct GNUNET_GETOPT_CommandLineProcessorContext
80 80
81}; 81};
82 82
83
83/** 84/**
84 * @brief Process a command line option 85 * @brief Process a command line option
85 * 86 *
@@ -89,11 +90,12 @@ struct GNUNET_GETOPT_CommandLineProcessorContext
89 * @param value argument, NULL if none was given 90 * @param value argument, NULL if none was given
90 * @return #GNUNET_OK to continue processing other options, #GNUNET_SYSERR to abort 91 * @return #GNUNET_OK to continue processing other options, #GNUNET_SYSERR to abort
91 */ 92 */
92typedef int (*GNUNET_GETOPT_CommandLineOptionProcessor) (struct 93typedef int
93 GNUNET_GETOPT_CommandLineProcessorContext *ctx, 94(*GNUNET_GETOPT_CommandLineOptionProcessor) (struct
94 void *scls, 95 GNUNET_GETOPT_CommandLineProcessorContext *ctx,
95 const char *option, 96 void *scls,
96 const char *value); 97 const char *option,
98 const char *value);
97 99
98/** 100/**
99 * @brief Definition of a command line option. 101 * @brief Definition of a command line option.
@@ -122,7 +124,8 @@ struct GNUNET_GETOPT_CommandLineOption
122 const char *description; 124 const char *description;
123 125
124 /** 126 /**
125 * Is an argument required? 0: #GNUNET_NO (includes optional), 1: #GNUNET_YES. 127 * Is an argument required? #GNUNET_NO (includes optional) or
128 * #GNUNET_YES (required)
126 */ 129 */
127 int require_argument; 130 int require_argument;
128 131