diff options
author | Bart Polot <bart@net.in.tum.de> | 2013-04-18 14:48:42 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2013-04-18 14:48:42 +0000 |
commit | e41a408e2bdf2f7f1a3b91769ba6c47e48bb5595 (patch) | |
tree | 8ba97dd04f2ad6ac18c570b839168fae20641620 /src/include | |
parent | 73703cf9e81d7a705aace4d030bab0befe0c0811 (diff) | |
download | gnunet-e41a408e2bdf2f7f1a3b91769ba6c47e48bb5595.tar.gz gnunet-e41a408e2bdf2f7f1a3b91769ba6c47e48bb5595.zip |
Add filename getopt operator
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/gnunet_getopt_lib.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/include/gnunet_getopt_lib.h b/src/include/gnunet_getopt_lib.h index a22b3f3d3..ce54674d8 100644 --- a/src/include/gnunet_getopt_lib.h +++ b/src/include/gnunet_getopt_lib.h | |||
@@ -304,6 +304,25 @@ int | |||
304 | GNUNET_GETOPT_set_string (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, | 304 | GNUNET_GETOPT_set_string (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, |
305 | void *scls, const char *option, const char *value); | 305 | void *scls, const char *option, const char *value); |
306 | 306 | ||
307 | |||
308 | /** | ||
309 | * Set an option of type 'char *' from the command line doing fs expansion. | ||
310 | * A pointer to this function should be passed as part of the | ||
311 | * 'struct GNUNET_GETOPT_CommandLineOption' array to initialize options | ||
312 | * of this type. It should be followed by a pointer to a value of | ||
313 | * type 'char *', which will be allocated with the requested string. | ||
314 | * | ||
315 | * @param ctx command line processing context | ||
316 | * @param scls additional closure (will point to the 'char *', | ||
317 | * which will be allocated) | ||
318 | * @param option name of the option | ||
319 | * @param value actual value of the option (a string) | ||
320 | * @return GNUNET_OK | ||
321 | */ | ||
322 | int | ||
323 | GNUNET_GETOPT_set_filename (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, | ||
324 | void *scls, const char *option, const char *value); | ||
325 | |||
307 | /** | 326 | /** |
308 | * Set an option of type 'unsigned int' from the command line. Each | 327 | * Set an option of type 'unsigned int' from the command line. Each |
309 | * time the option flag is given, the value is incremented by one. | 328 | * time the option flag is given, the value is incremented by one. |