Home
last modified time | relevance | path

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

1234

/netbsd-src/external/bsd/flex/dist/src/
H A Dregex.c82 if (m == NULL || m->rm_so < 0 || m->rm_eo < m->rm_so) in regmatch_dup()
84 len = (size_t) (m->rm_eo - m->rm_so); in regmatch_dup()
88 strncpy (str, src + m->rm_so, len); in regmatch_dup()
101 if (m == NULL || m->rm_so < 0) { in regmatch_cpy()
107 snprintf (dest, (size_t) regmatch_len(m), "%s", src + m->rm_so); in regmatch_cpy()
117 if (m == NULL || m->rm_so < 0) { in regmatch_len()
121 return m->rm_eo - m->rm_so; in regmatch_len()
142 if (m == NULL || m->rm_so < 0) in regmatch_strtol()
165 return (m == NULL || m->rm_so < 0 || m->rm_so == m->rm_eo); in regmatch_empty()
/netbsd-src/external/bsd/tre/dist/lib/
H A Dregexec.c58 pmatch[i].rm_so = match_eo; in tre_fill_pmatch()
60 pmatch[i].rm_so = tags[submatch_data[i].so_tag]; in tre_fill_pmatch()
69 if (pmatch[i].rm_so == -1 || pmatch[i].rm_eo == -1) in tre_fill_pmatch()
70 pmatch[i].rm_so = pmatch[i].rm_eo = -1; in tre_fill_pmatch()
73 submatch_data[i].so_tag, pmatch[i].rm_so, in tre_fill_pmatch()
83 assert(pmatch[i].rm_so == -1); in tre_fill_pmatch()
84 assert(pmatch[i].rm_so <= pmatch[i].rm_eo); in tre_fill_pmatch()
91 if (pmatch[i].rm_so < pmatch[parents[j]].rm_so in tre_fill_pmatch()
93 pmatch[i].rm_so = pmatch[i].rm_eo = -1; in tre_fill_pmatch()
101 pmatch[i].rm_so = -1; in tre_fill_pmatch()
[all …]
/netbsd-src/crypto/external/bsd/netpgp/dist/src/libpaa/
H A Dlibpaa.c107 (int)(matches[1].rm_eo - matches[1].rm_so), in fill_identity()
108 &response[(int)matches[1].rm_so]); in fill_identity()
116 (int)(matches[1].rm_eo - matches[1].rm_so), in fill_identity()
117 &raw_challenge[(int)matches[1].rm_so]); in fill_identity()
119 (int)(matches[2].rm_eo - matches[2].rm_so), in fill_identity()
120 &raw_challenge[(int)matches[2].rm_so]); in fill_identity()
122 (int)(matches[3].rm_eo - matches[3].rm_so), in fill_identity()
123 &raw_challenge[(int)matches[3].rm_so]); in fill_identity()
247 (int)(matches[1].rm_eo - matches[1].rm_so), &in[(int)matches[1].rm_so]); in paa_format_response()
288 bufc = b64decode(&response[(int)matches[1].rm_so], in paa_check_response()
[all …]
/netbsd-src/tests/lib/libc/regex/
H A Dmain.c133 subs[0].rm_so = startoff; in main()
144 len = (int)(subs[0].rm_eo - subs[0].rm_so); in main()
145 if (subs[0].rm_so != -1) { in main()
148 argv[optind] + subs[0].rm_so); in main()
151 argv[optind] + subs[0].rm_so); in main()
154 if (subs[i].rm_so != -1) in main()
156 (int)(subs[i].rm_eo - subs[i].rm_so), in main()
157 argv[optind] + subs[i].rm_so); in main()
293 subs[0].rm_so = strchr(f2, '(') - f2 + 1; in try()
455 if (sub.rm_so > sub.rm_eo || (sub.rm_so == -1 && sub.rm_eo != -1) || in check()
[all …]
/netbsd-src/external/bsd/nvi/dist/common/
H A Dsearch.c238 match[0].rm_so = coff; in f_search()
247 (match[0].rm_so == 0 ? 0 : REG_NOTBOL) | REG_STARTEND); in f_search()
264 match[0].rm_so, match[0].rm_eo); in f_search()
267 rm->cno = match[0].rm_so; in f_search()
375 match[0].rm_so = 0; in b_search()
396 if (coff != 0 && (size_t)match[0].rm_so >= coff) in b_search()
405 match[0].rm_so, match[0].rm_eo); in b_search()
414 last = match[0].rm_so++; in b_search()
415 if ((size_t)match[0].rm_so >= len) in b_search()
419 (match[0].rm_so == 0 ? 0 : REG_NOTBOL) | in b_search()
[all …]
/netbsd-src/external/bsd/tmux/dist/
H A Dregsub.c48 if (i < n && m[i].rm_so != m[i].rm_eo) { in regsub_expand()
49 regsub_copy(buf, len, text, m[i].rm_so, in regsub_expand()
88 regsub_copy(&buf, &len, text, last, m[0].rm_so + start); in regsub()
96 start + m[0].rm_so != last || in regsub()
97 m[0].rm_so != m[0].rm_eo) { in regsub()
/netbsd-src/usr.bin/grep/
H A Dutil.c297 pmatch.rm_so = st; in procline()
322 (pmatch.rm_so != 0 || in procline()
326 if (fg_pattern[i].word && pmatch.rm_so != 0) { in procline()
330 if (pmatch.rm_so != 0 && in procline()
331 sscanf(&l->dat[pmatch.rm_so - 1], in procline()
357 if (st == (size_t)pmatch.rm_so) in procline()
476 fwrite(line->dat + a, matches[i].rm_so - a, 1, in printline()
481 fwrite(line->dat + matches[i].rm_so, in printline()
482 matches[i].rm_eo - matches[i].rm_so, 1, in printline()
H A Dfastgrep.c224 if (pmatch->rm_so == (ssize_t)len) in grep_search()
227 if (fg->bol && pmatch->rm_so != 0) { in grep_search()
228 pmatch->rm_so = len; in grep_search()
247 pmatch->rm_so = j; in grep_search()
258 pmatch->rm_so = j - fg->len; in grep_search()
270 j = pmatch->rm_so; in grep_search()
273 pmatch->rm_so = j; in grep_search()
/netbsd-src/usr.bin/sed/
H A Dprocess.c413 if (lastempty || match[0].rm_so != match[0].rm_eo) { in substitute()
415 re_off = match[0].rm_so; in substitute()
423 if (match[0].rm_so != match[0].rm_eo) { in substitute()
428 if (match[0].rm_so < slen) in substitute()
429 cspace(&SS, s + match[0].rm_so, 1, in substitute()
431 s += match[0].rm_so + 1; in substitute()
432 slen -= match[0].rm_so + 1; in substitute()
442 if (match[0].rm_eo == match[0].rm_so) in substitute()
443 match[0].rm_eo = match[0].rm_so + 1; in substitute()
454 re_off = match[0].rm_so in substitute()
[all...]
/netbsd-src/crypto/external/bsd/netpgp/dist/src/hkpd/
H A Dhkpd.c269 (int)(fmtmatch[1].rm_eo - fmtmatch[1].rm_so), in hkpd()
270 &buf[(int)fmtmatch[1].rm_so]); in hkpd()
283 n = frompercent(&buf[searchmatches[1].rm_so], in hkpd()
284 (int)(searchmatches[1].rm_eo - searchmatches[1].rm_so), in hkpd()
289 if (strncmp(&buf[opmatches[1].rm_so], "vindex", 6) == 0) { in hkpd()
303 } else if (strncmp(&buf[opmatches[1].rm_so], "index", 5) == 0) { in hkpd()
316 } else if (strncmp(&buf[opmatches[1].rm_so], "get", 3) == 0) { in hkpd()
/netbsd-src/crypto/external/bsd/netpgp/dist/src/libmj/
H A Dmj.c158 *tok = (matches[2].rm_so >= 0) ? MJ_NUMBER : in gettok()
159 (matches[5].rm_so >= 0) ? MJ_STRING : in gettok()
160 (matches[7].rm_so >= 0) ? MJ_NULL : in gettok()
161 (matches[8].rm_so >= 0) ? MJ_FALSE : in gettok()
162 (matches[9].rm_so >= 0) ? MJ_TRUE : in gettok()
163 (matches[10].rm_so < 0) ? -1 : in gettok()
164 (s[*from + (int)(matches[10].rm_so)] == '[') ? MJ_OPEN_BRACKET : in gettok()
165 (s[*from + (int)(matches[10].rm_so)] == ']') ? MJ_CLOSE_BRACKET : in gettok()
166 (s[*from + (int)(matches[10].rm_so)] == '{') ? MJ_OPEN_BRACE : in gettok()
167 (s[*from + (int)(matches[10].rm_so)] == '}') ? MJ_CLOSE_BRACE : in gettok()
[all …]
/netbsd-src/external/apache2/llvm/dist/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()
/netbsd-src/bin/expr/
H A Dexpr.y121 if (regexec(&rp, $1, 2, rm, 0) == 0 && rm[0].rm_so == 0) {
123 if (rm[1].rm_so >= 0) {
125 (int) (rm[1].rm_eo - rm[1].rm_so),
126 $1 + rm[1].rm_so);
129 (int)(rm[0].rm_eo - rm[0].rm_so));
/netbsd-src/tests/fs/cd9660/
H A Dh_hexdump_r.c67 noff = (off_t)strtoimax(line + m[1].rm_so, NULL, 16); in main()
70 line + m[2 + i].rm_so, NULL, 16); in main()
73 noff = (off_t)strtoimax(line + m[1].rm_so, NULL, 16); in main()
/netbsd-src/external/bsd/tre/dist/src/
H A Dagrep.c288 record_len = pmatch[0].rm_so; in tre_agrep_get_next_record()
291 next_delim_len = pmatch[0].rm_eo - pmatch[0].rm_so; in tre_agrep_get_next_record()
481 invert_match ? 0 : (int)pmatch[0].rm_so, in tre_agrep_handle_file()
494 pmatch[0].rm_so += delim_len; in tre_agrep_handle_file()
500 printf("%.*s", (int)pmatch[0].rm_so, record); in tre_agrep_handle_file()
502 printf("%.*s", (int)(pmatch[0].rm_eo - pmatch[0].rm_so), in tre_agrep_handle_file()
503 record + pmatch[0].rm_so); in tre_agrep_handle_file()
/netbsd-src/external/gpl3/gcc.old/dist/fixincludes/
H A Dfixfixes.c135 fwrite (text, rm[0].rm_so, 1, stdout); in emit_gnu_type()
138 const char* ps = text + rm[1].rm_so; in emit_gnu_type()
219 if (pRM->rm_so < 0) in format_write()
222 len = pRM->rm_eo - pRM->rm_so; in format_write()
224 fwrite(text + pRM->rm_so, len, 1, stdout); in format_write()
284 fwrite( text, rm[0].rm_so, 1, stdout ); in FIX_PROC_HEAD()
546 p = base + match[0].rm_so; in FIX_PROC_HEAD()
/netbsd-src/usr.bin/m4/
H A Dgnum4.c277 else if (pm[n].rm_so != -1 && in add_sub()
279 addchars(string + pm[n].rm_so, in add_sub()
280 pm[n].rm_eo - pm[n].rm_so); in add_sub()
340 if (pm[0].rm_so == pm[0].rm_eo && in do_subst()
341 string + pm[0].rm_so == last_match) { in do_subst()
351 last_match = string + pm[0].rm_so; in do_subst()
352 addchars(string, pm[0].rm_so); in do_subst()
389 pbunsigned(pm[0].rm_so); in do_regexpindex()
/netbsd-src/external/gpl3/gcc/dist/fixincludes/
H A Dfixfixes.c135 fwrite (text, rm[0].rm_so, 1, stdout); in emit_gnu_type()
138 const char* ps = text + rm[1].rm_so; in emit_gnu_type()
219 if (pRM->rm_so < 0) in format_write()
222 len = pRM->rm_eo - pRM->rm_so; in format_write()
224 fwrite(text + pRM->rm_so, len, 1, stdout); in format_write()
284 fwrite( text, rm[0].rm_so, 1, stdout ); in FIX_PROC_HEAD()
579 p = base + match[0].rm_so; in FIX_PROC_HEAD()
/netbsd-src/share/examples/refuse/dmesgfs/
H A Ddmesgfs.c280 add_dev(&buf[matchv[1].rm_so], in build_tree()
281 matchv[1].rm_eo - matchv[1].rm_so, in build_tree()
282 &buf[matchv[2].rm_so], in build_tree()
283 matchv[2].rm_eo - matchv[2].rm_so, in build_tree()
285 matchv[0].rm_eo - matchv[0].rm_so); in build_tree()
/netbsd-src/external/bsd/tre/dist/tests/
H A Dretest.c248 int rm_so, rm_eo; in check() local
249 rm_so = va_arg(ap, int); in check()
250 if (rm_so == END) in check()
254 if (rm_so >= 0) in check()
256 int n = rm_so; in check()
258 if ((rm_so = woffs[rm_so]) < 0 || in check()
267 if (pmatch[i].rm_so != rm_so in check()
281 i, rm_so, rm_eo, rm_eo - rm_so, str + rm_so, in check()
282 (int)pmatch[i].rm_so, (int)pmatch[i].rm_eo, in check()
283 (int)(pmatch[i].rm_eo - pmatch[i].rm_so), in check()
[all …]
/netbsd-src/lib/libc/regex/
H A Dregsub.c135 } else if (rm[i].rm_so != -1 && rm[i].rm_eo != -1) { in regsub1()
136 size_t l = (size_t)(rm[i].rm_eo - rm[i].rm_so); in regsub1()
137 addnstr(&s, str + (size_t)rm[i].rm_so, l); in regsub1()
H A Dengine.c233 start = string + (size_t)pmatch[0].rm_so; in matcher()
346 m->pmatch[i].rm_so = m->pmatch[i].rm_eo = -1; in matcher()
377 assert(m->pmatch[i].rm_so == (regoff_t)-1); in matcher()
399 pmatch[0].rm_so = m->coldp - m->offp; in matcher()
408 pmatch[i].rm_so = (regoff_t)-1; in matcher()
607 m->pmatch[i].rm_so = sp - m->offp; in dissect()
786 assert(m->pmatch[i].rm_so != -1); in backref()
787 len = (size_t)(m->pmatch[i].rm_eo - m->pmatch[i].rm_so); in backref()
793 ssp = m->offp + (size_t)m->pmatch[i].rm_so; in backref()
844 offsave = m->pmatch[i].rm_so; in backref()
[all …]
/netbsd-src/external/gpl3/gcc.old/dist/gcc/
H A Dregsub.c133 } else if (rm[i].rm_so != -1 && rm[i].rm_eo != -1) { in regsub1()
134 size_t l = (size_t)(rm[i].rm_eo - rm[i].rm_so); in regsub1()
135 addnstr(&s, str + rm[i].rm_so, l); in regsub1()
/netbsd-src/crypto/external/bsd/netpgp/dist/src/netpgpkeys/
H A Dnetpgpkeys.c372 (int)(matches[1].rm_eo - matches[1].rm_so), &s[matches[1].rm_so]); in parse_option()
373 if (matches[2].rm_so > 0) { in parse_option()
375 (int)(matches[3].rm_eo - matches[3].rm_so), &s[matches[3].rm_so]); in parse_option()
/netbsd-src/external/bsd/openldap/dist/servers/slapd/
H A Dacl.c262 (int)dn_data[i].rm_so, in slap_access_allowed()
264 if ( dn_data[i].rm_so <= dn_data[0].rm_eo ) { in slap_access_allowed()
266 for ( n = dn_data[i].rm_so; in slap_access_allowed()
280 (int)val_data[i].rm_so, in slap_access_allowed()
282 if ( val_data[i].rm_so <= val_data[0].rm_eo ) { in slap_access_allowed()
284 for ( n = val_data[i].rm_so; in slap_access_allowed()
614 matches->dn_data[0].rm_so = -1; in slap_acl_get()
616 matches->val_data[0].rm_so = -1; in slap_acl_get()
819 tmp_data[0].rm_so = 0; in acl_mask_dn()
827 tmp_data[0].rm_so = 0; in acl_mask_dn()
[all …]

1234