| 101 | static void mi_option_init(mi_option_desc_t* desc); |
| 102 | |
| 103 | void _mi_options_init(void) { |
| 104 | // called on process load; should not be called before the CRT is initialized! |
| 105 | // (e.g. do not call this from process_init as that may run before CRT initialization) |
| 106 | mi_add_stderr_output(); // now it safe to use stderr for output |
| 107 | for(int i = 0; i < _mi_option_last; i++ ) { |
| 108 | mi_option_t option = (mi_option_t)i; |
| 109 | long l = mi_option_get(option); MI_UNUSED(l); // initialize |
| 110 | // if (option != mi_option_verbose) |
| 111 | { |
| 112 | mi_option_desc_t* desc = &options[option]; |
| 113 | _mi_verbose_message("option '%s': %ld\n", desc->name, desc->value); |
| 114 | } |
| 115 | } |
| 116 | mi_max_error_count = mi_option_get(mi_option_max_errors); |
| 117 | mi_max_warning_count = mi_option_get(mi_option_max_warnings); |
| 118 | } |
| 119 | |
| 120 | mi_decl_nodiscard long mi_option_get(mi_option_t option) { |
| 121 | mi_assert(option >= 0 && option < _mi_option_last); |
no test coverage detected