#include "pike_search_engine2.c"
Defines | |
#define | HSHIFT 0 |
#define | HSHIFT 1 |
#define | HSHIFT 2 |
#define | INTERCASE(NAME, X) case X: return MKPCHARP(PxC3(NAME,NSHIFT,X)(s,(PxC(p_wchar,X) *)haystack.ptr,haystacklen),X) |
#define | INTERMEDIATE(NAME) |
#define | MMCASE(X) |
Variables | |
int NameN( | init_hubbe_search )(struct hubbe_searcher *s, NCHAR *needle, ptrdiff_t needlelen, ptrdiff_t max_haystacklen) |
void NameN( | init_boyer_moore_hubbe )(struct boyer_moore_hubbe_searcher *s, NCHAR *needle, ptrdiff_t needlelen, ptrdiff_t max_haystacklen) |
void NameN( | init_memsearch )(struct pike_mem_searcher *s, NCHAR *needle, ptrdiff_t needlelen, ptrdiff_t max_haystacklen) |
SearchMojt NameN( | compile_memsearcher )(NCHAR *needle, ptrdiff_t len, int max_haystacklen, struct pike_string *hashkey) |
|
|
|
|
|
|
|
|
|
Value: PCHARP PxC3(NAME,NSHIFT,N)(void *s, \ PCHARP haystack, \ ptrdiff_t haystacklen) \ { \ switch(haystack.shift) \ { \ INTERCASE(NAME,0); \ INTERCASE(NAME,1); \ INTERCASE(NAME,2); \ } \ Pike_fatal("Illegal shift\n"); \ return haystack; /* NOT_REACHED */ \ } \ \ static const struct SearchMojtVtable PxC3(NAME,NSHIFT,_vtable) = { \ (SearchMojtFunc0)PxC3(NAME,NSHIFT,0), \ (SearchMojtFunc1)PxC3(NAME,NSHIFT,1), \ (SearchMojtFunc2)PxC3(NAME,NSHIFT,2), \ (SearchMojtFuncN)PxC3(NAME,NSHIFT,N), \ PxC2(NAME,_free), \ }; |
|
Value: case X: \ s->mojt.data=(void *) needle; \ s->mojt.vtab=& PxC4(memchr_memcmp,X,NSHIFT,_vtable); \ return |
|
|
|
|
|
|
|
|