MCPcopy Create free account
hub / github.com/git/git / parse_range

Function parse_range

add-patch.c:448–463  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

446}
447
448static int parse_range(const char **p,
449 unsigned long *offset, unsigned long *count)
450{
451 char *pend;
452
453 *offset = strtoul(*p, &pend, 10);
454 if (pend == *p)
455 return -1;
456 if (*pend != ',') {
457 *count = 1;
458 *p = pend;
459 return 0;
460 }
461 *count = strtoul(pend + 1, (char **)p, 10);
462 return *p == pend + 1 ? -1 : 0;
463}
464
465static int parse_hunk_header(struct add_p_state *s, struct hunk *hunk)
466{

Callers 1

parse_hunk_headerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected