Home
last modified time | relevance | path

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

123

/freebsd-12.1/contrib/flex/
H A Dregex.c85 if (m == NULL || m->rm_so < 0) in regmatch_dup()
87 len = m->rm_eo - m->rm_so; in regmatch_dup()
91 strncpy (str, src + m->rm_so, len); in regmatch_dup()
104 if (m == NULL || m->rm_so < 0) { in regmatch_cpy()
110 snprintf (dest, regmatch_len(m), "%s", src + m->rm_so); in regmatch_cpy()
121 if (m == NULL || m->rm_so < 0) { in regmatch_len()
125 return m->rm_eo - m->rm_so; in regmatch_len()
146 if (m == NULL || m->rm_so < 0) in regmatch_strtol()
169 return (m == NULL || m->rm_so < 0 || m->rm_so == m->rm_eo); in regmatch_empty()
/freebsd-12.1/lib/libc/regex/grot/
H A Dmain.c95 subs[0].rm_so = startoff; in main()
107 if (subs[0].rm_so != -1) { in main()
110 argv[optind] + subs[0].rm_so); in main()
113 argv[optind] + subs[0].rm_so); in main()
116 if (subs[i].rm_so != -1) in main()
119 argv[optind] + subs[i].rm_so); in main()
410 if (sub.rm_so > sub.rm_eo || (sub.rm_so == -1 && sub.rm_eo != -1) || in check()
412 (sub.rm_so != -1 && sub.rm_so < 0) || in check()
422 if (sub.rm_so == -1) in check()
432 len = (int)(sub.rm_eo - sub.rm_so); in check()
[all …]
/freebsd-12.1/usr.bin/grep/
H A Dutil.c410 ofs = pmatch[0].rm_so; in litexec()
435 ofs = pmatch[idx].rm_so + 1; in litexec()
499 pmatch.rm_so = st; in procline()
511 if (xflag && (pmatch.rm_so != 0 || in procline()
517 if (pmatch.rm_so != 0 && in procline()
540 retry = pmatch.rm_so + 1; in procline()
558 if (pmatch.rm_so < chkmatch.rm_so || in procline()
559 (pmatch.rm_so == chkmatch.rm_so && in procline()
733 if (match.rm_so == match.rm_eo) in printline()
740 pc->ln.boff = match.rm_so; in printline()
[all …]
/freebsd-12.1/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()
438 if (sub.rm_so > sub.rm_eo || (sub.rm_so == -1 && sub.rm_eo != -1) || in check()
440 (sub.rm_so != -1 && sub.rm_so < 0) || in check()
448 if (sub.rm_so == -1) { in check()
464 len = (int)(sub.rm_eo - sub.rm_so); in check()
[all …]
/freebsd-12.1/contrib/llvm/tools/lldb/source/Utility/
H A DRegularExpression.cpp125 if (m_matches[idx].rm_eo == -1 && m_matches[idx].rm_so == -1) in GetMatchAtIndex()
128 if (m_matches[idx].rm_eo == m_matches[idx].rm_so) { in GetMatchAtIndex()
132 } else if (m_matches[idx].rm_eo > m_matches[idx].rm_so) { in GetMatchAtIndex()
133 match_str = s.substr(m_matches[idx].rm_so, in GetMatchAtIndex()
134 m_matches[idx].rm_eo - m_matches[idx].rm_so); in GetMatchAtIndex()
145 if (m_matches[idx1].rm_so == m_matches[idx2].rm_eo) { in GetMatchSpanningIndices()
149 } else if (m_matches[idx1].rm_so < m_matches[idx2].rm_eo) { in GetMatchSpanningIndices()
150 match_str = s.substr(m_matches[idx1].rm_so, in GetMatchSpanningIndices()
151 m_matches[idx2].rm_eo - m_matches[idx1].rm_so); in GetMatchSpanningIndices()
/freebsd-12.1/contrib/nvi/common/
H A Dsearch.c239 match[0].rm_so = coff; in f_search()
248 (match[0].rm_so == 0 ? 0 : REG_NOTBOL) | REG_STARTEND); in f_search()
265 match[0].rm_so, match[0].rm_eo); in f_search()
268 rm->cno = match[0].rm_so; in f_search()
379 match[0].rm_so = 0; in b_search()
399 if (coff != 0 && match[0].rm_so >= coff) in b_search()
408 match[0].rm_so, match[0].rm_eo); in b_search()
417 last = match[0].rm_so++; in b_search()
418 if (match[0].rm_so >= len) in b_search()
422 (match[0].rm_so == 0 ? 0 : REG_NOTBOL) | in b_search()
[all …]
/freebsd-12.1/usr.bin/sort/
H A Dsort.c644 if (pmatch[0].rm_eo <= pmatch[0].rm_so) in parse_pos()
647 if (pmatch[1].rm_eo <= pmatch[1].rm_so) in parse_pos()
650 len = pmatch[1].rm_eo - pmatch[1].rm_so; in parse_pos()
653 strncpy(f, s + pmatch[1].rm_so, len); in parse_pos()
676 if (pmatch[2].rm_eo > pmatch[2].rm_so) { in parse_pos()
705 if (pmatch[3].rm_eo > pmatch[3].rm_so) { in parse_pos()
800 if (pmatch[0].rm_eo <= pmatch[0].rm_so) in parse_pos_obs()
803 if (pmatch[1].rm_eo <= pmatch[1].rm_so) in parse_pos_obs()
806 len = pmatch[1].rm_eo - pmatch[1].rm_so; in parse_pos_obs()
809 strncpy(f, s + pmatch[1].rm_so, len); in parse_pos_obs()
[all …]
/freebsd-12.1/contrib/llvm/lib/Support/
H A DRegex.cpp82 pm[0].rm_so = 0; in match()
101 if (pm[i].rm_so == -1) { in match()
106 assert(pm[i].rm_eo >= pm[i].rm_so); in match()
107 Matches->push_back(StringRef(String.data()+pm[i].rm_so, in match()
108 pm[i].rm_eo-pm[i].rm_so)); in match()
H A Dregengine.inc149 start = string + pmatch[0].rm_so;
217 m->pmatch[i].rm_so = m->pmatch[i].rm_eo = -1;
249 assert(m->pmatch[i].rm_so == -1);
269 pmatch[0].rm_so = m->coldp - m->offp;
278 pmatch[i].rm_so = -1;
462 m->pmatch[i].rm_so = sp - m->offp;
588 assert(m->pmatch[i].rm_so != -1);
595 ssp = m->offp + m->pmatch[i].rm_so;
649 offsave = m->pmatch[i].rm_so;
650 m->pmatch[i].rm_so = sp - m->offp;
[all …]
H A Dregex_impl.h44 llvm_regoff_t rm_so; /* start of match */ member
/freebsd-12.1/usr.bin/m4/
H A Dgnum4.c288 else if (pm[n].rm_so != -1 && in add_sub()
290 addchars(string + pm[n].rm_so, in add_sub()
291 pm[n].rm_eo - pm[n].rm_so); in add_sub()
351 if (pm[0].rm_so == pm[0].rm_eo && in do_subst()
352 string + pm[0].rm_so == last_match) { in do_subst()
362 last_match = string + pm[0].rm_so; in do_subst()
363 addchars(string, pm[0].rm_so); in do_subst()
398 pbunsigned(pm[0].rm_so); in do_regexpindex()
/freebsd-12.1/contrib/libarchive/tar/
H A Dsubst.c246 realloc_strncat(result, name, matches[0].rm_so); in apply_substitution()
252 name + matches[0].rm_so, in apply_substitution()
253 matches[0].rm_eo - matches[0].rm_so); in apply_substitution()
283 …realloc_strncat(result, name + matches[c - '0'].rm_so, matches[c - '0'].rm_eo - matches[c - '0'].r… in apply_substitution()
/freebsd-12.1/usr.bin/sed/
H A Dprocess.c414 if (n <= 1 && (match[0].rm_so > le)) in substitute()
415 cspace(&SS, s, match[0].rm_so - le, APPEND); in substitute()
418 if (lastempty || (match[0].rm_so - le) || in substitute()
419 match[0].rm_so != match[0].rm_eo) { in substitute()
443 if (match[0].rm_so == match[0].rm_eo) { in substitute()
680 match[0].rm_so = start; in regexec_e()
729 } else if (match[no].rm_so != -1 && match[no].rm_eo != -1) { in regsub()
730 len = match[no].rm_eo - match[no].rm_so; in regsub()
732 memmove(dst, string + match[no].rm_so, len); in regsub()
/freebsd-12.1/contrib/apr-util/dbd/
H A Dapr_dbd_freetds.c201 return apr_pstrndup(pool, val+match[0].rm_so, in dbd_untaint()
202 match[0].rm_eo - match[0].rm_so); in dbd_untaint()
410 int len = matches[1].rm_eo - matches[1].rm_so - 2; in recurse_args()
418 memmove(stmt->fmt + offs + matches[1].rm_so, in recurse_args()
423 if (matches[1].rm_so == -1) { in recurse_args()
427 strncpy(arg, query+matches[1].rm_so+1, in recurse_args()
428 matches[1].rm_eo - matches[1].rm_so - 2); in recurse_args()
429 arg[matches[1].rm_eo - matches[1].rm_so - 2] = '\0'; in recurse_args()
441 for (i=matches[2].rm_so; i<matches[2].rm_eo; ++i) { in recurse_args()
/freebsd-12.1/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()
575 m->pmatch[i].rm_so = sp - m->offp; in dissect()
714 assert(m->pmatch[i].rm_so != -1); in backref()
721 ssp = m->offp + m->pmatch[i].rm_so; in backref()
772 offsave = m->pmatch[i].rm_so; in backref()
773 m->pmatch[i].rm_so = sp - m->offp; in backref()
[all …]
/freebsd-12.1/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-12.1/bin/ed/
H A Dsub.c187 i = rm[0].rm_so; in substitute_matching_text()
235 j = rm[0].rm_so; in apply_subst_template()
242 j = rm[n].rm_so; in apply_subst_template()
/freebsd-12.1/bin/pax/
H A Dpat_rep.c915 rpt = inpt + pm[0].rm_so;
955 inpt += pm[0].rm_eo - pm[0].rm_so;
1114 if ((pmpt->rm_so < 0) || (pmpt->rm_eo < 0) ||
1115 ((len = pmpt->rm_eo - pmpt->rm_so) <= 0))
1124 if (l_strncpy(dpt, orig + pmpt->rm_so, len) != len)
/freebsd-12.1/contrib/nvi/ex/
H A Dex_subst.c547 nextmatch: match[0].rm_so = 0; in s()
589 if (!empty_ok && match[0].rm_so == 0 && match[0].rm_eo == 0) { in s()
607 from.cno = match[0].rm_so + offset; in s()
685 sp->cno = match[0].rm_so; in s()
688 BUILD(sp, s + offset, match[0].rm_so); in s()
1398 subzero: if (match[no].rm_so == -1 || in re_sub()
1401 mlen = match[no].rm_eo - match[no].rm_so; in re_sub()
1402 for (t = ip + match[no].rm_so; mlen--; ++t) in re_sub()
/freebsd-12.1/contrib/libgnuregex/
H A Dregexec.c236 start = pmatch[0].rm_so;
483 assert (pmatch[0].rm_so == start);
487 rval = pmatch[0].rm_so;
553 regs->start[i] = pmatch[i].rm_so;
893 pmatch[0].rm_so = 0;
908 if (pmatch[reg_idx].rm_so != -1)
913 pmatch[reg_idx].rm_so =
930 pmatch[nmatch + reg_idx].rm_so = -1;
938 pmatch[reg_idx + 1].rm_so
1550 pmatch[reg_num].rm_so = cur_idx; in update_regs()
[all …]
/freebsd-12.1/include/
H A Dregex.h61 regoff_t rm_so; /* start of match */ member
/freebsd-12.1/contrib/less/
H A Dpattern.c325 rm.rm_so = 0;
332 *sp = line + rm.rm_so;
/freebsd-12.1/bin/expr/
H A Dexpr.y546 if (regexec(&rp, a->u.s, (size_t)2, rm, 0) == 0 && rm[0].rm_so == 0) in op_colon()
547 if (rm[1].rm_so >= 0) { in op_colon()
549 v = make_str(a->u.s + rm[1].rm_so); in op_colon()
/freebsd-12.1/usr.bin/killall/
H A Dkillall.c364 pmatch.rm_so = 0; in main()
390 pmatch.rm_so = 0; in main()

123