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

Function toml_bounded_length

src/cli/config_toml_edit.c:276–289  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

274}
275
276static int toml_bounded_length(const char *text, size_t maximum, size_t *length_out) {
277 if (!text || !length_out) {
278 return TOML_EDIT_ERR;
279 }
280 size_t length = 0U;
281 while (length <= maximum && text[length] != '\0') {
282 length++;
283 }
284 if (length > maximum) {
285 return TOML_EDIT_ERR;
286 }
287 *length_out = length;
288 return TOML_EDIT_OK;
289}
290
291static int toml_valid_path(const char *path) {
292 size_t len = 0U;

Callers 8

toml_valid_pathFunction · 0.85
toml_valid_identifierFunction · 0.85
toml_valid_markerFunction · 0.85
toml_managed_body_validFunction · 0.85
toml_named_inputs_validFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected