Home
last modified time | relevance | path

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

12

/freebsd-13.1/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-13.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-13.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()
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-13.1/usr.bin/grep/
H A Dutil.c431 ofs = pmatch[0].rm_so; in litexec()
456 ofs = pmatch[idx].rm_so + 1; in litexec()
532 pmatch.rm_so = st; in procline()
544 if (xflag && (pmatch.rm_so != 0 || in procline()
550 if (pmatch.rm_so != 0 && in procline()
573 retry = pmatch.rm_so + 1; in procline()
591 if (pmatch.rm_so < chkmatch.rm_so || in procline()
592 (pmatch.rm_so == chkmatch.rm_so && in procline()
764 if (match.rm_so == match.rm_eo) in printline()
771 pc->ln.boff = match.rm_so; in printline()
[all …]
/freebsd-13.1/contrib/nvi/common/
H A Dsearch.c224 match[0].rm_so = coff; in f_search()
233 (match[0].rm_so == 0 ? 0 : REG_NOTBOL) | REG_STARTEND); in f_search()
250 match[0].rm_so, match[0].rm_eo); in f_search()
253 rm->cno = match[0].rm_so; in f_search()
358 match[0].rm_so = 0; in b_search()
378 if (coff != 0 && match[0].rm_so >= coff) in b_search()
387 match[0].rm_so, match[0].rm_eo); in b_search()
396 last = match[0].rm_so++; in b_search()
397 if (match[0].rm_so >= len) in b_search()
401 (match[0].rm_so == 0 ? 0 : REG_NOTBOL) | in b_search()
[all …]
/freebsd-13.1/usr.bin/sort/
H A Dsort.c646 if (pmatch[0].rm_eo <= pmatch[0].rm_so) in parse_pos()
649 if (pmatch[1].rm_eo <= pmatch[1].rm_so) in parse_pos()
652 len = pmatch[1].rm_eo - pmatch[1].rm_so; in parse_pos()
655 strncpy(f, s + pmatch[1].rm_so, len); in parse_pos()
678 if (pmatch[2].rm_eo > pmatch[2].rm_so) { in parse_pos()
707 if (pmatch[3].rm_eo > pmatch[3].rm_so) { in parse_pos()
802 if (pmatch[0].rm_eo <= pmatch[0].rm_so) in parse_pos_obs()
805 if (pmatch[1].rm_eo <= pmatch[1].rm_so) in parse_pos_obs()
808 len = pmatch[1].rm_eo - pmatch[1].rm_so; in parse_pos_obs()
811 strncpy(f, s + pmatch[1].rm_so, len); in parse_pos_obs()
[all …]
/freebsd-13.1/contrib/llvm-project/llvm/lib/Support/
H A DRegex.cpp101 pm[0].rm_so = 0; in match()
122 if (pm[i].rm_so == -1) { in match()
127 assert(pm[i].rm_eo >= pm[i].rm_so); in match()
128 Matches->push_back(StringRef(String.data()+pm[i].rm_so, in match()
129 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.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 …]
/freebsd-13.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-13.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-13.1/contrib/apr-util/dbd/unsupported/
H A Dapr_dbd_freetds.c203 return apr_pstrndup(pool, val+match[0].rm_so, in dbd_untaint()
204 match[0].rm_eo - match[0].rm_so); in dbd_untaint()
412 int len = matches[1].rm_eo - matches[1].rm_so - 2; in recurse_args()
420 memmove(stmt->fmt + offs + matches[1].rm_so, in recurse_args()
425 if (matches[1].rm_so == -1) { in recurse_args()
429 strncpy(arg, query+matches[1].rm_so+1, in recurse_args()
430 matches[1].rm_eo - matches[1].rm_so - 2); in recurse_args()
431 arg[matches[1].rm_eo - matches[1].rm_so - 2] = '\0'; in recurse_args()
443 for (i=matches[2].rm_so; i<matches[2].rm_eo; ++i) { in recurse_args()
/freebsd-13.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-13.1/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-13.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-13.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-13.1/lib/libc/regex/
H A Dengine.c218 start = string + pmatch[0].rm_so; in matcher()
335 m->pmatch[i].rm_so = m->pmatch[i].rm_eo = -1; in matcher()
367 assert(m->pmatch[i].rm_so == -1); in matcher()
388 pmatch[0].rm_so = m->coldp - m->offp; in matcher()
397 pmatch[i].rm_so = -1; in matcher()
584 m->pmatch[i].rm_so = sp - m->offp; in dissect()
755 assert(m->pmatch[i].rm_so != -1); in backref()
762 ssp = m->offp + m->pmatch[i].rm_so; in backref()
813 offsave = m->pmatch[i].rm_so; in backref()
814 m->pmatch[i].rm_so = sp - m->offp; in backref()
[all …]
/freebsd-13.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-13.1/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()
680 sp->cno = match[0].rm_so; in s()
683 BUILD(sp, s + offset, match[0].rm_so); in s()
1391 subzero: if (match[no].rm_so == -1 || in re_sub()
1394 mlen = match[no].rm_eo - match[no].rm_so; in re_sub()
1395 for (t = ip + match[no].rm_so; mlen--; ++t) in re_sub()
/freebsd-13.1/include/
H A Dregex.h61 regoff_t rm_so; /* start of match */ member
/freebsd-13.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-13.1/contrib/less/
H A Dpattern.c356 rm.rm_so = 0;
363 *sp = line + rm.rm_so;
/freebsd-13.1/usr.bin/killall/
H A Dkillall.c364 pmatch.rm_so = 0; in main()
390 pmatch.rm_so = 0; in main()

12