Lines Matching refs:newstr

171   struct Ebl_GStrent *newstr = (struct Ebl_GStrent *) (st->backp + align);  in newstring()  local
172 newstr->string = str; in newstring()
173 newstr->len = len; in newstring()
174 newstr->width = st->width; in newstring()
175 newstr->next = NULL; in newstring()
176 newstr->left = NULL; in newstring()
177 newstr->right = NULL; in newstring()
178 newstr->offset = 0; in newstring()
181 newstr->reverse[i * st->width + j] = str[(len - 2 - i) * st->width + j]; in newstring()
183 newstr->reverse[(len - 1) * st->width + j] = '\0'; in newstring()
187 return newstr; in newstring()
195 searchstring (struct Ebl_GStrent **sep, struct Ebl_GStrent *newstr) in searchstring() argument
202 *sep = newstr; in searchstring()
207 cmpres = memcmp ((*sep)->reverse, newstr->reverse, in searchstring()
208 (MIN ((*sep)->len, newstr->len) - 1) * (*sep)->width); in searchstring()
213 return searchstring (&(*sep)->left, newstr); in searchstring()
215 return searchstring (&(*sep)->right, newstr); in searchstring()
223 struct Ebl_GStrent *newstr; in ebl_gstrtabadd() local
244 newstr = newstring (st, str, len); in ebl_gstrtabadd()
249 sep = searchstring (&st->root, newstr); in ebl_gstrtabadd()
250 if (*sep != newstr) in ebl_gstrtabadd()
253 if ((*sep)->len > newstr->len) in ebl_gstrtabadd()
259 if (subs->len == newstr->len) in ebl_gstrtabadd()
263 st->left += (st->backp - (char *) newstr) * st->width; in ebl_gstrtabadd()
264 st->backp = (char *) newstr; in ebl_gstrtabadd()
271 st->backp -= newstr->len; in ebl_gstrtabadd()
272 st->left += newstr->len; in ebl_gstrtabadd()
274 newstr->next = (*sep)->next; in ebl_gstrtabadd()
275 (*sep)->next = newstr; in ebl_gstrtabadd()
277 else if ((*sep)->len != newstr->len) in ebl_gstrtabadd()
282 st->total += newstr->len - (*sep)->len; in ebl_gstrtabadd()
283 newstr->next = *sep; in ebl_gstrtabadd()
284 newstr->left = (*sep)->left; in ebl_gstrtabadd()
285 newstr->right = (*sep)->right; in ebl_gstrtabadd()
286 *sep = newstr; in ebl_gstrtabadd()
291 st->left += (st->backp - (char *) newstr) * st->width; in ebl_gstrtabadd()
292 st->backp = (char *) newstr; in ebl_gstrtabadd()
294 newstr = *sep; in ebl_gstrtabadd()
298 st->total += newstr->len; in ebl_gstrtabadd()
300 return newstr; in ebl_gstrtabadd()