Lines Matching refs:newstr
153 struct Ebl_WStrent *newstr; in newstring() local
174 newstr = (struct Ebl_WStrent *) (st->backp + align); in newstring()
175 newstr->string = str; in newstring()
176 newstr->len = len; in newstring()
177 newstr->next = NULL; in newstring()
178 newstr->left = NULL; in newstring()
179 newstr->right = NULL; in newstring()
180 newstr->offset = 0; in newstring()
182 newstr->reverse[i] = str[len - 2 - i]; in newstring()
183 newstr->reverse[len - 1] = L'\0'; in newstring()
187 return newstr; in newstring()
195 searchstring (struct Ebl_WStrent **sep, struct Ebl_WStrent *newstr) in searchstring() argument
202 *sep = newstr; in searchstring()
207 cmpres = wmemcmp ((*sep)->reverse, newstr->reverse, in searchstring()
208 MIN ((*sep)->len, newstr->len) - 1); in searchstring()
213 return searchstring (&(*sep)->left, newstr); in searchstring()
215 return searchstring (&(*sep)->right, newstr); in searchstring()
223 struct Ebl_WStrent *newstr; in ebl_wstrtabadd() local
236 newstr = newstring (st, str, len); in ebl_wstrtabadd()
237 if (newstr == NULL) in ebl_wstrtabadd()
243 sep = searchstring (&st->root, newstr); in ebl_wstrtabadd()
244 if (*sep != newstr) in ebl_wstrtabadd()
247 if ((*sep)->len > newstr->len) in ebl_wstrtabadd()
253 if (subs->len == newstr->len) in ebl_wstrtabadd()
257 st->left += st->backp - (char *) newstr; in ebl_wstrtabadd()
258 st->backp = (char *) newstr; in ebl_wstrtabadd()
265 st->backp -= newstr->len; in ebl_wstrtabadd()
266 st->left += newstr->len; in ebl_wstrtabadd()
268 newstr->next = (*sep)->next; in ebl_wstrtabadd()
269 (*sep)->next = newstr; in ebl_wstrtabadd()
271 else if ((*sep)->len != newstr->len) in ebl_wstrtabadd()
276 st->total += newstr->len - (*sep)->len; in ebl_wstrtabadd()
277 newstr->next = *sep; in ebl_wstrtabadd()
278 newstr->left = (*sep)->left; in ebl_wstrtabadd()
279 newstr->right = (*sep)->right; in ebl_wstrtabadd()
280 *sep = newstr; in ebl_wstrtabadd()
285 st->left += st->backp - (char *) newstr; in ebl_wstrtabadd()
286 st->backp = (char *) newstr; in ebl_wstrtabadd()
288 newstr = *sep; in ebl_wstrtabadd()
292 st->total += newstr->len; in ebl_wstrtabadd()
294 return newstr; in ebl_wstrtabadd()