Home
last modified time | relevance | path

Searched refs:rm_eo (Results 1 – 25 of 44) sorted by relevance

12

/openbsd/src/usr.bin/tmux/
Dregsub.c48 if (i < n && m[i].rm_so != m[i].rm_eo) { in regsub_expand()
50 m[i].rm_eo); in regsub_expand()
97 m[0].rm_so != m[0].rm_eo) { in regsub()
101 last = start + m[0].rm_eo; in regsub()
102 start += m[0].rm_eo; in regsub()
105 last = start + m[0].rm_eo; in regsub()
106 start += m[0].rm_eo + 1; in regsub()
/openbsd/src/bin/ed/
Dsub.c198 if (rm[0].rm_eo == nempty) { in substitute_matching_text()
200 rm[0].rm_eo = lp->len; in substitute_matching_text()
209 rm[0].rm_eo - (eom - txt)); in substitute_matching_text()
215 eom = txt + rm[0].rm_eo; in substitute_matching_text()
219 if (rm[0].rm_so == rm[0].rm_eo) in substitute_matching_text()
220 rm[0].rm_so = rm[0].rm_eo + 1; in substitute_matching_text()
222 nempty = rm[0].rm_so = rm[0].rm_eo; in substitute_matching_text()
223 rm[0].rm_eo = lp->len; in substitute_matching_text()
250 k = rm[0].rm_eo; in apply_subst_template()
257 k = rm[n].rm_eo; in apply_subst_template()
/openbsd/src/regress/lib/libc/regex/
Dmain.c95 subs[0].rm_eo = strlen(argv[optind]) - endoff; in main()
105 len = (size_t)(subs[0].rm_eo - subs[0].rm_so); in main()
117 (int)(subs[i].rm_eo - subs[i].rm_so), in main()
259 subs[0].rm_eo = strchr(f2, ')') - f2;
429 if (sub.rm_so > sub.rm_eo || (sub.rm_so == -1 && sub.rm_eo != -1) ||
430 (sub.rm_so != -1 && sub.rm_eo == -1) ||
432 (sub.rm_eo != -1 && sub.rm_eo < 0) ) {
435 (long)sub.rm_eo);
446 if (sub.rm_eo > strlen(str)) {
449 (long)sub.rm_so, (long)sub.rm_eo);
[all …]
/openbsd/src/usr.bin/mg/
Dre_search.c159 plen = regex_match[0].rm_eo - regex_match[0].rm_so; in re_queryrepl()
166 plen = regex_match[0].rm_eo - regex_match[0].rm_so; in re_queryrepl()
180 plen = regex_match[0].rm_eo - regex_match[0].rm_so; in re_queryrepl()
224 plen = regex_match[0].rm_eo - regex_match[0].rm_so; in re_repl()
297 k = regex_match[num].rm_eo - regex_match[num].rm_so; in re_doreplace()
362 regex_match[0].rm_eo = llength(clp); in re_forwsrch()
370 curwp->w_doto = regex_match[0].rm_eo; in re_forwsrch()
412 regex_match[0].rm_eo = llength(clp); in re_backsrch()
425 regex_match[0].rm_eo = llength(clp); in re_backsrch()
566 regex_match[0].rm_eo = llength(clp); in killmatches()
[all …]
/openbsd/src/usr.bin/grep/
Dutil.c229 pmatch.rm_eo += offset; in procline()
235 pmatch.rm_eo = l->len; in procline()
239 if (pmatch.rm_so != 0 || pmatch.rm_eo != l->len) in procline()
244 if (oflag && pmatch.rm_so != pmatch.rm_eo) in procline()
281 offset = pmatch.rm_eo; in procline()
512 pmatch->rm_eo = -1; in grep_search()
534 pmatch->rm_eo = j + fg->patternLen; in grep_search()
536 pmatch->rm_so, pmatch->rm_eo)) in grep_search()
547 pmatch->rm_eo = j; in grep_search()
549 pmatch->rm_so, pmatch->rm_eo)) { in grep_search()
[all …]
/openbsd/src/usr.bin/sort/
Dsort.c497 if (pmatch[0].rm_eo <= pmatch[0].rm_so) in parse_pos()
500 if (pmatch[1].rm_eo <= pmatch[1].rm_so) in parse_pos()
503 len = pmatch[1].rm_eo - pmatch[1].rm_so; in parse_pos()
529 if (pmatch[2].rm_eo > pmatch[2].rm_so) { in parse_pos()
530 len = pmatch[2].rm_eo - pmatch[2].rm_so - 1; in parse_pos()
558 if (pmatch[3].rm_eo > pmatch[3].rm_so) { in parse_pos()
561 for (i = pmatch[3].rm_so; i < pmatch[3].rm_eo; i++) { in parse_pos()
650 if (pmatch[0].rm_eo <= pmatch[0].rm_so) in parse_pos_obs()
653 if (pmatch[1].rm_eo <= pmatch[1].rm_so) in parse_pos_obs()
656 len = pmatch[1].rm_eo - pmatch[1].rm_so; in parse_pos_obs()
[all …]
/openbsd/src/gnu/usr.bin/gcc/gcc/fixinc/
Dfixfixes.c146 const char* pe = text + rm[1].rm_eo;
173 return text += rm[0].rm_eo;
233 len = pRM->rm_eo - pRM->rm_so;
297 text += rm[0].rm_eo; in FIX_PROC_HEAD()
349 p += rm[0].rm_eo; in FIX_PROC_HEAD()
434 p += rm[0].rm_eo; in FIX_PROC_HEAD()
521 base += match[0].rm_eo; in FIX_PROC_HEAD()
553 if (match[0].rm_eo > limit - base) in FIX_PROC_HEAD()
557 base += match[0].rm_eo; in FIX_PROC_HEAD()
Dfixtests.c88 base += match[0].rm_eo; in TEST_FOR_FIX_PROC_HEAD()
114 if (match[0].rm_eo <= limit - base) in TEST_FOR_FIX_PROC_HEAD()
/openbsd/src/gnu/gcc/fixincludes/
Dfixfixes.c140 const char* pe = text + rm[1].rm_eo; in emit_gnu_type()
167 return text += rm[0].rm_eo; in emit_gnu_type()
223 len = pRM->rm_eo - pRM->rm_so; in format_write()
287 text += rm[0].rm_eo; in FIX_PROC_HEAD()
339 p += rm[0].rm_eo; in FIX_PROC_HEAD()
424 p += rm[0].rm_eo; in FIX_PROC_HEAD()
512 base += match[0].rm_eo; in FIX_PROC_HEAD()
544 if (match[0].rm_eo > limit - base) in FIX_PROC_HEAD()
548 base += match[0].rm_eo; in FIX_PROC_HEAD()
Dfixtests.c83 base += match[0].rm_eo; in TEST_FOR_FIX_PROC_HEAD()
109 if (match[0].rm_eo <= limit - base) in TEST_FOR_FIX_PROC_HEAD()
/openbsd/src/usr.bin/sed/
Dprocess.c365 match[0].rm_so != match[0].rm_eo) { in substitute()
373 if (match[0].rm_eo - le) in substitute()
374 cspace(&SS, s, match[0].rm_eo - le, in substitute()
381 s = ps + match[0].rm_eo; in substitute()
382 slen = psl - match[0].rm_eo; in substitute()
383 le = match[0].rm_eo; in substitute()
389 if (match[0].rm_so == match[0].rm_eo) { in substitute()
528 match[0].rm_eo = stop; in regexec_e()
573 } else if (match[no].rm_so != -1 && match[no].rm_eo != -1) { in regsub()
574 len = match[no].rm_eo - match[no].rm_so; in regsub()
/openbsd/src/usr.bin/lex/
Dregex.c89 len = m->rm_eo - m->rm_so; in regmatch_dup()
127 return m->rm_eo - m->rm_so; in regmatch_len()
171 return (m == NULL || m->rm_so < 0 || m->rm_so == m->rm_eo); in regmatch_empty()
/openbsd/src/usr.bin/m4/
Dgnum4.c276 pm[n].rm_eo != -1) { in add_sub()
278 pm[n].rm_eo - pm[n].rm_so); in add_sub()
327 if (pm[0].rm_eo != 0) { in do_subst()
328 if (string[pm[0].rm_eo-1] == '\n') in do_subst()
338 if (pm[0].rm_so == pm[0].rm_eo && in do_subst()
352 string += pm[0].rm_eo; in do_subst()
/openbsd/src/gnu/llvm/llvm/lib/Support/
DRegex.cpp102 pm[0].rm_eo = String.size(); in match()
127 assert(pm[i].rm_eo >= pm[i].rm_so); in match()
129 pm[i].rm_eo-pm[i].rm_so)); in match()
Dregex_impl.h45 llvm_regoff_t rm_eo; /* end of match */ member
Dregengine.inc153 stop = string + pmatch[0].rm_eo;
220 m->pmatch[i].rm_so = m->pmatch[i].rm_eo = -1;
253 assert(m->pmatch[i].rm_eo == -1);
273 pmatch[0].rm_eo = endp - m->offp;
282 pmatch[i].rm_eo = -1;
508 m->pmatch[i].rm_eo = sp - m->offp;
628 if (m->pmatch[i].rm_eo == -1)
631 len = m->pmatch[i].rm_eo - m->pmatch[i].rm_so;
702 offsave = m->pmatch[i].rm_eo;
703 m->pmatch[i].rm_eo = sp - m->offp;
[all …]
/openbsd/src/usr.bin/vi/common/
Dsearch.c229 match[0].rm_eo = len; in f_search()
354 match[0].rm_eo = len; in b_search()
358 (match[0].rm_eo == len ? 0 : REG_NOTEOL) | REG_STARTEND); in b_search()
387 match[0].rm_eo = len; in b_search()
/openbsd/src/sys/dev/microcode/aic7xxx/
Daicasm_scan.l542 body_pos -= match.rm_eo - match.rm_so;
576 && (matches[1].rm_eo + search_pos) <= body_pos
577 && (matches[1].rm_eo + search_pos) > *next_match) {
579 *next_match = match->rm_eo + search_pos;
/openbsd/src/usr.bin/vi/ex/
Dex_subst.c535 match[0].rm_eo = llen; in s()
575 if (match[0].rm_so == nempty && match[0].rm_eo == nempty) { in s()
594 to.cno = match[0].rm_eo; in s()
652 BUILD(sp, s + offset, match[0].rm_eo - offset); in s()
686 skip: offset = match[0].rm_eo; in s()
687 len = llen - match[0].rm_eo; in s()
690 nempty = match[0].rm_eo; in s()
1292 match[no].rm_eo == -1) in re_sub()
1294 mlen = match[no].rm_eo - match[no].rm_so; in re_sub()
/openbsd/src/usr.bin/less/
Dpattern.c123 rm.rm_eo = line_len; in match_pattern()
130 *ep = line + rm.rm_eo; in match_pattern()
/openbsd/src/sys/dev/pci/drm/radeon/
Dmkregtable.c248 buf[match[0].rm_eo] = 0; in parser_auth()
249 buf[match[1].rm_eo] = 0; in parser_auth()
250 buf[match[2].rm_eo] = 0; in parser_auth()
/openbsd/src/lib/libc/regex/
Dengine.c152 stop = string + pmatch[0].rm_eo; in matcher()
219 m->pmatch[i].rm_so = m->pmatch[i].rm_eo = -1; in matcher()
252 assert(m->pmatch[i].rm_eo == -1); in matcher()
272 pmatch[0].rm_eo = endp - m->offp; in matcher()
281 pmatch[i].rm_eo = -1; in matcher()
461 m->pmatch[i].rm_eo = sp - m->offp; in dissect()
577 if (m->pmatch[i].rm_eo == -1) in backref()
580 len = m->pmatch[i].rm_eo - m->pmatch[i].rm_so; in backref()
651 offsave = m->pmatch[i].rm_eo; in backref()
652 m->pmatch[i].rm_eo = sp - m->offp; in backref()
[all …]
/openbsd/src/include/
Dregex.h56 regoff_t rm_eo; /* end of match */ member
/openbsd/src/lib/libkeynote/
Dkeynote.y534 gr = calloc(pmatch[i].rm_eo - pmatch[i].rm_so +
545 pmatch[i].rm_eo - pmatch[i].rm_so);
546 gr[pmatch[i].rm_eo - pmatch[i].rm_so] = '\0';
/openbsd/src/bin/pax/
Dpat_rep.c987 inpt += pm[0].rm_eo - pm[0].rm_so; in rep_name()
1094 if ((pmpt->rm_so < 0) || (pmpt->rm_eo < 0) || in resub()
1095 ((len = pmpt->rm_eo - pmpt->rm_so) <= 0)) in resub()

12