Lines Matching refs:pattern
52 u8 * pattern; member
78 != bm->pattern[bm->patlen-1-i]) in bm_find()
96 static int subpattern(u8 *pattern, int i, int j, int g) in subpattern() argument
100 while(pattern[x--] == pattern[y--]) { in subpattern()
106 ret = pattern[i-1] != pattern[j-1]; in subpattern()
121 bm->bad_shift[bm->pattern[i]] = bm->patlen - 1 - i; in compute_prefix_tbl()
123 bm->bad_shift[tolower(bm->pattern[i])] in compute_prefix_tbl()
134 if (subpattern(bm->pattern, i, j, g)) { in compute_prefix_tbl()
141 static struct ts_config *bm_init(const void *pattern, unsigned int len, in bm_init() argument
157 bm->pattern = (u8 *) bm->good_shift + prefix_tbl_len; in bm_init()
160 bm->pattern[i] = toupper(((u8 *)pattern)[i]); in bm_init()
162 memcpy(bm->pattern, pattern, len); in bm_init()
171 return bm->pattern; in bm_get_pattern()