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

Function dm_count_lines

tests/test_doc_mentions.c:9498–9507  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9496enum { DM_NEST = 70, DM_NEST_KEPT = 64, DM_NEST_TEXT = 8192 };
9497
9498static int dm_count_lines(const char *blob, const char *prefix) {
9499 int n = 0;
9500 size_t pl = strlen(prefix);
9501 for (const char *p = blob; p && *p;) {
9502 n += strncmp(p, prefix, pl) == 0;
9503 p = strchr(p, '\n');
9504 p = p ? p + 1 : NULL;
9505 }
9506 return n;
9507}
9508
9509/* The scope records nesting to a depth no program has. What nests deeper is
9510 * not placed, and says so: the type names are kept (to be resolved to

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected