Mercurial > hg > th-libs
diff th_args.h @ 436:9148bc3fa838
Begin adding Doxygen documentation for some things. Very rudimentary, and
most things are not documented yet.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 10 May 2017 21:00:37 +0300 |
parents | 1b3472ba7b23 |
children | 54081d784d75 |
line wrap: on
line diff
--- a/th_args.h Fri Apr 07 02:49:08 2017 +0300 +++ b/th_args.h Wed May 10 21:00:37 2017 +0300 @@ -5,6 +5,8 @@ * * Please read file 'COPYING' for information on license and distribution. */ +/// @file +/// @brief Simple commandline argument processing function #ifndef TH_ARGS #define TH_ARGS @@ -15,27 +17,29 @@ extern "C" { #endif -/* Option flags +/** @def Option argument flags */ -#define OPT_NONE (0) // Simple option with no arguments -#define OPT_ARGREQ (1) // Option requires an argument -#define OPT_ARGMASK (1) // Mask for option argument flags +#define OPT_NONE (0) ///< Simple option with no arguments +#define OPT_ARGREQ (1) ///< Option requires an argument +#define OPT_ARGMASK (1) ///< Mask for option argument flags -#define OPTH_BAILOUT 0x0001 // Bail out on errors -#define OPTH_ONLY_OPTS 0x0010 // Handle only options -#define OPTH_ONLY_OTHER 0x0020 // Handle only "non-options" -#define OPTH_ONLY_MASK 0x00f0 // Mask +/** @def Option processing flags + */ +#define OPTH_BAILOUT 0x0001 ///< Bail out on errors +#define OPTH_ONLY_OPTS 0x0010 ///< Handle only options +#define OPTH_ONLY_OTHER 0x0020 ///< Handle only "non-options" +#define OPTH_ONLY_MASK 0x00f0 ///< Mask -/* Option argument structure +/** Option argument structure */ typedef struct { - int id; - char o_short; - char *o_long; - char *desc; - int flags; + int id; ///< Option ID (should be unique for each option) + char o_short; ///< Short option name (one character) + char *o_long; ///< Long option name + char *desc; ///< Option description + int flags; ///< Flags (see OPT_*) } th_optarg;