| 433 | } |
| 434 | |
| 435 | static bool resolve_environment(const char *key, const char **value) { |
| 436 | if (!key) |
| 437 | return false; |
| 438 | for (size_t i = 0; i < SETTINGS_COUNT; i++) { |
| 439 | if (!environment_overridden[i] || strcmp(settings[i].key, key) != 0) |
| 440 | continue; |
| 441 | if (strcmp(settings[i].type, "boolean") == 0) { |
| 442 | bool enabled = strcmp(environment_values[i], "true") == 0; |
| 443 | if (enabled) |
| 444 | *value = "1"; |
| 445 | else if (strcmp(key, "CBM_DISABLE_LSP_CROSS") == 0) |
| 446 | *value = NULL; |
| 447 | else |
| 448 | *value = "0"; |
| 449 | } else |
| 450 | *value = environment_values[i]; |
| 451 | return true; |
| 452 | } |
| 453 | return false; |
| 454 | } |
| 455 | |
| 456 | bool cbm_runtime_settings_initialized(void) { |
| 457 | return initialized; |
nothing calls this directly
no outgoing calls
no test coverage detected