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

Function join_export_ranges

tests/test_pipeline.c:14461–14484  ·  view source on GitHub ↗

Join two Studio Export range strings and hand back the result. The caller * owns nothing: the string lives in the aggregate's arena, so copy it out * before the arena goes away. */

Source from the content-addressed store, hash-verified

14459 * owns nothing: the string lives in the aggregate's arena, so copy it out
14460 * before the arena goes away. */
14461static void join_export_ranges(const char *agg_ranges, int agg_regions, const char *part_ranges,
14462 int part_regions, char *out, size_t out_size, int *out_regions) {
14463 CBMFileResult aggregate;
14464 CBMFileResult part;
14465 memset(&aggregate, 0, sizeof(aggregate));
14466 memset(&part, 0, sizeof(part));
14467 cbm_arena_init(&aggregate.arena);
14468 cbm_arena_init(&part.arena);
14469 aggregate.error_ranges = agg_ranges;
14470 aggregate.error_region_count = agg_regions;
14471 aggregate.parse_incomplete = true;
14472 part.error_ranges = part_ranges;
14473 part.error_region_count = part_regions;
14474 part.parse_incomplete = true;
14475
14476 out[0] = '\0';
14477 *out_regions = 0;
14478 if (cbm_pipeline_coverage_marker_test_join(&aggregate, &part)) {
14479 snprintf(out, out_size, "%s", aggregate.error_ranges ? aggregate.error_ranges : "");
14480 *out_regions = aggregate.error_region_count;
14481 }
14482 cbm_arena_destroy(&aggregate.arena);
14483 cbm_arena_destroy(&part.arena);
14484}
14485
14486/* Count the "+" characters in a range string. A truncation marker must appear
14487 * once and only at the end: every reader stops at the first token that is not

Callers 1

test_pipeline.cFile · 0.85

Calls 3

cbm_arena_initFunction · 0.50
cbm_arena_destroyFunction · 0.50

Tested by

no test coverage detected