Lines Matching refs:len
55 str->len = 1;
128 ssize_t strbuf_add_string(struct strbuf *str, const char *s, size_t len) {
141 if (len == 0)
144 str->in_len += len;
147 c = s[len-1];
148 for (depth = 0; depth <= len; depth++) {
152 off = node->value_off + node->value_len - len;
153 if (depth == len || (node->value_len >= len && memcmp(str->buf + off, s, len) == 0)) {
154 str->dedup_len += len;
160 c = s[len - 1 - depth];
171 buf_new = realloc(str->buf, str->len + len+1);
175 off = str->len;
176 memcpy(str->buf + off, s, len);
177 str->len += len;
178 str->buf[str->len++] = '\0';
185 node_child->value_len = len;