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

Function op_scan_groups

src/pipeline/pass_operator.c:699–726  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

697}
698
699static void op_scan_groups(CBMHashTable *groups, CBMHashTable *seen, const char *file,
700 const char *text) {
701 char dir[CBM_SZ_1K];
702 op_dirname(file, dir, sizeof(dir));
703 for (const char *p = strstr(text, "+groupName="); p; p = strstr(p + SKIP_ONE, "+groupName=")) {
704 char g[CBM_SZ_256];
705 op_token(p + OP_SLEN("+groupName="), g, sizeof(g));
706 op_note_group(groups, seen, g, dir);
707 }
708 for (const char *p = strstr(text, "GroupName"); p; p = strstr(p + SKIP_ONE, "GroupName")) {
709 const char *q = p + OP_SLEN("GroupName");
710 while (*q == ' ' || *q == '\t') {
711 q++;
712 }
713 if (*q != '=') {
714 continue;
715 }
716 q++;
717 while (*q == ' ' || *q == '\t') {
718 q++;
719 }
720 if (*q == '"') {
721 char g[CBM_SZ_256];
722 op_token(q + SKIP_ONE, g, sizeof(g));
723 op_note_group(groups, seen, g, dir);
724 }
725 }
726}
727
728static void op_free_seen(const char *key, void *value, void *ud) {
729 (void)value;

Callers 1

Calls 3

op_dirnameFunction · 0.85
op_tokenFunction · 0.85
op_note_groupFunction · 0.85

Tested by

no test coverage detected