diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-09-09 18:36:01 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-09-09 18:36:01 +0000 |
commit | 15af56ceb3ae31463a79c95b34841fbdec920ba5 (patch) | |
tree | 1e1de33b94a3cd493179a80bcfeaa332b7e3fc10 /src/include/gnunet_getopt_lib.h | |
parent | 85869129442a971414710ebd8bef97433570083b (diff) | |
download | gnunet-15af56ceb3ae31463a79c95b34841fbdec920ba5.tar.gz gnunet-15af56ceb3ae31463a79c95b34841fbdec920ba5.zip |
new getopt helper function to parse relative time command line argument
Diffstat (limited to 'src/include/gnunet_getopt_lib.h')
-rw-r--r-- | src/include/gnunet_getopt_lib.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/include/gnunet_getopt_lib.h b/src/include/gnunet_getopt_lib.h index 4b1873c6e..14ba15d66 100644 --- a/src/include/gnunet_getopt_lib.h +++ b/src/include/gnunet_getopt_lib.h | |||
@@ -232,6 +232,24 @@ GNUNET_GETOPT_set_ulong (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, | |||
232 | 232 | ||
233 | 233 | ||
234 | /** | 234 | /** |
235 | * Set an option of type 'struct GNUNET_TIME_Relative' from the command line. | ||
236 | * A pointer to this function should be passed as part of the | ||
237 | * 'struct GNUNET_GETOPT_CommandLineOption' array to initialize options | ||
238 | * of this type. It should be followed by a pointer to a value of | ||
239 | * type 'struct GNUNET_TIME_Relative'. | ||
240 | * | ||
241 | * @param ctx command line processing context | ||
242 | * @param scls additional closure (will point to the 'struct GNUNET_TIME_Relative') | ||
243 | * @param option name of the option | ||
244 | * @param value actual value of the option as a string. | ||
245 | * @return GNUNET_OK if parsing the value worked | ||
246 | */ | ||
247 | int | ||
248 | GNUNET_GETOPT_set_relative_time (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, | ||
249 | void *scls, const char *option, const char *value); | ||
250 | |||
251 | |||
252 | /** | ||
235 | * Set an option of type 'unsigned int' from the command line. | 253 | * Set an option of type 'unsigned int' from the command line. |
236 | * A pointer to this function should be passed as part of the | 254 | * A pointer to this function should be passed as part of the |
237 | * 'struct GNUNET_GETOPT_CommandLineOption' array to initialize options | 255 | * 'struct GNUNET_GETOPT_CommandLineOption' array to initialize options |