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

Function cv2_header

src/mcp/test_impact_coverage.c:855–871  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

853}
854
855static bool cv2_header(cv2_context_t *ctx, cv2_span_t profiles) {
856 cv2_span_t fields[4];
857 uint64_t version, count;
858 if (!cv2_row(ctx, profiles, &ctx->profile_start, false, fields))
859 return false;
860 if (!cv2_literal(fields[0], "CBM_PROFILE_MAP", 15))
861 return cv2_fail(ctx, CBM_COVERAGE_PARSE_FORMAT);
862 if (!cv2_decimal(ctx, fields[1], true, &version) || !cv2_image(ctx, fields[2]) ||
863 !cv2_decimal(ctx, fields[3], true, &count))
864 return false;
865 if (version != 2)
866 return cv2_fail(ctx, CBM_COVERAGE_PARSE_UNSUPPORTED);
867 if (count > INT_MAX || count > (uint64_t)ctx->limits->max_ids)
868 return cv2_fail(ctx, CBM_COVERAGE_PARSE_LIMIT);
869 ctx->profile_count = (int)count;
870 return cv2_items(ctx, 1);
871}
872
873static bool cv2_profile_inventory(cv2_context_t *ctx, cv2_span_t profiles) {
874 size_t position = ctx->profile_start;

Callers 1

Calls 6

cv2_rowFunction · 0.85
cv2_literalFunction · 0.85
cv2_failFunction · 0.85
cv2_decimalFunction · 0.85
cv2_imageFunction · 0.85
cv2_itemsFunction · 0.85

Tested by

no test coverage detected