Home
last modified time | relevance | path

Searched refs:rm_so (Results 1 – 25 of 47) sorted by relevance

12

/freebsd/contrib/flex/src/
H A Dregex.c81 if (m == NULL || m->rm_so < 0 || m->rm_eo < m->rm_so) in regmatch_dup()
83 len = (size_t) (m->rm_eo - m->rm_so); in regmatch_dup()
87 strncpy (str, src + m->rm_so, len); in regmatch_dup()
100 if (m == NULL || m->rm_so < 0) { in regmatch_cpy()
106 snprintf (dest, (size_t) regmatch_len(m), "%s", src + m->rm_so); in regmatch_cpy()
116 if (m == NULL || m->rm_so < 0) { in regmatch_len()
120 return m->rm_eo - m->rm_so; in regmatch_len()
141 if (m == NULL || m->rm_so < 0) in regmatch_strtol()
164 return (m == NULL || m->rm_so < 0 || m->rm_so == m->rm_eo); in regmatch_empty()
/freebsd/lib/libc/regex/grot/
H A Dmain.c92 subs[0].rm_so = startoff; in main()
104 if (subs[0].rm_so != -1) { in main()
107 argv[optind] + subs[0].rm_so); in main()
110 argv[optind] + subs[0].rm_so); in main()
113 if (subs[i].rm_so != -1) in main()
116 argv[optind] + subs[i].rm_so); in main()
407 if (sub.rm_so > sub.rm_eo || (sub.rm_so == -1 && sub.rm_eo != -1) || in check()
409 (sub.rm_so != -1 && sub.rm_so < 0) || in check()
419 if (sub.rm_so == -1) in check()
429 len = (int)(sub.rm_eo - sub.rm_so); in check()
[all …]
/freebsd/contrib/netbsd-tests/lib/libc/regex/
H A Dmain.c123 subs[0].rm_so = startoff; in main()
135 if (subs[0].rm_so != -1) { in main()
138 argv[optind] + subs[0].rm_so); in main()
141 argv[optind] + subs[0].rm_so); in main()
144 if (subs[i].rm_so != -1) in main()
147 argv[optind] + subs[i].rm_so); in main()
441 if (sub.rm_so > sub.rm_eo || (sub.rm_so == -1 && sub.rm_eo != -1) || in check()
443 (sub.rm_so != -1 && sub.rm_so < 0) || in check()
451 if (sub.rm_so == -1) { in check()
467 len = (int)(sub.rm_eo - sub.rm_so); in check()
[all …]
H A Dt_regex_att.c369 if (pm[i].rm_so == -1 && pm[i].rm_eo == -1) in checkmatches()
373 (long long)pm[i].rm_so, (long long)pm[i].rm_eo); in checkmatches()
/freebsd/usr.bin/grep/
H A Dutil.c428 ofs = pmatch[0].rm_so; in litexec()
453 ofs = pmatch[idx].rm_so + 1; in litexec()
529 pmatch.rm_so = st; in procline()
541 if (xflag && (pmatch.rm_so != 0 || in procline()
547 if (pmatch.rm_so != 0 && in procline()
570 retry = pmatch.rm_so + 1; in procline()
588 if (pmatch.rm_so < chkmatch.rm_so || in procline()
589 (pmatch.rm_so == chkmatch.rm_so && in procline()
765 if (match.rm_so == match.rm_eo) in printline()
772 pc->ln.boff = match.rm_so; in printline()
[all …]
/freebsd/contrib/nvi/common/
H A Dsearch.c229 match[0].rm_so = coff; in f_search()
238 (match[0].rm_so == 0 ? 0 : REG_NOTBOL) | REG_STARTEND); in f_search()
255 match[0].rm_so, match[0].rm_eo); in f_search()
258 rm->cno = match[0].rm_so; in f_search()
363 match[0].rm_so = 0; in b_search()
383 if (coff != 0 && match[0].rm_so >= coff) in b_search()
392 match[0].rm_so, match[0].rm_eo); in b_search()
401 last = match[0].rm_so++; in b_search()
402 if (match[0].rm_so >= len) in b_search()
406 (match[0].rm_so == 0 ? 0 : REG_NOTBOL) | in b_search()
[all …]
/freebsd/usr.bin/sort/
H A Dsort.c638 if (pmatch[0].rm_eo <= pmatch[0].rm_so) in parse_pos()
641 if (pmatch[1].rm_eo <= pmatch[1].rm_so) in parse_pos()
644 len = pmatch[1].rm_eo - pmatch[1].rm_so; in parse_pos()
647 strncpy(f, s + pmatch[1].rm_so, len); in parse_pos()
670 if (pmatch[2].rm_eo > pmatch[2].rm_so) { in parse_pos()
699 if (pmatch[3].rm_eo > pmatch[3].rm_so) { in parse_pos()
794 if (pmatch[0].rm_eo <= pmatch[0].rm_so) in parse_pos_obs()
797 if (pmatch[1].rm_eo <= pmatch[1].rm_so) in parse_pos_obs()
800 len = pmatch[1].rm_eo - pmatch[1].rm_so; in parse_pos_obs()
803 strncpy(f, s + pmatch[1].rm_so, len); in parse_pos_obs()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Support/
H A DRegex.cpp102 pm[0].rm_so = 0; in match()
123 if (pm[i].rm_so == -1) { in match()
128 assert(pm[i].rm_eo >= pm[i].rm_so); in match()
129 Matches->push_back(StringRef(String.data()+pm[i].rm_so, in match()
130 pm[i].rm_eo-pm[i].rm_so)); in match()
H A Dregex_impl.h44 llvm_regoff_t rm_so; /* start of match */ member
H A Dregengine.inc152 start = string + pmatch[0].rm_so;
220 m->pmatch[i].rm_so = m->pmatch[i].rm_eo = -1;
252 assert(m->pmatch[i].rm_so == -1);
272 pmatch[0].rm_so = m->coldp - m->offp;
281 pmatch[i].rm_so = -1;
503 m->pmatch[i].rm_so = sp - m->offp;
630 assert(m->pmatch[i].rm_so != -1);
637 ssp = m->offp + m->pmatch[i].rm_so;
691 offsave = m->pmatch[i].rm_so;
692 m->pmatch[i].rm_so = sp - m->offp;
[all …]
/freebsd/usr.bin/m4/
H A Dgnum4.c286 else if (pm[n].rm_so != -1 && in add_sub()
288 addchars(string + pm[n].rm_so, in add_sub()
289 pm[n].rm_eo - pm[n].rm_so); in add_sub()
349 if (pm[0].rm_so == pm[0].rm_eo && in do_subst()
350 string + pm[0].rm_so == last_match) { in do_subst()
360 last_match = string + pm[0].rm_so; in do_subst()
361 addchars(string, pm[0].rm_so); in do_subst()
396 pbunsigned(pm[0].rm_so); in do_regexpindex()
/freebsd/contrib/libarchive/tar/
H A Dsubst.c261 realloc_strncat(result, name, matches[0].rm_so); in apply_substitution()
267 name + matches[0].rm_so, in apply_substitution()
268 matches[0].rm_eo - matches[0].rm_so); in apply_substitution()
299 …realloc_strncat(result, name + matches[c - '0'].rm_so, matches[c - '0'].rm_eo - matches[c - '0'].r… in apply_substitution()
/freebsd/usr.bin/sed/
H A Dprocess.c409 if (n <= 1 && (match[0].rm_so > le)) in substitute()
410 cspace(&SS, s, match[0].rm_so - le, APPEND); in substitute()
413 if (lastempty || (match[0].rm_so - le) || in substitute()
414 match[0].rm_so != match[0].rm_eo) { in substitute()
438 if (match[0].rm_so == match[0].rm_eo) { in substitute()
675 match[0].rm_so = start; in regexec_e()
724 } else if (match[no].rm_so != -1 && match[no].rm_eo != -1) { in regsub()
725 len = match[no].rm_eo - match[no].rm_so; in regsub()
727 memmove(dst, string + match[no].rm_so, len); in regsub()
/freebsd/contrib/kyua/utils/text/
H A Dregex.cpp159 if (_pimpl->_matches[i].rm_so != -1) in count()
185 return std::string(_pimpl->_string.c_str() + match->rm_so, in get()
186 match->rm_eo - match->rm_so); in get()
/freebsd/contrib/nvi/regex/
H A Dengine.c149 start = string + pmatch[0].rm_so; in matcher()
215 m->pmatch[i].rm_so = m->pmatch[i].rm_eo = -1; in matcher()
247 assert(m->pmatch[i].rm_so == -1); in matcher()
266 pmatch[0].rm_so = m->coldp - m->offp; in matcher()
275 pmatch[i].rm_so = -1; in matcher()
453 m->pmatch[i].rm_so = sp - m->offp; in dissect()
587 assert(m->pmatch[i].rm_so != -1); in backref()
592 ssp = m->offp + m->pmatch[i].rm_so; in backref()
646 offsave = m->pmatch[i].rm_so; in backref()
647 m->pmatch[i].rm_so = sp - m->offp; in backref()
[all …]
H A Dregex.h57 regoff_t rm_so; /* start of match */ member
/freebsd/bin/ed/
H A Dsub.c185 i = rm[0].rm_so; in substitute_matching_text()
233 j = rm[0].rm_so; in apply_subst_template()
240 j = rm[n].rm_so; in apply_subst_template()
/freebsd/bin/pax/
H A Dpat_rep.c876 rpt = inpt + pm[0].rm_so; in rep_name()
908 inpt += pm[0].rm_eo - pm[0].rm_so; in rep_name()
1017 if ((pmpt->rm_so < 0) || (pmpt->rm_eo < 0) || in resub()
1018 ((len = pmpt->rm_eo - pmpt->rm_so) <= 0)) in resub()
1027 if (l_strncpy(dpt, orig + pmpt->rm_so, len) != len) in resub()
/freebsd/contrib/less/
H A Dpattern.c328 rm[0].rm_so = 0; in match_pattern1()
337 if (rm[ecount-1].rm_so >= 0) in match_pattern1()
343 if (rm[i].rm_so < 0) in match_pattern1()
349 *sp++ = line + rm[i].rm_so; in match_pattern1()
/freebsd/lib/libc/regex/
H A Dengine.c213 start = string + pmatch[0].rm_so; in matcher()
330 m->pmatch[i].rm_so = m->pmatch[i].rm_eo = -1; in matcher()
362 assert(m->pmatch[i].rm_so == -1); in matcher()
383 pmatch[0].rm_so = m->coldp - m->offp; in matcher()
392 pmatch[i].rm_so = -1; in matcher()
579 m->pmatch[i].rm_so = sp - m->offp; in dissect()
750 assert(m->pmatch[i].rm_so != -1); in backref()
757 ssp = m->offp + m->pmatch[i].rm_so; in backref()
808 offsave = m->pmatch[i].rm_so; in backref()
809 m->pmatch[i].rm_so = sp - m->offp; in backref()
[all …]
/freebsd/contrib/nvi/ex/
H A Dex_subst.c542 nextmatch: match[0].rm_so = 0; in s()
584 if (!empty_ok && match[0].rm_so == 0 && match[0].rm_eo == 0) { in s()
602 from.cno = match[0].rm_so + offset; in s()
682 sp->cno = match[0].rm_so; in s()
685 BUILD(sp, s + offset, match[0].rm_so); in s()
1394 subzero: if (match[no].rm_so == -1 || in re_sub()
1397 mlen = match[no].rm_eo - match[no].rm_so; in re_sub()
1398 for (t = ip + match[no].rm_so; mlen--; ++t) in re_sub()
/freebsd/include/
H A Dregex.h58 regoff_t rm_so; /* start of match */ member
/freebsd/bin/expr/
H A Dexpr.y544 if (regexec(&rp, a->u.s, (size_t)2, rm, 0) == 0 && rm[0].rm_so == 0) in op_colon()
545 if (rm[1].rm_so >= 0) { in op_colon()
547 v = make_str(a->u.s + rm[1].rm_so); in op_colon()
/freebsd/usr.bin/killall/
H A Dkillall.c362 pmatch.rm_so = 0; in main()
388 pmatch.rm_so = 0; in main()
/freebsd/sys/dev/aic7xxx/aicasm/
H A Daicasm_scan.l517 regmatch_t match = { .rm_so = 0, .rm_eo = 0 };
546 body_pos -= match.rm_eo - match.rm_so;

12