Lines Matching refs:newstr
166 Dwelf_Strent *newstr = (Dwelf_Strent *) (st->backp + align); in newstring() local
167 newstr->string = str; in newstring()
168 newstr->len = len; in newstring()
169 newstr->next = NULL; in newstring()
170 newstr->left = NULL; in newstring()
171 newstr->right = NULL; in newstring()
172 newstr->offset = 0; in newstring()
174 newstr->reverse[i] = str[len - 2 - i]; in newstring()
175 newstr->reverse[len - 1] = '\0'; in newstring()
179 return newstr; in newstring()
187 searchstring (Dwelf_Strent **sep, Dwelf_Strent *newstr) in searchstring() argument
192 *sep = newstr; in searchstring()
197 int cmpres = memcmp ((*sep)->reverse, newstr->reverse, in searchstring()
198 MIN ((*sep)->len, newstr->len) - 1); in searchstring()
203 return searchstring (&(*sep)->left, newstr); in searchstring()
205 return searchstring (&(*sep)->right, newstr); in searchstring()
219 Dwelf_Strent *newstr = newstring (st, str, len); in strtab_add() local
220 if (newstr == NULL) in strtab_add()
226 Dwelf_Strent **sep = searchstring (&st->root, newstr); in strtab_add()
227 if (*sep != newstr) in strtab_add()
230 if ((*sep)->len > newstr->len) in strtab_add()
235 if (subs->len == newstr->len) in strtab_add()
239 st->left += st->backp - (char *) newstr; in strtab_add()
240 st->backp = (char *) newstr; in strtab_add()
247 st->backp -= newstr->len; in strtab_add()
248 st->left += newstr->len; in strtab_add()
250 newstr->next = (*sep)->next; in strtab_add()
251 (*sep)->next = newstr; in strtab_add()
253 else if ((*sep)->len != newstr->len) in strtab_add()
258 st->total += newstr->len - (*sep)->len; in strtab_add()
259 newstr->next = *sep; in strtab_add()
260 newstr->left = (*sep)->left; in strtab_add()
261 newstr->right = (*sep)->right; in strtab_add()
262 *sep = newstr; in strtab_add()
267 st->left += st->backp - (char *) newstr; in strtab_add()
268 st->backp = (char *) newstr; in strtab_add()
270 newstr = *sep; in strtab_add()
274 st->total += newstr->len; in strtab_add()
276 return newstr; in strtab_add()