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

Function cv_functions

src/mcp/test_impact_coverage.c:133–156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131}
132
133static bool cv_functions(cbm_coverage_map_t *map, char *text) {
134 for (int i = 0; i < map->function_count; i++) {
135 char *fields[3];
136 int id;
137 const char *end;
138 if (!cv_fields(cv_line(&text), fields, 3) || !cv_decimal(fields[0], &id, &end) || *end ||
139 id != i || !fields[2][0]) {
140 return false;
141 }
142 map->functions[i] =
143 (cbm_coverage_function_t){.id = id, .file = fields[1], .name = fields[2]};
144 map->function_order[i] = &map->functions[i];
145 }
146 if (map->function_count > 1) {
147 qsort(map->function_order, (size_t)map->function_count, sizeof(*map->function_order),
148 cv_function_compare);
149 for (int i = 1; i < map->function_count; i++) {
150 if (cv_function_compare(&map->function_order[i - 1], &map->function_order[i]) == 0) {
151 return false;
152 }
153 }
154 }
155 return true;
156}
157
158static bool cv_ids(cbm_coverage_map_t *map, cbm_coverage_test_t *row, const char *text,
159 bool *seen) {

Callers 1

cbm_coverage_map_parseFunction · 0.85

Calls 4

cv_fieldsFunction · 0.85
cv_lineFunction · 0.85
cv_decimalFunction · 0.85
cv_function_compareFunction · 0.85

Tested by

no test coverage detected