kwset 91 kwset.c struct kwset *kwset; kwset 93 kwset.c kwset = (struct kwset *) xmalloc(sizeof (struct kwset)); kwset 95 kwset.c obstack_init(&kwset->obstack); kwset 96 kwset.c kwset->words = 0; kwset 97 kwset.c kwset->trie kwset 98 kwset.c = (struct trie *) obstack_alloc(&kwset->obstack, sizeof (struct trie)); kwset 99 kwset.c if (!kwset->trie) kwset 101 kwset.c kwsfree((kwset_t) kwset); kwset 104 kwset.c kwset->trie->accepting = 0; kwset 105 kwset.c kwset->trie->links = NULL; kwset 106 kwset.c kwset->trie->parent = NULL; kwset 107 kwset.c kwset->trie->next = NULL; kwset 108 kwset.c kwset->trie->fail = NULL; kwset 109 kwset.c kwset->trie->depth = 0; kwset 110 kwset.c kwset->trie->shift = 0; kwset 111 kwset.c kwset->mind = INT_MAX; kwset 112 kwset.c kwset->maxd = -1; kwset 113 kwset.c kwset->target = NULL; kwset 114 kwset.c kwset->trans = trans; kwset 116 kwset.c return (kwset_t) kwset; kwset 128 kwset.c struct kwset *kwset; kwset 137 kwset.c kwset = (struct kwset *) kws; kwset 138 kwset.c trie = kwset->trie; kwset 145 kwset.c label = kwset->trans ? kwset->trans[U(*--text)] : *--text; kwset 169 kwset.c link = (struct tree *) obstack_alloc(&kwset->obstack, kwset 175 kwset.c link->trie = (struct trie *) obstack_alloc(&kwset->obstack, kwset 179 kwset.c obstack_free(&kwset->obstack, link); kwset 271 kwset.c trie->accepting = 1 + 2 * kwset->words; kwset 272 kwset.c ++kwset->words; kwset 275 kwset.c if (trie->depth < kwset->mind) kwset 276 kwset.c kwset->mind = trie->depth; kwset 277 kwset.c if (trie->depth > kwset->maxd) kwset 278 kwset.c kwset->maxd = trie->depth; kwset 381 kwset.c register struct kwset *kwset; kwset 387 kwset.c kwset = (struct kwset *) kws; kwset 392 kwset.c memset(delta, kwset->mind < UCHAR_MAX ? kwset->mind : UCHAR_MAX, NCHAR); kwset 396 kwset.c if (kwset->words == 1 && kwset->trans == NULL) kwset 401 kwset.c kwset->target = obstack_alloc(&kwset->obstack, kwset->mind); kwset 402 kwset.c if (!kwset->target) kwset 404 kwset.c for (i = kwset->mind - 1, curr = kwset->trie; i >= 0; --i) kwset 406 kwset.c kwset->target[i] = curr->links->label; kwset 410 kwset.c for (i = 0; i < kwset->mind; ++i) kwset 411 kwset.c delta[U(kwset->target[i])] = kwset->mind - (i + 1); kwset 414 kwset.c c = kwset->target[kwset->mind - 1]; kwset 415 kwset.c for (i = kwset->mind - 2; i >= 0; --i) kwset 416 kwset.c if (kwset->target[i] == c) kwset 418 kwset.c kwset->mind2 = kwset->mind - (i + 1); kwset 427 kwset.c for (curr = last = kwset->trie; curr; curr = curr->next) kwset 432 kwset.c curr->shift = kwset->mind; kwset 433 kwset.c curr->maxshift = kwset->mind; kwset 439 kwset.c treefails(curr->links, curr->fail, kwset->trie); kwset 462 kwset.c for (curr = kwset->trie->next; curr; curr = curr->next) kwset 474 kwset.c treenext(kwset->trie->links, next); kwset 476 kwset.c if ((trans = kwset->trans) != NULL) kwset 478 kwset.c kwset->next[i] = next[U(trans[i])]; kwset 480 kwset.c memcpy(kwset->next, next, NCHAR * sizeof(struct trie *)); kwset 484 kwset.c if ((trans = kwset->trans) != NULL) kwset 486 kwset.c kwset->delta[i] = delta[U(trans[i])]; kwset 488 kwset.c memcpy(kwset->delta, delta, NCHAR); kwset 497 kwset.c struct kwset const *kwset; kwset 502 kwset.c kwset = (struct kwset const *) kws; kwset 503 kwset.c len = kwset->mind; kwset 511 kwset.c tp = memchr (text, kwset->target[0], size); kwset 515 kwset.c d1 = kwset->delta; kwset 516 kwset.c sp = kwset->target + len; kwset 518 kwset.c md2 = kwset->mind2; kwset 583 kwset.c struct kwset const *kwset; kwset 598 kwset.c kwset = (struct kwset *) kws; kwset 599 kwset.c if (len < kwset->mind) kwset 601 kwset.c next = kwset->next; kwset 602 kwset.c delta = kwset->delta; kwset 603 kwset.c trans = kwset->trans; kwset 606 kwset.c if ((d = kwset->mind) != 0) kwset 610 kwset.c mch = text, accept = kwset->trie; kwset 614 kwset.c if (len >= 4 * kwset->mind) kwset 615 kwset.c qlim = lim - 4 * kwset->mind; kwset 675 kwset.c if (lim - mch > kwset->maxd) kwset 676 kwset.c lim = mch + kwset->maxd; kwset 746 kwset.c struct kwset const *kwset = (struct kwset *) kws; kwset 747 kwset.c if (kwset->words == 1 && kwset->trans == NULL) kwset 754 kwset.c kwsmatch->size[0] = kwset->mind; kwset 766 kwset.c struct kwset *kwset; kwset 768 kwset.c kwset = (struct kwset *) kws; kwset 769 kwset.c obstack_free(&kwset->obstack, NULL);