Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:bm_find

Proto:static unsigned int bm_find(struct ts_config *conf, struct ts_state *state)

Type:unsigned int

Parameter:

TypeParameterName
struct ts_config *conf
struct ts_state *state
60  bm = ts_config_priv(conf)
61  consumed = offset
63  shift = patlen - 1
64  icase = flags & Searches string case insensitively
66  cycle
67  text_len = get_next_block(consumed, & text, conf, state)
69  If Value for the false possibility is greater at compile time(text_len == 0) Then Break
72  When shift < text_len cycle
75  When i < patlen cycle If If icase Then toupper(text[shift - i]) Else text[shift - i] != pattern[patlen - 1 - i] Then
79  Go to next
83  Return consumed += shift - patlen - 1
85  :
85  bs = bad_shift[text[shift - i]]
90  consumed += text_len
93  Return UINT_MAX