WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Affero General Public License for more details.
-
+
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
SPDX-License-Identifier: AGPL3.0-or-later
-*/
+ */
/**
* @author Christian Grothoff
/**
* @brief General context for command line processors.
*/
-struct GNUNET_GETOPT_CommandLineProcessorContext
-{
-
+struct GNUNET_GETOPT_CommandLineProcessorContext {
/**
* Name of the application
*/
/**
* @brief Definition of a command line option.
*/
-struct GNUNET_GETOPT_CommandLineOption
-{
-
+struct GNUNET_GETOPT_CommandLineOption {
/**
* Short name of the option.
*/
* @param about string with brief description of the application
*/
struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_option_help (const char *about);
+GNUNET_GETOPT_option_help(const char *about);
/**
* @param version string with the version number
*/
struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_option_version (const char *version);
+GNUNET_GETOPT_option_version(const char *version);
/**
* @param[out] logfn set to the name of the logfile
*/
struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_option_logfile (char **logfn);
+GNUNET_GETOPT_option_logfile(char **logfn);
/**
* @param[out] str set to the string
*/
struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_option_string (char shortName,
- const char *name,
- const char *argumentHelp,
- const char *description,
- char **str);
+GNUNET_GETOPT_option_string(char shortName,
+ const char *name,
+ const char *argumentHelp,
+ const char *description,
+ char **str);
/**
* Allow user to specify a filename (automatically path expanded).
* @param[out] str set to the string
*/
struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_option_filename (char shortName,
- const char *name,
- const char *argumentHelp,
- const char *description,
- char **str);
+GNUNET_GETOPT_option_filename(char shortName,
+ const char *name,
+ const char *argumentHelp,
+ const char *description,
+ char **str);
/**
* @param val_size size of @a val in bytes
*/
struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_option_base32_fixed_size (char shortName,
- const char *name,
- const char *argumentHelp,
- const char *description,
- void *val,
- size_t val_size);
+GNUNET_GETOPT_option_base32_fixed_size(char shortName,
+ const char *name,
+ const char *argumentHelp,
+ const char *description,
+ void *val,
+ size_t val_size);
/**
argumentHelp, \
description, \
val) \
- GNUNET_GETOPT_option_base32_fixed_size (shortName, \
- name, \
- argumentHelp, \
- description, \
- val, \
- sizeof (*val))
+ GNUNET_GETOPT_option_base32_fixed_size(shortName, \
+ name, \
+ argumentHelp, \
+ description, \
+ val, \
+ sizeof(*val))
/**
* @param[out] val set to 1 if the option is present
*/
struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_option_flag (char shortName,
- const char *name,
- const char *description,
- int *val);
+GNUNET_GETOPT_option_flag(char shortName,
+ const char *name,
+ const char *description,
+ int *val);
/**
* @param[out] val set to the value specified at the command line
*/
struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_option_uint (char shortName,
- const char *name,
- const char *argumentHelp,
- const char *description,
- unsigned int *val);
+GNUNET_GETOPT_option_uint(char shortName,
+ const char *name,
+ const char *argumentHelp,
+ const char *description,
+ unsigned int *val);
/**
* @param[out] val set to the value specified at the command line
*/
struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_option_uint16 (char shortName,
- const char *name,
- const char *argumentHelp,
- const char *description,
- uint16_t *val);
+GNUNET_GETOPT_option_uint16(char shortName,
+ const char *name,
+ const char *argumentHelp,
+ const char *description,
+ uint16_t *val);
/**
* @param[out] val set to the value specified at the command line
*/
struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_option_ulong (char shortName,
- const char *name,
- const char *argumentHelp,
- const char *description,
- unsigned long long *val);
+GNUNET_GETOPT_option_ulong(char shortName,
+ const char *name,
+ const char *argumentHelp,
+ const char *description,
+ unsigned long long *val);
/**
* @param[out] val set to the time specified at the command line
*/
struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_option_relative_time (char shortName,
- const char *name,
- const char *argumentHelp,
- const char *description,
- struct GNUNET_TIME_Relative *val);
+GNUNET_GETOPT_option_relative_time(char shortName,
+ const char *name,
+ const char *argumentHelp,
+ const char *description,
+ struct GNUNET_TIME_Relative *val);
/**
* @param[out] val set to the time specified at the command line
*/
struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_option_absolute_time (char shortName,
- const char *name,
- const char *argumentHelp,
- const char *description,
- struct GNUNET_TIME_Absolute *val);
+GNUNET_GETOPT_option_absolute_time(char shortName,
+ const char *name,
+ const char *argumentHelp,
+ const char *description,
+ struct GNUNET_TIME_Absolute *val);
/**
* @param[out] val set to 1 if the option is present
*/
struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_option_increment_uint (char shortName,
- const char *name,
- const char *description,
- unsigned int *val);
+GNUNET_GETOPT_option_increment_uint(char shortName,
+ const char *name,
+ const char *description,
+ unsigned int *val);
/**
* @param[out] level set to the log level
*/
struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_option_loglevel (char **level);
+GNUNET_GETOPT_option_loglevel(char **level);
/**
* @param[out] level set to the verbosity level
*/
struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_option_verbose (unsigned int *level);
+GNUNET_GETOPT_option_verbose(unsigned int *level);
/**
* @param[out] logfn set to the name of the logfile
*/
struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_option_logfile (char **logfn);
+GNUNET_GETOPT_option_logfile(char **logfn);
/**
* @param[out] fn set to the name of the configuration file
*/
struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_option_cfgfile (char **fn);
+GNUNET_GETOPT_option_cfgfile(char **fn);
/**
* @return @a opt with the mandatory flag set.
*/
struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_option_mandatory (struct GNUNET_GETOPT_CommandLineOption opt);
+GNUNET_GETOPT_option_mandatory(struct GNUNET_GETOPT_CommandLineOption opt);
/**
* @return @a opt with the exclusive flag set.
*/
struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_option_exclusive (struct GNUNET_GETOPT_CommandLineOption opt);
+GNUNET_GETOPT_option_exclusive(struct GNUNET_GETOPT_CommandLineOption opt);
/**
* argument, or #GNUNET_SYSERR on error
*/
int
-GNUNET_GETOPT_run (const char *binaryOptions,
- const struct GNUNET_GETOPT_CommandLineOption *allOptions,
- unsigned int argc,
- char *const *argv);
+GNUNET_GETOPT_run(const char *binaryOptions,
+ const struct GNUNET_GETOPT_CommandLineOption *allOptions,
+ unsigned int argc,
+ char *const *argv);
#if 0 /* keep Emacsens' auto-indent happy */