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

Function cbm_config_get_int

src/cli/cli.c:6689–6700  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6687}
6688
6689int cbm_config_get_int(cbm_config_t *cfg, const char *key, int default_val) {
6690 const char *val = cbm_config_get(cfg, key, NULL);
6691 if (!val) {
6692 return default_val;
6693 }
6694 char *endptr;
6695 long v = strtol(val, &endptr, CLI_STRTOL_BASE);
6696 if (endptr == val || *endptr != '\0') {
6697 return default_val;
6698 }
6699 return (int)v;
6700}
6701
6702int cbm_config_set(cbm_config_t *cfg, const char *key, const char *value) {
6703 if (!cfg || !key || !value) {

Callers 3

maybe_auto_indexFunction · 0.85
test_cli.cFile · 0.85

Calls 1

cbm_config_getFunction · 0.85

Tested by

no test coverage detected