Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\ts_kmp.c Create Date:2022-07-28 07:10:25
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 inline void compute_prefix_tbl(const u8 *pattern, unsigned int len, unsigned int *prefix_tbl, int flags)

Type:void

Parameter:

TypeParameterName
const u8 *pattern
unsigned intlen
unsigned int *prefix_tbl
intflags
78  icase = flags & Searches string case insensitively
80  When q < len cycle
81  When k > 0 && If icase Then toupper(pattern[k]) Else pattern[k] != If icase Then toupper(pattern[q]) Else pattern[q] cycle
83  k = prefix_tbl[k - 1]
84  If If icase Then toupper(pattern[k]) Else pattern[k] == If icase Then toupper(pattern[q]) Else pattern[q] Then k++
87  prefix_tbl[q] = k
Caller
NameDescribe
kmp_init