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

Function df_range

src/mcp/test_impact_diff.c:85–99  ·  view source on GitHub ↗

"start[,count]" after a '-' or '+' in a hunk header. No count means 1. */

Source from the content-addressed store, hash-verified

83
84/* "start[,count]" after a '-' or '+' in a hunk header. No count means 1. */
85static bool df_range(const char **p, const char *end, char sign, int *start, int *count) {
86 if (*p >= end || **p != sign) {
87 return false;
88 }
89 (*p)++;
90 if (!df_number(p, end, start)) {
91 return false;
92 }
93 *count = 1;
94 if (*p < end && **p == ',') {
95 (*p)++;
96 return df_number(p, end, count);
97 }
98 return true;
99}
100
101/* "@@ -a[,b] +c[,d] @@": the old and new line ranges. */
102static bool df_hunk_header(const df_line_t *line, int *old_count, int *new_start, int *new_count) {

Callers 1

df_hunk_headerFunction · 0.85

Calls 1

df_numberFunction · 0.85

Tested by

no test coverage detected