diff options
| author | kx <kx@radix-linux.su> | 2026-10-09 18:00:15 +0300 |
|---|---|---|
| committer | kx <kx@radix-linux.su> | 2026-10-09 18:00:15 +0300 |
| commit | 065da3509019b15dd0e678072e6be629e5330bef (patch) | |
| tree | 69c934c9e786ac048b4fbe8f4c4c5571661521f4 /utils/mcpu-tool-options.h | |
| parent | d130fe27fa753be02ed76fd9b277aa3c3d928eb9 (diff) | |
| download | libmcpu-0.4.0.tar.xz | |
Version 0.4.00.4.0
Diffstat (limited to 'utils/mcpu-tool-options.h')
| -rw-r--r-- | utils/mcpu-tool-options.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/utils/mcpu-tool-options.h b/utils/mcpu-tool-options.h new file mode 100644 index 0000000..f6fe356 --- /dev/null +++ b/utils/mcpu-tool-options.h @@ -0,0 +1,52 @@ +#ifndef __MCPU_TOOL_OPTIONS_H__ +#define __MCPU_TOOL_OPTIONS_H__ 1 + +#include <stdio.h> + +#include "mcpu-config.h" +#include "mcpu-version.h" +#include "mcpu-library-search.h" +#include "mcpu-runtime.h" + +typedef struct mcpu_tool_options mcpu_tool_options; +struct mcpu_tool_options +{ + const char *progname; + const char *sys_root; + int help; + int no_config; + int dump_config; + int print_search_dirs; + mcpu_version_action version_action; + char *user_config_file; + int runtime_config_read; + int system_config_read; + int user_config_read; + mcpu_runtime_paths runtime; + mcpu_config config; + mcpu_library_search library_search; +}; + +void mcpu_tool_options_init( mcpu_tool_options *options, + const char *progname ); +void mcpu_tool_options_free( mcpu_tool_options *options ); +int mcpu_tool_options_prepare( mcpu_tool_options *options, + const char *argv0 ); +int mcpu_tool_parse_common_option( mcpu_tool_options *options, + int argc, char **argv, int *index ); +int mcpu_tool_add_library_directory( mcpu_tool_options *options, + const char *directory ); +int mcpu_tool_add_library_path( mcpu_tool_options *options, + const char *path ); +int mcpu_tool_resolve_library( const mcpu_tool_options *options, + const char *name, char **resolved ); +int mcpu_tool_resolve_library_alternatives( + const mcpu_tool_options *options, + const char *const *names, size_t name_count, + char **resolved, size_t *selected_index ); +int mcpu_tool_has_information_action( const mcpu_tool_options *options ); +int mcpu_tool_dump_config( const mcpu_tool_options *options, FILE *stream ); +int mcpu_tool_print_search_dirs( const mcpu_tool_options *options, + FILE *stream ); + +#endif /* __MCPU_TOOL_OPTIONS_H__ */ |
