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

Function cbm_config_get_int

src/cli/cli.c:2778–2789  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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);
2780 if (!val) {
2781 return default_val;
2782 }
2783 char *endptr;
2784 long v = strtol(val, &endptr, CLI_STRTOL_BASE);
2785 if (endptr == val || *endptr != '\0') {
2786 return default_val;
2787 }
2788 return (int)v;
2789}
2790
2791int cbm_config_set(cbm_config_t *cfg, const char *key, const char *value) {
2792 if (!cfg || !key || !value) {

Callers 2

maybe_auto_indexFunction · 0.85
test_cli.cFile · 0.85

Calls 1

cbm_config_getFunction · 0.85

Tested by

no test coverage detected