From e41a408e2bdf2f7f1a3b91769ba6c47e48bb5595 Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Thu, 18 Apr 2013 14:48:42 +0000 Subject: Add filename getopt operator --- src/include/gnunet_getopt_lib.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/include/gnunet_getopt_lib.h') 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 GNUNET_GETOPT_set_string (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, void *scls, const char *option, const char *value); + +/** + * Set an option of type 'char *' from the command line doing fs expansion. + * A pointer to this function should be passed as part of the + * 'struct GNUNET_GETOPT_CommandLineOption' array to initialize options + * of this type. It should be followed by a pointer to a value of + * type 'char *', which will be allocated with the requested string. + * + * @param ctx command line processing context + * @param scls additional closure (will point to the 'char *', + * which will be allocated) + * @param option name of the option + * @param value actual value of the option (a string) + * @return GNUNET_OK + */ +int +GNUNET_GETOPT_set_filename (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, + void *scls, const char *option, const char *value); + /** * Set an option of type 'unsigned int' from the command line. Each * time the option flag is given, the value is incremented by one. -- cgit v1.2.3