Lines Matching defs:buf
14 * Used as the default ->buf value, so that people can always assume
15 * buf is non NULL and ->buf is NUL terminated even for a freshly
23 sb->buf = strbuf_slopbuf;
32 zfree(&sb->buf);
39 char *res = sb->alloc ? sb->buf : NULL;
48 char *buf;
61 * Note that sb->buf == strbuf_slopbuf if sb->alloc == 0, and it is
64 buf = realloc(sb->alloc ? sb->buf : NULL, nr * sizeof(*buf));
65 if (!buf)
68 sb->buf = buf;
79 sb->buf[sb->len++] = c;
80 sb->buf[sb->len] = '\0';
90 memcpy(sb->buf + sb->len, data, len);
106 len = vsnprintf(sb->buf + sb->len, sb->alloc - sb->len, fmt, ap);
117 len = vsnprintf(sb->buf + sb->len, sb->alloc - sb->len, fmt, ap_saved);
152 cnt = read(fd, sb->buf + sb->len, sb->alloc - sb->len - 1);
168 sb->buf[sb->len] = '\0';