• Home
  • Raw
  • Download

Lines Matching refs:newstr

189   struct Ebl_Strent *newstr = (struct Ebl_Strent *) (st->backp + align);  in newstring()  local
190 newstr->string = str; in newstring()
191 newstr->len = len; in newstring()
192 newstr->next = NULL; in newstring()
193 newstr->left = NULL; in newstring()
194 newstr->right = NULL; in newstring()
195 newstr->offset = 0; in newstring()
197 newstr->reverse[i] = str[len - 2 - i]; in newstring()
198 newstr->reverse[len - 1] = '\0'; in newstring()
202 return newstr; in newstring()
210 searchstring (struct Ebl_Strent **sep, struct Ebl_Strent *newstr) in searchstring() argument
215 *sep = newstr; in searchstring()
220 int cmpres = memcmp ((*sep)->reverse, newstr->reverse, in searchstring()
221 MIN ((*sep)->len, newstr->len) - 1); in searchstring()
226 return searchstring (&(*sep)->left, newstr); in searchstring()
228 return searchstring (&(*sep)->right, newstr); in searchstring()
246 struct Ebl_Strent *newstr = newstring (st, str, len); in ebl_strtabadd() local
247 if (newstr == NULL) in ebl_strtabadd()
253 struct Ebl_Strent **sep = searchstring (&st->root, newstr); in ebl_strtabadd()
254 if (*sep != newstr) in ebl_strtabadd()
257 if ((*sep)->len > newstr->len) in ebl_strtabadd()
262 if (subs->len == newstr->len) in ebl_strtabadd()
266 st->left += st->backp - (char *) newstr; in ebl_strtabadd()
267 st->backp = (char *) newstr; in ebl_strtabadd()
274 st->backp -= newstr->len; in ebl_strtabadd()
275 st->left += newstr->len; in ebl_strtabadd()
277 newstr->next = (*sep)->next; in ebl_strtabadd()
278 (*sep)->next = newstr; in ebl_strtabadd()
280 else if ((*sep)->len != newstr->len) in ebl_strtabadd()
285 st->total += newstr->len - (*sep)->len; in ebl_strtabadd()
286 newstr->next = *sep; in ebl_strtabadd()
287 newstr->left = (*sep)->left; in ebl_strtabadd()
288 newstr->right = (*sep)->right; in ebl_strtabadd()
289 *sep = newstr; in ebl_strtabadd()
294 st->left += st->backp - (char *) newstr; in ebl_strtabadd()
295 st->backp = (char *) newstr; in ebl_strtabadd()
297 newstr = *sep; in ebl_strtabadd()
301 st->total += newstr->len; in ebl_strtabadd()
303 return newstr; in ebl_strtabadd()