/freebsd/contrib/flex/src/ |
H A D | regex.c | 81 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 D | main.c | 92 subs[0].rm_so = startoff; in main() 103 len = (int)(subs[0].rm_eo - subs[0].rm_so); 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() 115 (int)(subs[i].rm_eo - subs[i].rm_so), in main() 116 argv[optind] + subs[i].rm_so); in main() 247 subs[0].rm_so = strchr(f2, '(') - f2 + 1; in try() 407 if (sub.rm_so > sub.rm_eo || (sub.rm_so == -1 && sub.rm_eo != -1) || in check() [all …]
|
/freebsd/contrib/netbsd-tests/lib/libc/regex/ |
H A D | main.c | 123 subs[0].rm_so = startoff; in main() 134 len = (int)(subs[0].rm_eo - subs[0].rm_so); 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() 146 (int)(subs[i].rm_eo - subs[i].rm_so), in main() 147 argv[optind] + subs[i].rm_so); in main() 279 subs[0].rm_so = strchr(f2, '(') - f2 + 1; in try() 441 if (sub.rm_so > sub.rm_eo || (sub.rm_so == -1 && sub.rm_eo != -1) || in check() [all …]
|
H A D | t_regex_att.c | 369 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 D | util.c | 451 ofs = pmatch[0].rm_so; in litexec() 472 pmatch[idx].rm_so = ofs + (sub - search); in litexec() 473 pmatch[idx].rm_eo = pmatch[idx].rm_so + pat->len; in litexec() 476 ofs = pmatch[idx].rm_so + 1; in litexec() 484 pmatch[n].rm_so = pmatch[n].rm_eo = -1; in litexec() 541 lastmatch.rm_so = lastmatch.rm_eo = 0; in procline() 552 pmatch.rm_so = st; in procline() 564 if (xflag && (pmatch.rm_so != 0 || in procline() 570 if (pmatch.rm_so != 0 && in procline() 571 sscanf(&pc->ln.dat[pmatch.rm_so - 1], in procline() [all …]
|
/freebsd/contrib/nvi/common/ |
H A D | search.c | 229 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 D | sort.c | 638 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() 671 len = pmatch[2].rm_eo - pmatch[2].rm_so - 1; in parse_pos() 674 strncpy(c, s + pmatch[2].rm_so + 1, len); in parse_pos() 699 if (pmatch[3].rm_eo > pmatch[3].rm_so) { in parse_pos() 702 for (i = pmatch[3].rm_so; i < pmatch[3].rm_eo; i++) { in parse_pos() 794 if (pmatch[0].rm_eo <= pmatch[0].rm_so) in parse_pos_obs() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Support/ |
H A D | Regex.cpp | 102 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 D | regex_impl.h | 44 llvm_regoff_t rm_so; /* start of match */ member
|
H A D | regengine.inc | 152 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); 631 len = m->pmatch[i].rm_eo - m->pmatch[i].rm_so; 637 ssp = m->offp + m->pmatch[i].rm_so; 691 offsave = m->pmatch[i].rm_so; [all …]
|
/freebsd/usr.bin/m4/ |
H A D | gnum4.c | 286 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 D | subst.c | 243 realloc_strncat(result, name, matches[0].rm_so); in apply_substitution() 249 name + matches[0].rm_so, in apply_substitution() 250 matches[0].rm_eo - matches[0].rm_so); in apply_substitution() 281 …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 D | process.c | 409 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() 673 match[0].rm_so = start; in regexec_e() 722 } else if (match[no].rm_so != -1 && match[no].rm_eo != -1) { in regsub() 723 len = match[no].rm_eo - match[no].rm_so; in regsub() 725 memmove(dst, string + match[no].rm_so, len); in regsub()
|
/freebsd/contrib/kyua/utils/text/ |
H A D | regex.cpp | 159 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 D | engine.c | 149 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() 588 len = m->pmatch[i].rm_eo - m->pmatch[i].rm_so; in backref() 592 ssp = m->offp + m->pmatch[i].rm_so; in backref() 646 offsave = m->pmatch[i].rm_so; in backref() [all …]
|
H A D | regex.h | 57 regoff_t rm_so; /* start of match */ member
|
/freebsd/bin/pax/ |
H A D | pat_rep.c | 876 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/bin/ed/ |
H A D | sub.c | 185 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/lib/libc/regex/ |
H A D | engine.c | 213 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() 751 len = m->pmatch[i].rm_eo - m->pmatch[i].rm_so; in backref() 757 ssp = m->offp + m->pmatch[i].rm_so; in backref() 808 offsave = m->pmatch[i].rm_so; in backref() [all …]
|
/freebsd/contrib/less/ |
H A D | pattern.c | 330 rm[0].rm_so = 0; in match_pattern1() 339 if (rm[ecount-1].rm_so >= 0) in match_pattern1() 345 if (rm[i].rm_so < 0) in match_pattern1() 351 *sp++ = line + rm[i].rm_so; in match_pattern1()
|
/freebsd/contrib/nvi/ex/ |
H A D | ex_subst.c | 542 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 D | regex.h | 58 regoff_t rm_so; /* start of match */ member
|
/freebsd/bin/expr/ |
H A D | expr.y | 544 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 D | killall.c | 362 pmatch.rm_so = 0; in main() 388 pmatch.rm_so = 0; in main()
|
/freebsd/sys/dev/aic7xxx/aicasm/ |
H A D | aicasm_scan.l | 517 regmatch_t match = { .rm_so = 0, .rm_eo = 0 }; 546 body_pos -= match.rm_eo - match.rm_so;
|