cmd: add support for dynamically generating command options at runtime
This commit is contained in:
15
cmd/option.c
15
cmd/option.c
@@ -42,6 +42,21 @@ void b_command_option_destroy(struct b_command_option *opt)
|
||||
free(opt);
|
||||
}
|
||||
|
||||
const char *b_command_option_get_long_name(const struct b_command_option *opt)
|
||||
{
|
||||
return opt->opt_long_name;
|
||||
}
|
||||
|
||||
char b_command_option_get_short_name(const struct b_command_option *opt)
|
||||
{
|
||||
return opt->opt_short_name;
|
||||
}
|
||||
|
||||
const char *b_command_option_get_description(struct b_command_option *opt)
|
||||
{
|
||||
return opt->opt_description;
|
||||
}
|
||||
|
||||
b_status b_command_option_set_long_name(
|
||||
struct b_command_option *opt, const char *name)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user