/freebsd-current/contrib/flex/src/ |
H A D | regex.c | 81 if (m == NULL || m->rm_so < 0 || m->rm_eo < m->rm_so) 83 len = (size_t) (m->rm_eo - m->rm_so); 87 strncpy (str, src + m->rm_so, len); 100 if (m == NULL || m->rm_so < 0) { 106 snprintf (dest, (size_t) regmatch_len(m), "%s", src + m->rm_so); 116 if (m == NULL || m->rm_so < 0) { 120 return m->rm_eo - m->rm_so; 141 if (m == NULL || m->rm_so < 0) 164 return (m == NULL || m->rm_so < [all...] |
/freebsd-current/lib/libc/regex/grot/ |
H A D | main.c | 92 subs[0].rm_so = startoff; 103 len = (int)(subs[0].rm_eo - subs[0].rm_so); 104 if (subs[0].rm_so != -1) { 107 argv[optind] + subs[0].rm_so); 110 argv[optind] + subs[0].rm_so); 113 if (subs[i].rm_so != -1) 115 (int)(subs[i].rm_eo - subs[i].rm_so), 116 argv[optind] + subs[i].rm_so); 247 subs[0].rm_so = strchr(f2, '(') - f2 + 1; 406 /* check rm_so an [all...] |
/freebsd-current/contrib/netbsd-tests/lib/libc/regex/ |
H A D | main.c | 123 subs[0].rm_so = startoff; 134 len = (int)(subs[0].rm_eo - subs[0].rm_so); 135 if (subs[0].rm_so != -1) { 138 argv[optind] + subs[0].rm_so); 141 argv[optind] + subs[0].rm_so); 144 if (subs[i].rm_so != -1) 146 (int)(subs[i].rm_eo - subs[i].rm_so), 147 argv[optind] + subs[i].rm_so); 279 subs[0].rm_so = strchr(f2, '(') - f2 + 1; 440 /* check rm_so an [all...] |
H A D | t_regex_att.c | 369 if (pm[i].rm_so == -1 && pm[i].rm_eo == -1) 373 (long long)pm[i].rm_so, (long long)pm[i].rm_eo);
|
/freebsd-current/usr.bin/grep/ |
H A D | util.c | 428 ofs = pmatch[0].rm_so; 449 pmatch[idx].rm_so = ofs + (sub - search); 450 pmatch[idx].rm_eo = pmatch[idx].rm_so + pat->len; 453 ofs = pmatch[idx].rm_so + 1; 461 pmatch[n].rm_so = pmatch[n].rm_eo = -1; 518 lastmatch.rm_so = lastmatch.rm_eo = 0; 529 pmatch.rm_so = st; 541 if (xflag && (pmatch.rm_so != 0 || 547 if (pmatch.rm_so != 0 && 548 sscanf(&pc->ln.dat[pmatch.rm_so [all...] |
/freebsd-current/contrib/nvi/common/ |
H A D | search.c | 229 match[0].rm_so = coff; 238 (match[0].rm_so == 0 ? 0 : REG_NOTBOL) | REG_STARTEND); 255 match[0].rm_so, match[0].rm_eo); 258 rm->cno = match[0].rm_so; 363 match[0].rm_so = 0; 383 if (coff != 0 && match[0].rm_so >= coff) 392 match[0].rm_so, match[0].rm_eo); 401 last = match[0].rm_so++; 402 if (match[0].rm_so >= len) 406 (match[0].rm_so [all...] |
/freebsd-current/contrib/nvi/regex/ |
H A D | regex.h | 57 regoff_t rm_so; /* start of match */ member in struct:__anon2
|
H A D | engine.c | 149 start = string + pmatch[0].rm_so; 215 m->pmatch[i].rm_so = m->pmatch[i].rm_eo = -1; 247 assert(m->pmatch[i].rm_so == -1); 266 pmatch[0].rm_so = m->coldp - m->offp; 275 pmatch[i].rm_so = -1; 453 m->pmatch[i].rm_so = sp - m->offp; 587 assert(m->pmatch[i].rm_so != -1); 588 len = m->pmatch[i].rm_eo - m->pmatch[i].rm_so; 592 ssp = m->offp + m->pmatch[i].rm_so; 646 offsave = m->pmatch[i].rm_so; [all...] |
/freebsd-current/contrib/llvm-project/llvm/lib/Support/ |
H A D | regex_impl.h | 44 llvm_regoff_t rm_so; /* start of match */ member in struct:__anon2081
|
H A D | Regex.cpp | 102 pm[0].rm_so = 0; 123 if (pm[i].rm_so == -1) { 128 assert(pm[i].rm_eo >= pm[i].rm_so); 129 Matches->push_back(StringRef(String.data()+pm[i].rm_so, 130 pm[i].rm_eo-pm[i].rm_so));
|
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-current/contrib/libarchive/tar/ |
H A D | subst.c | 261 realloc_strncat(result, name, matches[0].rm_so); 267 name + matches[0].rm_so, 268 matches[0].rm_eo - matches[0].rm_so); 299 realloc_strncat(result, name + matches[c - '0'].rm_so, matches[c - '0'].rm_eo - matches[c - '0'].rm_so);
|
/freebsd-current/usr.bin/sort/ |
H A D | sort.c | 638 if (pmatch[0].rm_eo <= pmatch[0].rm_so) 641 if (pmatch[1].rm_eo <= pmatch[1].rm_so) 644 len = pmatch[1].rm_eo - pmatch[1].rm_so; 647 strncpy(f, s + pmatch[1].rm_so, len); 670 if (pmatch[2].rm_eo > pmatch[2].rm_so) { 671 len = pmatch[2].rm_eo - pmatch[2].rm_so - 1; 674 strncpy(c, s + pmatch[2].rm_so + 1, len); 699 if (pmatch[3].rm_eo > pmatch[3].rm_so) { 702 for (i = pmatch[3].rm_so; i < pmatch[3].rm_eo; i++) { 794 if (pmatch[0].rm_eo <= pmatch[0].rm_so) [all...] |
/freebsd-current/contrib/kyua/utils/text/ |
H A D | regex.cpp | 159 if (_pimpl->_matches[i].rm_so != -1) 185 return std::string(_pimpl->_string.c_str() + match->rm_so, 186 match->rm_eo - match->rm_so);
|
/freebsd-current/usr.bin/m4/ |
H A D | gnum4.c | 286 else if (pm[n].rm_so != -1 && 288 addchars(string + pm[n].rm_so, 289 pm[n].rm_eo - pm[n].rm_so); 349 if (pm[0].rm_so == pm[0].rm_eo && 350 string + pm[0].rm_so == last_match) { 360 last_match = string + pm[0].rm_so; 361 addchars(string, pm[0].rm_so); 396 pbunsigned(pm[0].rm_so);
|
/freebsd-current/include/ |
H A D | regex.h | 58 regoff_t rm_so; /* start of match */ member in struct:__anon60
|
/freebsd-current/usr.bin/sed/ |
H A D | process.c | 409 if (n <= 1 && (match[0].rm_so > le)) 410 cspace(&SS, s, match[0].rm_so - le, APPEND); 413 if (lastempty || (match[0].rm_so - le) || 414 match[0].rm_so != match[0].rm_eo) { 438 if (match[0].rm_so == match[0].rm_eo) { 675 match[0].rm_so = start; 724 } else if (match[no].rm_so != -1 && match[no].rm_eo != -1) { 725 len = match[no].rm_eo - match[no].rm_so; 727 memmove(dst, string + match[no].rm_so, len);
|
/freebsd-current/contrib/less/ |
H A D | pattern.c | 328 rm[0].rm_so = 0; 337 if (rm[ecount-1].rm_so >= 0) 343 if (rm[i].rm_so < 0) 349 *sp++ = line + rm[i].rm_so;
|
/freebsd-current/bin/ed/ |
H A D | sub.c | 185 i = rm[0].rm_so; 233 j = rm[0].rm_so; 240 j = rm[n].rm_so;
|
/freebsd-current/bin/pax/ |
H A D | pat_rep.c | 876 rpt = inpt + pm[0].rm_so; 908 inpt += pm[0].rm_eo - pm[0].rm_so; 1017 if ((pmpt->rm_so < 0) || (pmpt->rm_eo < 0) || 1018 ((len = pmpt->rm_eo - pmpt->rm_so) <= 0)) 1027 if (l_strncpy(dpt, orig + pmpt->rm_so, len) != len)
|
/freebsd-current/lib/libc/regex/ |
H A D | engine.c | 213 start = string + pmatch[0].rm_so; 330 m->pmatch[i].rm_so = m->pmatch[i].rm_eo = -1; 362 assert(m->pmatch[i].rm_so == -1); 383 pmatch[0].rm_so = m->coldp - m->offp; 392 pmatch[i].rm_so = -1; 579 m->pmatch[i].rm_so = sp - m->offp; 750 assert(m->pmatch[i].rm_so != -1); 751 len = m->pmatch[i].rm_eo - m->pmatch[i].rm_so; 757 ssp = m->offp + m->pmatch[i].rm_so; 808 offsave = m->pmatch[i].rm_so; [all...] |
/freebsd-current/contrib/nvi/ex/ |
H A D | ex_subst.c | 538 * Generally, match[0].rm_so is the offset of the start 542 nextmatch: match[0].rm_so = 0; 584 if (!empty_ok && match[0].rm_so == 0 && match[0].rm_eo == 0) { 602 from.cno = match[0].rm_so + offset; 682 sp->cno = match[0].rm_so; 685 BUILD(sp, s + offset, match[0].rm_so); 1394 subzero: if (match[no].rm_so == -1 || 1397 mlen = match[no].rm_eo - match[no].rm_so; 1398 for (t = ip + match[no].rm_so; mlen--; ++t)
|
/freebsd-current/usr.bin/killall/ |
H A D | killall.c | 362 pmatch.rm_so = 0; 388 pmatch.rm_so = 0;
|
/freebsd-current/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) 545 if (rm[1].rm_so >= 0) { 547 v = make_str(a->u.s + rm[1].rm_so);
|
/freebsd-current/libexec/getty/ |
H A D | subr.c | 492 totalsize = match[subex].rm_eo - match[subex].rm_so + 1; 493 strlcpy(editedhost, HN + match[subex].rm_so, totalsize >
|