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

Function cv2_line

src/mcp/test_impact_coverage.c:749–767  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

747}
748
749static bool cv2_line(cv2_context_t *ctx, cv2_span_t input, size_t *position, bool test_row,
750 cv2_span_t *line) {
751 size_t start = *position;
752 while (*position < input.length) {
753 if (!cv2_step(ctx))
754 return false;
755 unsigned char byte = input.data[(*position)++];
756 if (!byte || (!test_row && byte == '\r'))
757 return cv2_fail(ctx, CBM_COVERAGE_PARSE_FORMAT);
758 if (byte == '\n') {
759 size_t length = *position - start - 1;
760 if (test_row && length && input.data[start + length - 1] == '\r')
761 length--;
762 *line = (cv2_span_t){input.data + start, length};
763 return true;
764 }
765 }
766 return cv2_fail(ctx, CBM_COVERAGE_PARSE_FORMAT);
767}
768
769static bool cv2_fields(cv2_context_t *ctx, cv2_span_t line, cv2_span_t fields[4]) {
770 size_t start = 0;

Callers 1

cv2_rowFunction · 0.85

Calls 2

cv2_stepFunction · 0.85
cv2_failFunction · 0.85

Tested by

no test coverage detected