Home
last modified time | relevance | path

Searched refs:pmatch (Results 1 – 25 of 53) sorted by relevance

123

/netbsd-src/external/bsd/tre/dist/lib/
H A Dregexec.c39 tre_fill_pmatch(size_t nmatch, regmatch_t pmatch[], int cflags, in tre_fill_pmatch() argument
58 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()
63 pmatch[i].rm_eo = match_eo; in tre_fill_pmatch()
65 pmatch[i].rm_eo = tags[submatch_data[i].eo_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()
74 submatch_data[i].eo_tag, pmatch[i].rm_eo)); in tre_fill_pmatch()
82 if (pmatch[i].rm_eo == -1) in tre_fill_pmatch()
[all …]
H A Dtre-match-backtrack.c123 if (pmatch) \
124 xfree(pmatch); \
138 if (pmatch) \
139 xfree(pmatch); \
232 regmatch_t *pmatch = NULL; in tre_tnfa_run_backtrack() local
255 pmatch = alloca(sizeof(*pmatch) * tnfa->num_submatches); in tre_tnfa_run_backtrack()
269 pmatch = xmalloc(sizeof(*pmatch) * tnfa->num_submatches); in tre_tnfa_run_backtrack()
270 if (!pmatch) in tre_tnfa_run_backtrack()
412 tre_fill_pmatch(bt + 1, pmatch, tnfa->cflags & ~REG_NOSUB, in tre_tnfa_run_backtrack()
414 /* LINTED */so = pmatch[bt].rm_so; in tre_tnfa_run_backtrack()
[all …]
H A Dtre.h147 regmatch_t pmatch[], int eflags); in __weak_alias()
154 regmatch_t pmatch[], int eflags); in __weak_alias()
174 size_t nmatch, regmatch_t pmatch[], int eflags); in __weak_alias()
184 size_t nmatch, regmatch_t pmatch[], int eflags); in __weak_alias()
192 size_t nmatch, regmatch_t pmatch[], int eflags); in __weak_alias()
200 size_t nmatch, regmatch_t pmatch[], int eflags); in __weak_alias()
221 regmatch_t *pmatch; /* Submatch data. */ in __weak_alias() member
273 size_t nmatch, regmatch_t pmatch[], int eflags); in __weak_alias()
/netbsd-src/usr.bin/grep/
H A Dutil.c290 regmatch_t pmatch; in procline() local
297 pmatch.rm_so = st; in procline()
298 pmatch.rm_eo = l->len; in procline()
309 l->len, &pmatch); in procline()
311 st = pmatch.rm_eo; in procline()
314 &pmatch, eflags); in procline()
316 st = pmatch.rm_eo; in procline()
322 (pmatch.rm_so != 0 || in procline()
323 (size_t)pmatch.rm_eo != l->len)) in procline()
326 if (fg_pattern[i].word && pmatch.rm_so != 0) { in procline()
[all …]
H A Dfastgrep.c219 grep_search(fastgrep_t *fg, const unsigned char *data, size_t len, regmatch_t *pmatch) in grep_search()
224 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()
229 pmatch->rm_eo = len; in grep_search()
247 pmatch->rm_so = j; in grep_search()
248 pmatch->rm_eo = j + fg->len; in grep_search()
258 pmatch->rm_so = j - fg->len; in grep_search()
259 pmatch->rm_eo = j; in grep_search()
270 j = pmatch in grep_search()
205 grep_search(fastgrep_t * fg,const unsigned char * data,size_t len,regmatch_t * pmatch) grep_search() argument
[all...]
/netbsd-src/external/bsd/tre/dist/src/
H A Dagrep.c222 regmatch_t pmatch[1]; in tre_agrep_get_next_record() local
279 1, pmatch, 0); in tre_agrep_get_next_record()
288 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()
292 next_record = next_record + pmatch[0].rm_eo; in tre_agrep_get_next_record()
420 regmatch_t pmatch[1]; in tre_agrep_handle_file() local
427 match.pmatch = pmatch; in tre_agrep_handle_file()
481 invert_match ? 0 : (int)pmatch[0].rm_so, in tre_agrep_handle_file()
482 invert_match ? record_len : (int)pmatch[0].rm_eo); in tre_agrep_handle_file()
494 pmatch[0].rm_so += delim_len; in tre_agrep_handle_file()
[all …]
/netbsd-src/lib/libc/regex/
H A Dengine.c93 regmatch_t *pmatch; /* [nsub+1] (0 element unused) */ member
113 static int matcher(struct re_guts *g, const char *string, size_t nmatch, regmatch_t pmatch[], int e…
203 regmatch_t pmatch[], in matcher() argument
232 _DIAGASSERT(pmatch != NULL); in matcher()
233 start = string + (size_t)pmatch[0].rm_so; in matcher()
234 stop = string + (size_t)pmatch[0].rm_eo; in matcher()
289 m->pmatch = NULL; in matcher()
338 if (m->pmatch == NULL) in matcher()
339 m->pmatch = (regmatch_t *)malloc((m->g->nsub + 1) * in matcher()
341 if (m->pmatch == NULL) { in matcher()
[all …]
H A Dregexec.c229 regmatch_t pmatch[__restrict], in regexec()
249 return(mmatcher(g, string, nmatch, pmatch, eflags)); in regexec()
251 return(smatcher(g, string, nmatch, pmatch, eflags)); in regexec()
253 return(lmatcher(g, string, nmatch, pmatch, eflags)); in regexec()
/netbsd-src/external/ibm-public/postfix/dist/src/util/
H A Ddict_regexp.c121 regmatch_t *pmatch; /* matched substring info */ member
165 regmatch_t *pmatch; in dict_regexp_expand() local
179 pmatch = dict_regexp->pmatch + n; in dict_regexp_expand()
180 if (pmatch->rm_so < 0 || pmatch->rm_so == pmatch->rm_eo) in dict_regexp_expand()
183 ctxt->lookup_string + pmatch->rm_so, in dict_regexp_expand()
184 pmatch->rm_eo - pmatch->rm_so); in dict_regexp_expand()
211 #define DICT_REGEXP_REGEXEC(err, map, line, expr, match, str, nsub, pmatch) \ argument
212 ((err) = regexec((expr), (str), (nsub), (pmatch), 0), \
258 dict_regexp->pmatch)) in dict_regexp_lookup()
364 if (dict_regexp->pmatch) in dict_regexp_close()
[all …]
/netbsd-src/external/bsd/tre/dist/tests/
H A Dtest-str-source.c110 regmatch_t pmatch[5]; in test_reguexec() local
117 if (tre_reguexec(&preg, source, elementsof(pmatch), pmatch, 0) == 0) in test_reguexec()
118 printf("Match: %d - %d\n", (int)pmatch[0].rm_so, (int)pmatch[0].rm_eo); in test_reguexec()
H A Dretest.c138 size_t pmatch_len, regmatch_t *pmatch, int eflags) in wrap_regexec() argument
164 result = tre_regnexec(&reobj, NULL, len, pmatch_len, pmatch, eflags); in wrap_regexec()
166 result = tre_regnexec(&reobj, buf, len, pmatch_len, pmatch, eflags); in wrap_regexec()
172 result = tre_regexec(&reobj, buf, pmatch_len, pmatch, eflags); in wrap_regexec()
194 execute(const CHAR_T *data, int len, size_t pmatch_len, regmatch_t *pmatch, in execute() argument
205 ret = wrap_regexec(data, len, pmatch_len, pmatch, eflags); in execute()
217 return wrap_regexec(data, len, pmatch_len, pmatch, eflags); in execute()
223 size_t pmatch_len, regmatch_t *pmatch, int eflags) in check() argument
267 if (pmatch[i].rm_so != rm_so in check()
268 || pmatch[i].rm_eo != rm_eo) in check()
[all …]
H A Dbench.c107 regmatch_t pmatch[10]; in run_tests() local
115 if ((errcode = tre_regexec(reobj, str, 10, pmatch, 0))) { in run_tests()
131 printf("# pmatch[%d].rm_so = %d\n", i/2, (int)pmatch[i/2].rm_so); in run_tests()
132 printf("# pmatch[%d].rm_eo = %d\n", i/2, (int)pmatch[i/2].rm_eo); in run_tests()
/netbsd-src/external/bsd/tre/dist/include/tre/
H A Dtre.h136 regmatch_t pmatch[], int eflags);
156 size_t nmatch, regmatch_t pmatch[], int eflags);
166 size_t nmatch, regmatch_t pmatch[], int eflags);
174 size_t nmatch, regmatch_t pmatch[], int eflags);
195 regmatch_t *pmatch; /* Submatch data. */ member
242 size_t nmatch, regmatch_t pmatch[], int eflags);
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Support/
H A Dregengine.inc74 llvm_regmatch_t *pmatch; /* [nsub+1] (0 element unused) */
132 llvm_regmatch_t pmatch[],
149 start = string + pmatch[0].rm_so;
150 stop = string + pmatch[0].rm_eo;
171 m->pmatch = NULL;
187 free(m->pmatch);
209 if (m->pmatch == NULL)
210 m->pmatch = (llvm_regmatch_t *)malloc((m->g->nsub + 1) *
212 if (m->pmatch == NULL) {
217 m->pmatch[i].rm_so = m->pmatch[i].rm_eo = -1;
[all …]
H A Dregexec.c142 llvm_regmatch_t pmatch[], int eflags) in llvm_regexec() argument
159 return(smatcher(g, string, nmatch, pmatch, eflags)); in llvm_regexec()
161 return(lmatcher(g, string, nmatch, pmatch, eflags)); in llvm_regexec()
/netbsd-src/external/bsd/openldap/dist/contrib/slapd-modules/variant/
H A Dvariant.c65 regmatch_t *pmatch, in variant_build_dn() argument
81 len += ( pmatch[i].rm_eo - pmatch[i].rm_so ); in variant_build_dn()
102 len = pmatch[i].rm_eo - pmatch[i].rm_so; in variant_build_dn()
104 AC_MEMCPY( dest, ndn->bv_val + pmatch[i].rm_so, len ); in variant_build_dn()
129 regmatch_t *pmatch ) in variant_build_entry() argument
159 rc = variant_build_dn( op, vai, nmatch, pmatch, &ndn ); in variant_build_entry()
250 regmatch_t *pmatch ) in variant_find_config() argument
270 if ( regexec( vei->regex, ndn->bv_val, nmatch, pmatch, 0 ) ) { in variant_find_config()
331 regmatch_t pmatch[10]; in variant_op_compare() local
332 int rc, nmatch = sizeof(pmatch) / sizeof(regmatch_t); in variant_op_compare()
[all …]
/netbsd-src/external/gpl2/xcvs/dist/lib/
H A Dregexec.c44 size_t nmatch, regmatch_t pmatch[],
57 static unsigned re_copy_regs (struct re_registers *regs, regmatch_t *pmatch,
67 static void update_regs (re_dfa_t *dfa, regmatch_t *pmatch,
76 size_t nmatch, regmatch_t *pmatch,
204 size_t nmatch, regmatch_t pmatch[], int eflags) in regexec() argument
217 start = pmatch[0].rm_so; in regexec()
218 length = pmatch[0].rm_eo; in regexec()
232 length, nmatch, pmatch, eflags); in regexec()
248 regmatch_t pmatch[], int eflags) in __compat_regexec() argument
250 return regexec (preg, string, nmatch, pmatch, in __compat_regexec()
[all …]
/netbsd-src/sys/lib/libkern/
H A Dpmatch.c1 /* $NetBSD: pmatch.c,v 1.9 2024/10/09 23:16:03 gutteridge Exp $ */
38 int pmatch(const char *, const char *, const char **);
42 * pmatch():
50 pmatch(const char *string, const char *pattern, const char **estr) in pmatch() function
81 switch (pmatch(string, pattern, estr)) { in pmatch()
H A Dstrlist.c90 extern int pmatch(const char *, const char *, const char **);
194 return pmatch(s1, s2, NULL) == 2; in match_pmatch()
/netbsd-src/usr.bin/m4/
H A Dgnum4.c498 regmatch_t *pmatch; in dopatsubst() local
512 pmatch = xalloc(sizeof(regmatch_t) * (re.re_nsub+1), NULL); in dopatsubst()
514 argc > 4 && argv[4] != NULL ? argv[4] : "", pmatch); in dopatsubst()
515 free(pmatch); in dopatsubst()
526 regmatch_t *pmatch; in doregexp() local
545 pmatch = xalloc(sizeof(regmatch_t) * (re.re_nsub+1), NULL); in doregexp()
547 do_regexpindex(pat, argv[2], &re, pmatch); in doregexp()
549 do_regexp(pat, argv[2], &re, argv[4], pmatch); in doregexp()
550 free(pmatch); in doregexp()
/netbsd-src/external/bsd/nvi/dist/regex/
H A Dregexec.c164 regexec(const regex_t *preg, const RCHAR_T *string, size_t nmatch, regmatch_t *pmatch, int eflags) in regexec() argument
181 return(smatcher(g, (RCHAR_T *)__UNCONST(string), nmatch, pmatch, eflags)); in regexec()
183 return(lmatcher(g, (RCHAR_T *)__UNCONST(string), nmatch, pmatch, eflags)); in regexec()
/netbsd-src/external/bsd/tre/dist/python/
H A Dtre-python.c179 regmatch_t *rm = &self->am.pmatch[i]; in PyTreMatch_groups()
207 rm = &self->am.pmatch[gn]; in PyTreMatch_groupi()
261 if (self->am.pmatch != NULL) in PyTreMatch_dealloc()
262 PyMem_Del(self->am.pmatch); in PyTreMatch_dealloc()
366 mo->am.pmatch = pm; in PyTrePattern_search()
/netbsd-src/external/gpl3/binutils.old/dist/gprofng/src/
H A DPathTree.cc1475 int pmatch, int dpth) in get_clr_metrics() argument
1513 if (pmatch >= 0 && pmatch >= nobj) in get_clr_metrics()
1518 node_list[pmatch - nobj])); in get_clr_metrics()
1520 hi_adj = hist_data->append_hist_item (obj_list[pmatch - nobj]); in get_clr_metrics()
1557 match ? dpth : pmatch, dpth + 1); in get_clr_metrics()
1568 int pmatch, int dpth) in get_cle_metrics() argument
1589 if (pmatch >= 0 && dpth == pmatch + 1) in get_cle_metrics()
1620 pmatch >= 0 && dpth == pmatch + 1 ? dpth : pcle, in get_cle_metrics()
1621 match ? dpth : pmatch, dpth + 1); in get_cle_metrics()
/netbsd-src/external/gpl3/binutils/dist/gprofng/src/
H A DPathTree.cc1475 int pmatch, int dpth) in get_clr_metrics() argument
1513 if (pmatch >= 0 && pmatch >= nobj) in get_clr_metrics()
1518 node_list[pmatch - nobj])); in get_clr_metrics()
1520 hi_adj = hist_data->append_hist_item (obj_list[pmatch - nobj]); in get_clr_metrics()
1557 match ? dpth : pmatch, dpth + 1); in get_clr_metrics()
1568 int pmatch, int dpth) in get_cle_metrics() argument
1589 if (pmatch >= 0 && dpth == pmatch + 1) in get_cle_metrics()
1620 pmatch >= 0 && dpth == pmatch + 1 ? dpth : pcle, in get_cle_metrics()
1621 match ? dpth : pmatch, dpth + 1); in get_cle_metrics()
/netbsd-src/usr.bin/mail/
H A Dlist.c470 regmatch_t pmatch[1]; in regexcmp() local
486 pmatch[0].rm_so = 0; in regexcmp()
487 pmatch[0].rm_eo = line[len - 1] == '\n' ? len - 1 : len; in regexcmp()
488 pmp = pmatch; in regexcmp()

123