MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / cbm_config_get_bool

Function cbm_config_get_bool

src/cli/cli.c:2764–2776  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2762}
2763
2764bool cbm_config_get_bool(cbm_config_t *cfg, const char *key, bool default_val) {
2765 const char *val = cbm_config_get(cfg, key, NULL);
2766 if (!val) {
2767 return default_val;
2768 }
2769 if (strcmp(val, "true") == 0 || strcmp(val, "1") == 0 || strcmp(val, "on") == 0) {
2770 return true;
2771 }
2772 if (strcmp(val, "false") == 0 || strcmp(val, "0") == 0 || strcmp(val, "off") == 0) {
2773 return false;
2774 }
2775 return default_val;
2776}
2777
2778int cbm_config_get_int(cbm_config_t *cfg, const char *key, int default_val) {
2779 const char *val = cbm_config_get(cfg, key, NULL);

Callers 3

auto_watch_enabledFunction · 0.85
maybe_auto_indexFunction · 0.85
test_cli.cFile · 0.85

Calls 1

cbm_config_getFunction · 0.85

Tested by

no test coverage detected