diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-03-25 21:25:44 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-03-25 21:25:44 +0100 |
commit | 5a7cef0202631204485cbcb1e36671e4321a936f (patch) | |
tree | ff3d10ac71f9284f18be7c33939f3438071e15c4 /src/include/gnunet_getopt_lib.h | |
parent | 2ad934742422ecb63fe3fafdc8c73d067a9e2fb7 (diff) | |
download | gnunet-5a7cef0202631204485cbcb1e36671e4321a936f.tar.gz gnunet-5a7cef0202631204485cbcb1e36671e4321a936f.zip |
rename GNUNET_GETOPT functions to achieve better consistency
Diffstat (limited to 'src/include/gnunet_getopt_lib.h')
-rw-r--r-- | src/include/gnunet_getopt_lib.h | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/include/gnunet_getopt_lib.h b/src/include/gnunet_getopt_lib.h index c2bd72340..f707bb091 100644 --- a/src/include/gnunet_getopt_lib.h +++ b/src/include/gnunet_getopt_lib.h | |||
@@ -161,7 +161,7 @@ struct GNUNET_GETOPT_CommandLineOption | |||
161 | * @param about string with brief description of the application | 161 | * @param about string with brief description of the application |
162 | */ | 162 | */ |
163 | struct GNUNET_GETOPT_CommandLineOption | 163 | struct GNUNET_GETOPT_CommandLineOption |
164 | GNUNET_GETOPT_OPTION_HELP (const char *about); | 164 | GNUNET_GETOPT_option_help (const char *about); |
165 | 165 | ||
166 | 166 | ||
167 | /** | 167 | /** |
@@ -171,7 +171,7 @@ GNUNET_GETOPT_OPTION_HELP (const char *about); | |||
171 | * @param version string with the version number | 171 | * @param version string with the version number |
172 | */ | 172 | */ |
173 | struct GNUNET_GETOPT_CommandLineOption | 173 | struct GNUNET_GETOPT_CommandLineOption |
174 | GNUNET_GETOPT_OPTION_VERSION (const char *version); | 174 | GNUNET_GETOPT_option_version (const char *version); |
175 | 175 | ||
176 | 176 | ||
177 | 177 | ||
@@ -181,7 +181,7 @@ GNUNET_GETOPT_OPTION_VERSION (const char *version); | |||
181 | * @param[out] logfn set to the name of the logfile | 181 | * @param[out] logfn set to the name of the logfile |
182 | */ | 182 | */ |
183 | struct GNUNET_GETOPT_CommandLineOption | 183 | struct GNUNET_GETOPT_CommandLineOption |
184 | GNUNET_GETOPT_OPTION_LOGFILE (char **logfn); | 184 | GNUNET_GETOPT_option_logfile (char **logfn); |
185 | 185 | ||
186 | 186 | ||
187 | /** | 187 | /** |
@@ -194,7 +194,7 @@ GNUNET_GETOPT_OPTION_LOGFILE (char **logfn); | |||
194 | * @param[out] str set to the string | 194 | * @param[out] str set to the string |
195 | */ | 195 | */ |
196 | struct GNUNET_GETOPT_CommandLineOption | 196 | struct GNUNET_GETOPT_CommandLineOption |
197 | GNUNET_GETOPT_OPTION_STRING (char shortName, | 197 | GNUNET_GETOPT_option_string (char shortName, |
198 | const char *name, | 198 | const char *name, |
199 | const char *argumentHelp, | 199 | const char *argumentHelp, |
200 | const char *description, | 200 | const char *description, |
@@ -210,7 +210,7 @@ GNUNET_GETOPT_OPTION_STRING (char shortName, | |||
210 | * @param[out] str set to the string | 210 | * @param[out] str set to the string |
211 | */ | 211 | */ |
212 | struct GNUNET_GETOPT_CommandLineOption | 212 | struct GNUNET_GETOPT_CommandLineOption |
213 | GNUNET_GETOPT_OPTION_FILENAME (char shortName, | 213 | GNUNET_GETOPT_option_filename (char shortName, |
214 | const char *name, | 214 | const char *name, |
215 | const char *argumentHelp, | 215 | const char *argumentHelp, |
216 | const char *description, | 216 | const char *description, |
@@ -229,7 +229,7 @@ GNUNET_GETOPT_OPTION_FILENAME (char shortName, | |||
229 | * @param val_size size of @a val in bytes | 229 | * @param val_size size of @a val in bytes |
230 | */ | 230 | */ |
231 | struct GNUNET_GETOPT_CommandLineOption | 231 | struct GNUNET_GETOPT_CommandLineOption |
232 | GNUNET_GETOPT_OPTION_SET_BASE32_FIXED_SIZE (char shortName, | 232 | GNUNET_GETOPT_option_base32_fixed_size (char shortName, |
233 | const char *name, | 233 | const char *name, |
234 | const char *argumentHelp, | 234 | const char *argumentHelp, |
235 | const char *description, | 235 | const char *description, |
@@ -249,8 +249,8 @@ GNUNET_GETOPT_OPTION_SET_BASE32_FIXED_SIZE (char shortName, | |||
249 | * @param[out] val binary value decoded from Crockford Base32-encoded argument; | 249 | * @param[out] val binary value decoded from Crockford Base32-encoded argument; |
250 | * size is determined by type (sizeof (*val)). | 250 | * size is determined by type (sizeof (*val)). |
251 | */ | 251 | */ |
252 | #define GNUNET_GETOPT_OPTION_SET_BASE32_AUTO(shortName,name,argumentHelp,description,val) \ | 252 | #define GNUNET_GETOPT_option_base32_auto(shortName,name,argumentHelp,description,val) \ |
253 | GNUNET_GETOPT_OPTION_SET_BASE32_FIXED_SIZE(shortName,name,argumentHelp,description,val,sizeof(*val)) | 253 | GNUNET_GETOPT_option_base32_fixed_size(shortName,name,argumentHelp,description,val,sizeof(*val)) |
254 | 254 | ||
255 | 255 | ||
256 | /** | 256 | /** |
@@ -263,7 +263,7 @@ GNUNET_GETOPT_OPTION_SET_BASE32_FIXED_SIZE (char shortName, | |||
263 | * @param[out] val set to 1 if the option is present | 263 | * @param[out] val set to 1 if the option is present |
264 | */ | 264 | */ |
265 | struct GNUNET_GETOPT_CommandLineOption | 265 | struct GNUNET_GETOPT_CommandLineOption |
266 | GNUNET_GETOPT_OPTION_SET_ONE (char shortName, | 266 | GNUNET_GETOPT_option_flag (char shortName, |
267 | const char *name, | 267 | const char *name, |
268 | const char *description, | 268 | const char *description, |
269 | int *val); | 269 | int *val); |
@@ -279,7 +279,7 @@ GNUNET_GETOPT_OPTION_SET_ONE (char shortName, | |||
279 | * @param[out] val set to the value specified at the command line | 279 | * @param[out] val set to the value specified at the command line |
280 | */ | 280 | */ |
281 | struct GNUNET_GETOPT_CommandLineOption | 281 | struct GNUNET_GETOPT_CommandLineOption |
282 | GNUNET_GETOPT_OPTION_SET_UINT (char shortName, | 282 | GNUNET_GETOPT_option_uint (char shortName, |
283 | const char *name, | 283 | const char *name, |
284 | const char *argumentHelp, | 284 | const char *argumentHelp, |
285 | const char *description, | 285 | const char *description, |
@@ -296,7 +296,7 @@ GNUNET_GETOPT_OPTION_SET_UINT (char shortName, | |||
296 | * @param[out] val set to the value specified at the command line | 296 | * @param[out] val set to the value specified at the command line |
297 | */ | 297 | */ |
298 | struct GNUNET_GETOPT_CommandLineOption | 298 | struct GNUNET_GETOPT_CommandLineOption |
299 | GNUNET_GETOPT_OPTION_SET_ULONG (char shortName, | 299 | GNUNET_GETOPT_option_ulong (char shortName, |
300 | const char *name, | 300 | const char *name, |
301 | const char *argumentHelp, | 301 | const char *argumentHelp, |
302 | const char *description, | 302 | const char *description, |
@@ -314,7 +314,7 @@ GNUNET_GETOPT_OPTION_SET_ULONG (char shortName, | |||
314 | * @param[out] val set to the time specified at the command line | 314 | * @param[out] val set to the time specified at the command line |
315 | */ | 315 | */ |
316 | struct GNUNET_GETOPT_CommandLineOption | 316 | struct GNUNET_GETOPT_CommandLineOption |
317 | GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME (char shortName, | 317 | GNUNET_GETOPT_option_relative_time (char shortName, |
318 | const char *name, | 318 | const char *name, |
319 | const char *argumentHelp, | 319 | const char *argumentHelp, |
320 | const char *description, | 320 | const char *description, |
@@ -332,7 +332,7 @@ GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME (char shortName, | |||
332 | * @param[out] val set to the time specified at the command line | 332 | * @param[out] val set to the time specified at the command line |
333 | */ | 333 | */ |
334 | struct GNUNET_GETOPT_CommandLineOption | 334 | struct GNUNET_GETOPT_CommandLineOption |
335 | GNUNET_GETOPT_OPTION_SET_ABSOLUTE_TIME (char shortName, | 335 | GNUNET_GETOPT_option_absolute_time (char shortName, |
336 | const char *name, | 336 | const char *name, |
337 | const char *argumentHelp, | 337 | const char *argumentHelp, |
338 | const char *description, | 338 | const char *description, |
@@ -349,7 +349,7 @@ GNUNET_GETOPT_OPTION_SET_ABSOLUTE_TIME (char shortName, | |||
349 | * @param[out] val set to 1 if the option is present | 349 | * @param[out] val set to 1 if the option is present |
350 | */ | 350 | */ |
351 | struct GNUNET_GETOPT_CommandLineOption | 351 | struct GNUNET_GETOPT_CommandLineOption |
352 | GNUNET_GETOPT_OPTION_INCREMENT_VALUE (char shortName, | 352 | GNUNET_GETOPT_option_increment_uint (char shortName, |
353 | const char *name, | 353 | const char *name, |
354 | const char *description, | 354 | const char *description, |
355 | unsigned int *val); | 355 | unsigned int *val); |
@@ -362,7 +362,7 @@ GNUNET_GETOPT_OPTION_INCREMENT_VALUE (char shortName, | |||
362 | * @param[out] level set to the log level | 362 | * @param[out] level set to the log level |
363 | */ | 363 | */ |
364 | struct GNUNET_GETOPT_CommandLineOption | 364 | struct GNUNET_GETOPT_CommandLineOption |
365 | GNUNET_GETOPT_OPTION_LOGLEVEL (char **level); | 365 | GNUNET_GETOPT_option_loglevel (char **level); |
366 | 366 | ||
367 | 367 | ||
368 | /** | 368 | /** |
@@ -372,7 +372,7 @@ GNUNET_GETOPT_OPTION_LOGLEVEL (char **level); | |||
372 | * @param[out] level set to the verbosity level | 372 | * @param[out] level set to the verbosity level |
373 | */ | 373 | */ |
374 | struct GNUNET_GETOPT_CommandLineOption | 374 | struct GNUNET_GETOPT_CommandLineOption |
375 | GNUNET_GETOPT_OPTION_VERBOSE (unsigned int *level); | 375 | GNUNET_GETOPT_option_verbose (unsigned int *level); |
376 | 376 | ||
377 | 377 | ||
378 | /** | 378 | /** |
@@ -381,7 +381,7 @@ GNUNET_GETOPT_OPTION_VERBOSE (unsigned int *level); | |||
381 | * @param[out] logfn set to the name of the logfile | 381 | * @param[out] logfn set to the name of the logfile |
382 | */ | 382 | */ |
383 | struct GNUNET_GETOPT_CommandLineOption | 383 | struct GNUNET_GETOPT_CommandLineOption |
384 | GNUNET_GETOPT_OPTION_LOGFILE (char **logfn); | 384 | GNUNET_GETOPT_option_logfile (char **logfn); |
385 | 385 | ||
386 | 386 | ||
387 | /** | 387 | /** |
@@ -390,7 +390,7 @@ GNUNET_GETOPT_OPTION_LOGFILE (char **logfn); | |||
390 | * @param[out] fn set to the name of the configuration file | 390 | * @param[out] fn set to the name of the configuration file |
391 | */ | 391 | */ |
392 | struct GNUNET_GETOPT_CommandLineOption | 392 | struct GNUNET_GETOPT_CommandLineOption |
393 | GNUNET_GETOPT_OPTION_CFG_FILE (char **fn); | 393 | GNUNET_GETOPT_option_cfgfile (char **fn); |
394 | 394 | ||
395 | 395 | ||
396 | /** | 396 | /** |
@@ -400,7 +400,7 @@ GNUNET_GETOPT_OPTION_CFG_FILE (char **fn); | |||
400 | * @return @a opt with the mandatory flag set. | 400 | * @return @a opt with the mandatory flag set. |
401 | */ | 401 | */ |
402 | struct GNUNET_GETOPT_CommandLineOption | 402 | struct GNUNET_GETOPT_CommandLineOption |
403 | GNUNET_GETOPT_OPTION_MANDATORY (struct GNUNET_GETOPT_CommandLineOption opt); | 403 | GNUNET_GETOPT_option_mandatory (struct GNUNET_GETOPT_CommandLineOption opt); |
404 | 404 | ||
405 | 405 | ||
406 | /** | 406 | /** |