Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\ts_bm.c Create Date:2022-07-28 07:10:33
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:compute_prefix_tbl

Proto:static void compute_prefix_tbl(struct ts_bm *bm, int flags)

Type:void

Parameter:

TypeParameterName
struct ts_bm *bm
intflags
118  When i < Alphabet size, use ASCII cycle bad_shift[i] = patlen
120  When i < patlen - 1 cycle
121  bad_shift[pattern[i]] = patlen - 1 - i
122  If flags & Searches string case insensitively Then bad_shift[tolower(pattern[i])] = patlen - 1 - i
129  good_shift[0] = 1
130  When i < patlen cycle good_shift[i] = patlen
132  When i > 0 cycle
133  When j >= 1 - g cycle If subpattern(pattern, i, j, g) Then
135  good_shift[g] = patlen - j - g
136  Break
Caller
NameDescribe
bm_init