X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Finclude%2Fgnunet_getopt_lib.h;h=ddeeffef4325c0007ac142531e8a4fbc4dd07ac9;hb=2bbb2934dbbe471640c67c3bc672120f35708fd1;hp=f707bb0919c989571b1fc8a29f2370d0893a7ee4;hpb=990c536e0f1c4adce5ba49897e2084d6296fdafc;p=oweals%2Fgnunet.git diff --git a/src/include/gnunet_getopt_lib.h b/src/include/gnunet_getopt_lib.h index f707bb091..ddeeffef4 100644 --- a/src/include/gnunet_getopt_lib.h +++ b/src/include/gnunet_getopt_lib.h @@ -2,20 +2,20 @@ This file is part of GNUnet. Copyright (C) 2001-2013 GNUnet e.V. - GNUnet is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3, or (at your - option) any later version. + GNUnet is free software: you can redistribute it and/or modify it + under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, + or (at your option) any later version. GNUnet is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + 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 . - You should have received a copy of the GNU General Public License - along with GNUnet; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. + SPDX-License-Identifier: AGPL3.0-or-later */ /** @@ -230,11 +230,11 @@ GNUNET_GETOPT_option_filename (char shortName, */ 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); + const char *name, + const char *argumentHelp, + const char *description, + void *val, + size_t val_size); /** @@ -264,9 +264,9 @@ GNUNET_GETOPT_option_base32_fixed_size (char shortName, */ struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_option_flag (char shortName, - const char *name, - const char *description, - int *val); + const char *name, + const char *description, + int *val); /** @@ -280,10 +280,27 @@ GNUNET_GETOPT_option_flag (char shortName, */ struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_option_uint (char shortName, - const char *name, - const char *argumentHelp, - const char *description, - unsigned int *val); + const char *name, + const char *argumentHelp, + const char *description, + unsigned int *val); + + +/** + * Allow user to specify an uint16_t. + * + * @param shortName short name of the option + * @param name long name of the option + * @param argumentHelp help text for the option argument + * @param description long help text for the option + * @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); /** @@ -297,10 +314,10 @@ GNUNET_GETOPT_option_uint (char shortName, */ struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_option_ulong (char shortName, - const char *name, - const char *argumentHelp, - const char *description, - unsigned long long *val); + const char *name, + const char *argumentHelp, + const char *description, + unsigned long long *val); /** @@ -315,10 +332,10 @@ GNUNET_GETOPT_option_ulong (char shortName, */ 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); + const char *name, + const char *argumentHelp, + const char *description, + struct GNUNET_TIME_Relative *val); /** @@ -333,10 +350,10 @@ GNUNET_GETOPT_option_relative_time (char shortName, */ 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); + const char *name, + const char *argumentHelp, + const char *description, + struct GNUNET_TIME_Absolute *val); /** @@ -350,9 +367,9 @@ GNUNET_GETOPT_option_absolute_time (char shortName, */ struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_option_increment_uint (char shortName, - const char *name, - const char *description, - unsigned int *val); + const char *name, + const char *description, + unsigned int *val); /**