Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:kmp_find

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

Type:unsigned int

Parameter:

TypeParameterName
struct ts_config *conf
struct ts_state *state
44  kmp = ts_config_priv(conf)
45  q = 0 , consumed = offset
47  icase = flags & Searches string case insensitively
49  cycle
50  text_len = get_next_block(consumed, & text, conf, state)
52  If Value for the false possibility is greater at compile time(text_len == 0) Then Break
55  When i < text_len cycle
56  When q > 0 && pattern[q] != If icase Then toupper(text[i]) Else text[i] cycle
58  q = prefix_tbl[q - 1]
59  If pattern[q] == If icase Then toupper(text[i]) Else text[i] Then q++
63  offset = consumed + i + 1
64  Return offset - pattern_len
68  consumed += text_len
71  Return UINT_MAX