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

Function df_next_line

src/mcp/test_impact_diff.c:43–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41} df_line_t;
42
43static bool df_next_line(df_reader_t *rd, df_line_t *line) {
44 if (rd->p >= rd->end) {
45 return false;
46 }
47 const char *nl = memchr(rd->p, '\n', (size_t)(rd->end - rd->p));
48 line->text = rd->p;
49 line->len = nl ? (size_t)(nl - rd->p) : (size_t)(rd->end - rd->p);
50 rd->p = nl ? nl + 1 : rd->end;
51 return true;
52}
53
54static bool df_starts(const df_line_t *line, const char *prefix) {
55 size_t n = strlen(prefix);

Callers 2

df_hunk_bodyFunction · 0.85
df_readFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected