Lines Matching defs:search
776 cp = strndup(RCAST(const char *, ms->search.s),
777 ms->search.rm_len);
779 file_oomem(ms, ms->search.rm_len);
785 sbuf, sizeof(sbuf), scp, ms->search.rm_len));
939 o = CAST(int32_t, ms->search.offset);
942 (ms->search.offset + ms->search.rm_len));
947 o = CAST(int32_t, ms->search.offset);
949 o = CAST(int32_t, (ms->search.offset + m->vallen));
1343 ms->search.s = RCAST(const char *, s) + offset;
1344 ms->search.s_len = nbytes - offset;
1345 ms->search.offset = offset;
1351 const char *last; /* end of search region */
1352 const char *buf; /* start of search region */
1357 ms->search.s_len = 0;
1358 ms->search.s = NULL;
1393 ms->search.s = buf;
1394 ms->search.s_len = last - buf;
1395 ms->search.offset = offset;
1396 ms->search.rm_len = 0;
2246 case FILE_SEARCH: { /* search ms->search.s for the string m->value.s */
2250 if (ms->search.s == NULL)
2257 size_t xlen = ms->search.s_len > 100 ? 100
2258 : ms->search.s_len;
2260 fprintf(stderr, "search: [");
2261 file_showstr(stderr, ms->search.s, xlen);
2262 fprintf(stderr, "%s] for [", ms->search.s_len == xlen
2270 if (m->str_range == 0 || ms->search.s_len < idx)
2271 idx = ms->search.s_len;
2272 found = CAST(const char *, memmem(ms->search.s, idx,
2282 idx = found - ms->search.s;
2283 ms->search.offset += idx;
2284 ms->search.rm_len = ms->search.s_len - idx;
2290 if (slen + idx > ms->search.s_len) {
2295 v = file_strncmp(m->value.s, ms->search.s + idx, slen,
2296 ms->search.s_len - idx, m->str_flags);
2298 ms->search.offset += idx;
2299 ms->search.rm_len = ms->search.s_len - idx;
2311 const char *search;
2313 size_t slen = ms->search.s_len;
2316 if (ms->search.s == NULL)
2333 memcpy(copy, ms->search.s, slen);
2335 search = copy;
2337 search = CCAST(char *, "");
2340 rc = file_regexec(ms, rx, RCAST(const char *, search),
2345 ms->search.s += CAST(int, pmatch.rm_so);
2346 ms->search.offset += CAST(size_t, pmatch.rm_so);
2347 ms->search.rm_len = CAST(size_t,