Lines Matching +full:3 +full:k
50 uint32_t nw = (uint32_t)n[0] << 24 | n[1] << 16 | n[2] << 8 | n[3]; in fourbyte_strstr()
51 uint32_t hw = (uint32_t)h[0] << 24 | h[1] << 16 | h[2] << 8 | h[3]; in fourbyte_strstr()
52 for (h += 3; *h && hw != nw; hw = hw << 8 | *++h) in fourbyte_strstr()
54 return *h ? (char *)h - 3 : 0; in fourbyte_strstr()
70 * Journal of the ACM 38(3):651-675
76 size_t l, ip, jp, k, p, ms, p0, mem, mem0; in twoway_strstr() local
89 k = p = 1; in twoway_strstr()
90 while (jp + k < l) { in twoway_strstr()
91 if (n[ip + k] == n[jp + k]) { in twoway_strstr()
92 if (k == p) { in twoway_strstr()
94 k = 1; in twoway_strstr()
96 k++; in twoway_strstr()
97 } else if (n[ip + k] > n[jp + k]) { in twoway_strstr()
98 jp += k; in twoway_strstr()
99 k = 1; in twoway_strstr()
103 k = p = 1; in twoway_strstr()
112 k = p = 1; in twoway_strstr()
113 while (jp + k < l) { in twoway_strstr()
114 if (n[ip + k] == n[jp + k]) { in twoway_strstr()
115 if (k == p) { in twoway_strstr()
117 k = 1; in twoway_strstr()
119 k++; in twoway_strstr()
120 } else if (n[ip + k] < n[jp + k]) { in twoway_strstr()
121 jp += k; in twoway_strstr()
122 k = 1; in twoway_strstr()
126 k = p = 1; in twoway_strstr()
162 k = l - shift[h[l - 1]]; in twoway_strstr()
163 if (k) { in twoway_strstr()
164 if (k < mem) in twoway_strstr()
165 k = mem; in twoway_strstr()
166 h += k; in twoway_strstr()
177 for (k = MAX(ms + 1, mem); n[k] && n[k] == h[k]; k++) in twoway_strstr()
179 if (n[k]) { in twoway_strstr()
180 h += k - ms; in twoway_strstr()
185 for (k = ms + 1; k > mem && n[k - 1] == h[k - 1]; k--) in twoway_strstr()
187 if (k <= mem) in twoway_strstr()
211 if (!n[3]) in strstr()
213 if (!h[3]) in strstr()