aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_getopt_lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_getopt_lib.h')
-rw-r--r--src/include/gnunet_getopt_lib.h54
1 files changed, 28 insertions, 26 deletions
diff --git a/src/include/gnunet_getopt_lib.h b/src/include/gnunet_getopt_lib.h
index 0fb7ec84e..e6afa2b3c 100644
--- a/src/include/gnunet_getopt_lib.h
+++ b/src/include/gnunet_getopt_lib.h
@@ -207,9 +207,10 @@ struct GNUNET_GETOPT_CommandLineOption
207 * @return index into argv with first non-option 207 * @return index into argv with first non-option
208 * argument, or GNUNET_SYSERR on error 208 * argument, or GNUNET_SYSERR on error
209 */ 209 */
210int GNUNET_GETOPT_run (const char *binaryOptions, 210int
211 const struct GNUNET_GETOPT_CommandLineOption *allOptions, 211GNUNET_GETOPT_run (const char *binaryOptions,
212 unsigned int argc, char *const *argv); 212 const struct GNUNET_GETOPT_CommandLineOption *allOptions,
213 unsigned int argc, char *const *argv);
213 214
214 215
215/** 216/**
@@ -225,9 +226,9 @@ int GNUNET_GETOPT_run (const char *binaryOptions,
225 * @param value actual value of the option as a string. 226 * @param value actual value of the option as a string.
226 * @return GNUNET_OK if parsing the value worked 227 * @return GNUNET_OK if parsing the value worked
227 */ 228 */
228int GNUNET_GETOPT_set_ulong (struct GNUNET_GETOPT_CommandLineProcessorContext 229int
229 *ctx, void *scls, const char *option, 230GNUNET_GETOPT_set_ulong (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx,
230 const char *value); 231 void *scls, const char *option, const char *value);
231 232
232 233
233/** 234/**
@@ -243,9 +244,9 @@ int GNUNET_GETOPT_set_ulong (struct GNUNET_GETOPT_CommandLineProcessorContext
243 * @param value actual value of the option as a string. 244 * @param value actual value of the option as a string.
244 * @return GNUNET_OK if parsing the value worked 245 * @return GNUNET_OK if parsing the value worked
245 */ 246 */
246int GNUNET_GETOPT_set_uint (struct GNUNET_GETOPT_CommandLineProcessorContext 247int
247 *ctx, void *scls, const char *option, 248GNUNET_GETOPT_set_uint (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx,
248 const char *value); 249 void *scls, const char *option, const char *value);
249 250
250 251
251/** 252/**
@@ -262,9 +263,9 @@ int GNUNET_GETOPT_set_uint (struct GNUNET_GETOPT_CommandLineProcessorContext
262 * @param value not used (NULL) 263 * @param value not used (NULL)
263 * @return GNUNET_OK 264 * @return GNUNET_OK
264 */ 265 */
265int GNUNET_GETOPT_set_one (struct GNUNET_GETOPT_CommandLineProcessorContext 266int
266 *ctx, void *scls, const char *option, 267GNUNET_GETOPT_set_one (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx,
267 const char *value); 268 void *scls, const char *option, const char *value);
268 269
269 270
270/** 271/**
@@ -281,9 +282,9 @@ int GNUNET_GETOPT_set_one (struct GNUNET_GETOPT_CommandLineProcessorContext
281 * @param value actual value of the option (a string) 282 * @param value actual value of the option (a string)
282 * @return GNUNET_OK 283 * @return GNUNET_OK
283 */ 284 */
284int GNUNET_GETOPT_set_string (struct GNUNET_GETOPT_CommandLineProcessorContext 285int
285 *ctx, void *scls, const char *option, 286GNUNET_GETOPT_set_string (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx,
286 const char *value); 287 void *scls, const char *option, const char *value);
287 288
288/** 289/**
289 * Set an option of type 'unsigned int' from the command line. Each 290 * Set an option of type 'unsigned int' from the command line. Each
@@ -299,10 +300,10 @@ int GNUNET_GETOPT_set_string (struct GNUNET_GETOPT_CommandLineProcessorContext
299 * @param value not used (NULL) 300 * @param value not used (NULL)
300 * @return GNUNET_OK 301 * @return GNUNET_OK
301 */ 302 */
302int GNUNET_GETOPT_increment_value (struct 303int
303 GNUNET_GETOPT_CommandLineProcessorContext 304GNUNET_GETOPT_increment_value (struct GNUNET_GETOPT_CommandLineProcessorContext
304 *ctx, void *scls, const char *option, 305 *ctx, void *scls, const char *option,
305 const char *value); 306 const char *value);
306 307
307 308
308/* *************** internal prototypes - use macros above! ************* */ 309/* *************** internal prototypes - use macros above! ************* */
@@ -316,9 +317,10 @@ int GNUNET_GETOPT_increment_value (struct
316 * @param value not used (NULL) 317 * @param value not used (NULL)
317 * @return GNUNET_SYSERR (do not continue) 318 * @return GNUNET_SYSERR (do not continue)
318 */ 319 */
319int GNUNET_GETOPT_format_help_ (struct GNUNET_GETOPT_CommandLineProcessorContext 320int
320 *ctx, void *scls, const char *option, 321GNUNET_GETOPT_format_help_ (struct GNUNET_GETOPT_CommandLineProcessorContext
321 const char *value); 322 *ctx, void *scls, const char *option,
323 const char *value);
322 324
323/** 325/**
324 * Print out program version (implements --version). 326 * Print out program version (implements --version).
@@ -329,10 +331,10 @@ int GNUNET_GETOPT_format_help_ (struct GNUNET_GETOPT_CommandLineProcessorContext
329 * @param value not used (NULL) 331 * @param value not used (NULL)
330 * @return GNUNET_SYSERR (do not continue) 332 * @return GNUNET_SYSERR (do not continue)
331 */ 333 */
332int GNUNET_GETOPT_print_version_ (struct 334int
333 GNUNET_GETOPT_CommandLineProcessorContext 335GNUNET_GETOPT_print_version_ (struct GNUNET_GETOPT_CommandLineProcessorContext
334 *ctx, void *scls, const char *option, 336 *ctx, void *scls, const char *option,
335 const char *value); 337 const char *value);
336 338
337#if 0 /* keep Emacsens' auto-indent happy */ 339#if 0 /* keep Emacsens' auto-indent happy */
338{ 340{