add win32 (msvc) support

This commit is contained in:
2024-11-14 16:56:12 +00:00
parent c14c2e5500
commit d614e110df
35 changed files with 454 additions and 280 deletions

View File

@@ -172,59 +172,59 @@ typedef struct b_arglist b_arglist;
typedef int (*b_command_callback)(
const b_command *, const b_arglist *, const b_array *);
extern b_command *b_command_create(unsigned int id);
extern void b_command_destroy(b_command *cmd);
extern b_status b_command_register(b_command *cmd);
extern int b_command_dispatch(unsigned int cmd_id, int argc, const char **argv);
BLUE_API b_command *b_command_create(unsigned int id);
BLUE_API void b_command_destroy(b_command *cmd);
BLUE_API b_status b_command_register(b_command *cmd);
BLUE_API int b_command_dispatch(unsigned int cmd_id, int argc, const char **argv);
extern b_status b_command_set_name(b_command *cmd, const char *name);
extern b_status b_command_set_long_name(b_command *cmd, const char *name);
extern b_status b_command_set_short_name(b_command *cmd, char name);
extern b_status b_command_set_flags(b_command *cmd, b_command_flags flags);
extern b_status b_command_set_description(b_command *cmd, const char *description);
extern b_status b_command_set_callback(b_command *cmd, b_command_callback callback);
extern b_status b_command_set_parent(b_command *cmd, unsigned int parent_id);
extern b_command_option *b_command_add_option(b_command *cmd, int id);
extern b_command_arg *b_command_add_arg(b_command *cmd, int id);
extern b_command_usage *b_command_add_usage(b_command *cmd);
BLUE_API b_status b_command_set_name(b_command *cmd, const char *name);
BLUE_API b_status b_command_set_long_name(b_command *cmd, const char *name);
BLUE_API b_status b_command_set_short_name(b_command *cmd, char name);
BLUE_API b_status b_command_set_flags(b_command *cmd, b_command_flags flags);
BLUE_API b_status b_command_set_description(b_command *cmd, const char *description);
BLUE_API b_status b_command_set_callback(b_command *cmd, b_command_callback callback);
BLUE_API b_status b_command_set_parent(b_command *cmd, unsigned int parent_id);
BLUE_API b_command_option *b_command_add_option(b_command *cmd, int id);
BLUE_API b_command_arg *b_command_add_arg(b_command *cmd, int id);
BLUE_API b_command_usage *b_command_add_usage(b_command *cmd);
extern b_status b_command_option_set_long_name(
BLUE_API b_status b_command_option_set_long_name(
b_command_option *opt, const char *name);
extern b_status b_command_option_set_short_name(b_command_option *opt, char name);
extern b_status b_command_option_set_description(
BLUE_API b_status b_command_option_set_short_name(b_command_option *opt, char name);
BLUE_API b_status b_command_option_set_description(
b_command_option *opt, const char *description);
extern b_command_arg *b_command_option_add_arg(b_command_option *opt, int id);
BLUE_API b_command_arg *b_command_option_add_arg(b_command_option *opt, int id);
extern b_status b_command_arg_set_name(b_command_arg *arg, const char *name);
extern b_status b_command_arg_set_description(
BLUE_API b_status b_command_arg_set_name(b_command_arg *arg, const char *name);
BLUE_API b_status b_command_arg_set_description(
b_command_arg *arg, const char *description);
extern b_status b_command_arg_set_nr_values(
BLUE_API b_status b_command_arg_set_nr_values(
b_command_arg *arg, b_command_arg_value_count nr_values);
extern b_status b_command_arg_set_allowed_values(
BLUE_API b_status b_command_arg_set_allowed_values(
b_command_arg *arg, const char **allowed_values);
extern b_status b_command_usage_add_option(
BLUE_API b_status b_command_usage_add_option(
b_command_usage *usage, b_command_option *opt);
extern b_status b_command_usage_add_arg(b_command_usage *usage, b_command_arg *opt);
extern b_status b_command_usage_add_command(
BLUE_API b_status b_command_usage_add_arg(b_command_usage *usage, b_command_arg *opt);
BLUE_API b_status b_command_usage_add_command(
b_command_usage *usage, unsigned int cmd_id);
extern b_status b_arglist_get_string(
BLUE_API b_status b_arglist_get_string(
const b_arglist *args, unsigned int opt_id, unsigned int arg_id,
unsigned int index, const char **out);
extern b_status b_arglist_get_int(
BLUE_API b_status b_arglist_get_int(
const b_arglist *args, unsigned int opt_id, unsigned int arg_id,
unsigned int index, long long *out);
extern b_status b_arglist_get_uint(
BLUE_API b_status b_arglist_get_uint(
const b_arglist *args, unsigned int opt_id, unsigned int arg_id,
unsigned int index, unsigned long long *out);
extern size_t b_arglist_get_count(
BLUE_API size_t b_arglist_get_count(
const b_arglist *args, unsigned int opt_id, unsigned int arg_id);
extern int b_arglist_iterator_begin(
BLUE_API int b_arglist_iterator_begin(
const b_arglist *args, unsigned int opt_filter, unsigned int arg_filter,
b_arglist_iterator *it);
extern bool b_arglist_iterator_next(b_arglist_iterator *it);
extern bool b_arglist_iterator_is_valid(const b_arglist_iterator *it);
BLUE_API bool b_arglist_iterator_next(b_arglist_iterator *it);
BLUE_API bool b_arglist_iterator_is_valid(const b_arglist_iterator *it);
#endif