Lines Matching refs:hs
39 strstr2 (const unsigned char *hs, const unsigned char *ne) in strstr2() argument
43 for (int c = hs[0]; h1 != h2 && c != 0; c = *++hs) in strstr2()
45 return h1 == h2 ? (char *)hs - 2 : NULL; in strstr2()
49 strstr3 (const unsigned char *hs, const unsigned char *ne) in strstr3() argument
53 for (int c = hs[0]; h1 != h2 && c != 0; c = *++hs) in strstr3()
55 return h1 == h2 ? (char *)hs - 3 : NULL; in strstr3()
78 const unsigned char *hs = (const unsigned char *) haystack; in STRSTR() local
83 return (char *)hs; in STRSTR()
84 hs = (const unsigned char *)strchr ((const char*)hs, ne[0]); in STRSTR()
85 if (hs == NULL || ne[1] == '\0') in STRSTR()
86 return (char*)hs; in STRSTR()
88 return strstr2 (hs, ne); in STRSTR()
90 return strstr3 (hs, ne); in STRSTR()
96 size_t hs_len = __strnlen ((const char*)hs, ne_len | 512); in STRSTR()
102 if (memcmp (hs, ne, ne_len) == 0) in STRSTR()
103 return (char *) hs; in STRSTR()
107 return two_way_long_needle (hs, hs_len, ne, ne_len); in STRSTR()
109 const unsigned char *end = hs + hs_len - ne_len; in STRSTR()
126 if (__glibc_unlikely (hs > end)) in STRSTR()
129 if (hs > end) in STRSTR()
136 hs += m1; in STRSTR()
137 tmp = shift[hash2 (hs)]; in STRSTR()
139 while (tmp == 0 && hs <= end); in STRSTR()
143 hs -= tmp; in STRSTR()
149 if (m1 < 15 || memcmp (hs + offset, ne + offset, 8) == 0) in STRSTR()
151 if (memcmp (hs, ne, m1) == 0) in STRSTR()
152 return (void *) hs; in STRSTR()
159 hs += shift1; in STRSTR()