Lines Matching refs:newstr
192 struct Ebl_GStrent *newstr = (struct Ebl_GStrent *) (st->backp + align); in newstring() local
193 newstr->string = str; in newstring()
194 newstr->len = len; in newstring()
195 newstr->width = st->width; in newstring()
196 newstr->next = NULL; in newstring()
197 newstr->left = NULL; in newstring()
198 newstr->right = NULL; in newstring()
199 newstr->offset = 0; in newstring()
202 newstr->reverse[i * st->width + j] = str[(len - 2 - i) * st->width + j]; in newstring()
204 newstr->reverse[(len - 1) * st->width + j] = '\0'; in newstring()
208 return newstr; in newstring()
216 searchstring (struct Ebl_GStrent **sep, struct Ebl_GStrent *newstr) in searchstring() argument
223 *sep = newstr; in searchstring()
228 cmpres = memcmp ((*sep)->reverse, newstr->reverse, in searchstring()
229 (MIN ((*sep)->len, newstr->len) - 1) * (*sep)->width); in searchstring()
234 return searchstring (&(*sep)->left, newstr); in searchstring()
236 return searchstring (&(*sep)->right, newstr); in searchstring()
244 struct Ebl_GStrent *newstr; in ebl_gstrtabadd() local
265 newstr = newstring (st, str, len); in ebl_gstrtabadd()
270 sep = searchstring (&st->root, newstr); in ebl_gstrtabadd()
271 if (*sep != newstr) in ebl_gstrtabadd()
274 if ((*sep)->len > newstr->len) in ebl_gstrtabadd()
280 if (subs->len == newstr->len) in ebl_gstrtabadd()
284 st->left += (st->backp - (char *) newstr) * st->width; in ebl_gstrtabadd()
285 st->backp = (char *) newstr; in ebl_gstrtabadd()
292 st->backp -= newstr->len; in ebl_gstrtabadd()
293 st->left += newstr->len; in ebl_gstrtabadd()
295 newstr->next = (*sep)->next; in ebl_gstrtabadd()
296 (*sep)->next = newstr; in ebl_gstrtabadd()
298 else if ((*sep)->len != newstr->len) in ebl_gstrtabadd()
303 st->total += newstr->len - (*sep)->len; in ebl_gstrtabadd()
304 newstr->next = *sep; in ebl_gstrtabadd()
305 newstr->left = (*sep)->left; in ebl_gstrtabadd()
306 newstr->right = (*sep)->right; in ebl_gstrtabadd()
307 *sep = newstr; in ebl_gstrtabadd()
312 st->left += (st->backp - (char *) newstr) * st->width; in ebl_gstrtabadd()
313 st->backp = (char *) newstr; in ebl_gstrtabadd()
315 newstr = *sep; in ebl_gstrtabadd()
319 st->total += newstr->len; in ebl_gstrtabadd()
321 return newstr; in ebl_gstrtabadd()