Lines Matching refs:len
38 .len = 1, in strbuf_new()
108 ssize_t strbuf_add_string(struct strbuf *str, const char *s, size_t len) { in strbuf_add_string() argument
121 if (len == 0) { in strbuf_add_string()
125 str->in_len += len; in strbuf_add_string()
128 for (size_t depth = 0; depth <= len; depth++) { in strbuf_add_string()
132 off = node->value_off + node->value_len - len; in strbuf_add_string()
133 … if (depth == len || (node->value_len >= len && memcmp(str->buf + off, s, len) == 0)) { in strbuf_add_string()
134 str->dedup_len += len; in strbuf_add_string()
139 c = s[len - 1 - depth]; in strbuf_add_string()
150 buf_new = realloc(str->buf, str->len + len+1); in strbuf_add_string()
154 off = str->len; in strbuf_add_string()
155 memcpy(str->buf + off, s, len); in strbuf_add_string()
156 str->len += len; in strbuf_add_string()
157 str->buf[str->len++] = '\0'; in strbuf_add_string()
167 .value_len = len, in strbuf_add_string()