Lines Matching defs:buf
27 regsub_copy(char **buf, ssize_t *len, const char *text, size_t start, size_t end)
31 *buf = xrealloc(*buf, (*len) + add + 1);
32 memcpy((*buf) + *len, text + start, add);
37 regsub_expand(char **buf, ssize_t *len, const char *with, const char *text,
49 regsub_copy(buf, len, text, m[i].rm_so,
55 *buf = xrealloc(*buf, (*len) + 2);
56 (*buf)[(*len)++] = *cp;
67 char *buf = NULL;
80 regsub_copy(&buf, &len, text, start, end);
88 regsub_copy(&buf, &len, text, last, m[0].rm_so + start);
98 regsub_expand(&buf, &len, with, text + start, m,
112 regsub_copy(&buf, &len, text, start, end);
116 buf[len] = '\0';
119 return (buf);