10 .desc =
"Display format testing tool",
11 .author =
"Elliot Haisley",
27 .brief =
"Display format testing tool"
47 .brief =
"An enum argument",
68 .brief =
"A flag argument",
79 .options = kArgChoices,
86 .options = kFlagChoices,
94 .enum_argument = enum_argument,
95 .flag_argument = flag_argument,
103 int main(
int argc,
const char **argv)
108 tool_t tool = make_config(arena);
int main(int argc, const char **argv)
CT_CONFIG_API cfg_field_t * config_enum(cfg_group_t *group, const cfg_info_t *info, cfg_enum_t cfg)
add a new choice field to a configuration group
CT_CONFIG_API cfg_field_t * config_flags(cfg_group_t *group, const cfg_info_t *info, cfg_enum_t cfg)
add a new flags field to a configuration group
#define CT_ARG_LONG(name)
CT_CONFIG_API cfg_group_t * config_root(const cfg_info_t *info, arena_t *arena)
create a new configuration group
#define CT_ARG_SHORT(name)
#define CT_NEW_VERSION(major, minor, patch)
creates a new ctu_version_t from major, minor and patch
CT_SETUP_API setup_init_t setup_parse(int argc, const char **argv, setup_options_t setup)
parse the command line
CT_PUREFN CT_SETUP_API bool setup_should_exit(const setup_init_t *init)
accessor functions
CT_SETUP_API void setup_default(arena_t *arena)
initialise the runtime with default options
CT_BEGIN_API CT_SETUP_API arena_t * ctu_default_alloc(void)
get the default allocator
CT_SETUP_API setup_options_t setup_options(version_info_t info, cfg_group_t *root)
setup default options
CT_PUREFN CT_SETUP_API int setup_exit_code(const setup_init_t *init)
get the exit code
a choice in a set of options
a choice from a set of options
information about a configuration field
STA_FIELD_STRING const char * name
the name of this field
the result of parsing the command line
default options shared by all tools
version information for a driver/interface/plugin
const char * license
the license of this component