#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "sfksearch.h"
Go to the source code of this file.
Functions | |
static void * | KTRIE_MALLOC (int n) |
static void | init_xlatcase () |
static void | ConvertCaseEx (unsigned char *d, unsigned char *s, int m) |
KTRIE_STRUCT * | KTrieNew () |
static KTRIEPATTERN * | KTrieNewPattern (unsigned char *P, int n) |
int | KTrieAddPattern (KTRIE_STRUCT *ts, unsigned char *P, int n, int nocase, void *id) |
static KTRIENODE * | KTrieCreateNode (KTRIE_STRUCT *ts) |
static int | KTrieInsert (KTRIE_STRUCT *ts, KTRIEPATTERN *px) |
static void | Build_Bad_Character_Shifts (KTRIE_STRUCT *kt) |
int | KTrieCompile (KTRIE_STRUCT *ts) |
static int | KTriePrefixMatch (KTRIE_STRUCT *kt, unsigned char *T, unsigned char *Tc, unsigned char *bT, int n, int(*match)(void *id, int index, void *data), void *data) |
static int | KTrieSearchNoBC (KTRIE_STRUCT *ks, unsigned char *Tx, int n, int(*match)(void *id, int index, void *data), void *data) |
static int | KTrieSearchBC (KTRIE_STRUCT *ks, unsigned char *Tx, int n, int(*match)(void *id, int index, void *data), void *data) |
int | KTrieSearch (KTRIE_STRUCT *ks, unsigned char *T, int n, int(*match)(void *id, int index, void *data), void *data) |
Variables | |
static unsigned char | Tnocase [65 *1024] |
static unsigned char | xlatcase [256] |
|
Definition at line 327 of file sfksearch.c. References KTRIE_STRUCT::bcShift, KTRIE_STRUCT::bcSize, _ktriepattern::n, _ktriepattern::next, NULL, _ktriepattern::P, and KTRIE_STRUCT::patrn. Referenced by KTrieCompile(). |
|
Definition at line 95 of file sfksearch.c. References xlatcase. |
|
Definition at line 77 of file sfksearch.c. |
|
Definition at line 43 of file sfksearch.c. References memset. Referenced by KTrieCreateNode(), KTrieNew(), and KTrieNewPattern(). |
|
Definition at line 156 of file sfksearch.c. References KTrieNewPattern(), KTRIE_STRUCT::memory, _ktriepattern::nocase, KTRIE_STRUCT::npats, NULL, and KTRIE_STRUCT::patrn. Referenced by mpseAddPattern(). |
|
Definition at line 377 of file sfksearch.c. References Build_Bad_Character_Shifts(), KTrieInsert(), _ktriepattern::next, and KTRIE_STRUCT::patrn. Referenced by mpsePrepPatterns(). |
|
Definition at line 192 of file sfksearch.c. References KTRIE_MALLOC(), KTRIE_STRUCT::memory, and memset. Referenced by KTrieInsert(). |
|
Definition at line 210 of file sfksearch.c. References _ktrienode::child, KTRIE_STRUCT::duplicates, _ktrienode::edge, KTrieCreateNode(), _ktriepattern::mnext, _ktriepattern::n, KTRIE_STRUCT::nchars, _ktriepattern::P, _ktrienode::pkeyword, KTRIE_STRUCT::root, and _ktrienode::sibling. Referenced by KTrieCompile(). |
|
Definition at line 108 of file sfksearch.c. References init_xlatcase(), KTRIE_MALLOC(), KTRIE_STRUCT::memory, memset, KTRIE_STRUCT::nchars, and KTRIE_STRUCT::npats. Referenced by mpseNew(). |
|
Definition at line 128 of file sfksearch.c. References ConvertCaseEx(), KTRIE_MALLOC(), memcpy, _ktriepattern::n, _ktriepattern::next, _ktriepattern::P, and _ktriepattern::Pcase. Referenced by KTrieAddPattern(). |
|
Definition at line 423 of file sfksearch.c. References _ktrienode::child, _ktrienode::edge, _ktriepattern::id, int(), memcmp(), _ktriepattern::mnext, _ktriepattern::n, _ktriepattern::nocase, _ktriepattern::Pcase, _ktrienode::pkeyword, KTRIE_STRUCT::root, and _ktrienode::sibling. Referenced by KTrieSearchBC(), and KTrieSearchNoBC(). |
|
Definition at line 554 of file sfksearch.c. References KTRIE_STRUCT::bcSize, KTrieSearchBC(), and KTrieSearchNoBC(). Referenced by mpseSearch(). |
|
Definition at line 517 of file sfksearch.c. References KTRIE_STRUCT::bcShift, KTRIE_STRUCT::bcSize, ConvertCaseEx(), KTriePrefixMatch(), and Tnocase. Referenced by KTrieSearch(). |
|
Definition at line 495 of file sfksearch.c. References ConvertCaseEx(), KTriePrefixMatch(), and Tnocase. Referenced by KTrieSearch(). |
|
Definition at line 67 of file sfksearch.c. Referenced by KTrieSearchBC(), and KTrieSearchNoBC(). |
|
Definition at line 72 of file sfksearch.c. |