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

Function accum_boundary

src/store/store.c:3933–3950  ·  view source on GitHub ↗

Accumulate a cross-package boundary into parallel arrays. */

Source from the content-addressed store, hash-verified

3931
3932/* Accumulate a cross-package boundary into parallel arrays. */
3933static void accum_boundary(const char *src_pkg, const char *tgt_pkg, char **bfroms, char **btos,
3934 int *bcounts, int *bn, int bcap) {
3935 int found = ST_FOUND;
3936 for (int i = 0; i < *bn; i++) {
3937 if (strcmp(bfroms[i], src_pkg) == 0 && strcmp(btos[i], tgt_pkg) == 0) {
3938 found = i;
3939 break;
3940 }
3941 }
3942 if (found >= 0) {
3943 bcounts[found]++;
3944 } else if (*bn < bcap) {
3945 bfroms[*bn] = heap_strdup(src_pkg);
3946 btos[*bn] = heap_strdup(tgt_pkg);
3947 bcounts[*bn] = SKIP_ONE;
3948 (*bn)++;
3949 }
3950}
3951
3952static int arch_boundaries(cbm_store_t *s, const char *project, const char *path,
3953 cbm_cross_pkg_boundary_t **out_arr, int *out_count) {

Callers 1

arch_boundariesFunction · 0.85

Calls 1

heap_strdupFunction · 0.70

Tested by

no test coverage detected