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

Function cbm_config_get_int

src/cli/cli.c:7495–7506  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7493}
7494
7495int cbm_config_get_int(cbm_config_t *cfg, const char *key, int default_val) {
7496 const char *val = cbm_config_get(cfg, key, NULL);
7497 if (!val) {
7498 return default_val;
7499 }
7500 char *endptr;
7501 long v = strtol(val, &endptr, CLI_STRTOL_BASE);
7502 if (endptr == val || *endptr != '\0') {
7503 return default_val;
7504 }
7505 return (int)v;
7506}
7507
7508int cbm_config_set(cbm_config_t *cfg, const char *key, const char *value) {
7509 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