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

Function cv2_fields

src/mcp/test_impact_coverage.c:769–786  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

767}
768
769static bool cv2_fields(cv2_context_t *ctx, cv2_span_t line, cv2_span_t fields[4]) {
770 size_t start = 0;
771 int field = 0;
772 for (size_t i = 0; i < line.length; i++) {
773 if (!cv2_step(ctx))
774 return false;
775 if (line.data[i] != '\t')
776 continue;
777 if (field == 3)
778 return cv2_fail(ctx, CBM_COVERAGE_PARSE_FORMAT);
779 fields[field++] = (cv2_span_t){line.data + start, i - start};
780 start = i + 1;
781 }
782 if (field != 3)
783 return cv2_fail(ctx, CBM_COVERAGE_PARSE_FORMAT);
784 fields[3] = (cv2_span_t){line.data + start, line.length - start};
785 return true;
786}
787
788static bool cv2_row(cv2_context_t *ctx, cv2_span_t input, size_t *position, bool test_row,
789 cv2_span_t fields[4]) {

Callers 1

cv2_rowFunction · 0.85

Calls 2

cv2_stepFunction · 0.85
cv2_failFunction · 0.85

Tested by

no test coverage detected