Home
last modified time | relevance | path

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

/freebsd/usr.bin/grep/
H A Dutil.c72 size_t nmatch, regmatch_t pmatch[]);
425 regmatch_t pmatch[]) in litexec() argument
437 ofs = pmatch[0].rm_so; in litexec()
438 stringlen = pmatch[0].rm_eo; in litexec()
458 pmatch[idx].rm_so = ofs + (sub - search); in litexec()
459 pmatch[idx].rm_eo = pmatch[idx].rm_so + pat->len; in litexec()
462 ofs = pmatch[idx].rm_so + 1; in litexec()
470 pmatch[n].rm_so = pmatch[n].rm_eo = -1; in litexec()
488 regmatch_t pmatch, lastmatch, chkmatch; in procline() local
538 pmatch.rm_so = st; in procline()
[all …]
/freebsd/usr.bin/sort/
H A Dsort.c621 regmatch_t pmatch[4]; in parse_pos() local
635 if (regexec(&re, s, nmatch, pmatch, 0) != 0) in parse_pos()
638 if (pmatch[0].rm_eo <= pmatch[0].rm_so) in parse_pos()
641 if (pmatch[1].rm_eo <= pmatch[1].rm_so) in parse_pos()
644 len = pmatch[1].rm_eo - pmatch[1].rm_so; in parse_pos()
647 strncpy(f, s + pmatch[1].rm_so, len); in parse_pos()
670 if (pmatch[2].rm_eo > pmatch[2].rm_so) { in parse_pos()
671 len = pmatch[2].rm_eo - pmatch[2].rm_so - 1; in parse_pos()
674 strncpy(c, s + pmatch[2].rm_so + 1, len); in parse_pos()
699 if (pmatch[3].rm_eo > pmatch[3].rm_so) { in parse_pos()
[all …]
/freebsd/contrib/nvi/regex/
H A Dengine.c72 regmatch_t *pmatch; /* [nsub+1] (0 element unused) */ member
91 static int matcher(struct re_guts *g, const RCHAR_T *string, size_t nmatch, regmatch_t pmatch[], in…
133 regmatch_t pmatch[], int eflags) in matcher() argument
149 start = string + pmatch[0].rm_so; in matcher()
150 stop = string + pmatch[0].rm_eo; in matcher()
171 m->pmatch = NULL; in matcher()
207 if (m->pmatch == NULL) in matcher()
208 m->pmatch = (regmatch_t *)malloc((m->g->nsub + 1) * in matcher()
210 if (m->pmatch == NULL) { in matcher()
215 m->pmatch[i].rm_so = m->pmatch[i].rm_eo = -1; in matcher()
[all …]
H A Dregexec.c153 regmatch_t *pmatch, int eflags) in regexec() argument
170 return(smatcher(g, string, nmatch, pmatch, eflags)); in regexec()
172 return(lmatcher(g, string, nmatch, pmatch, eflags)); in regexec()
/freebsd/lib/libc/regex/
H A Dengine.c83 regmatch_t *pmatch; /* [nsub+1] (0 element unused) */ member
103 static int matcher(struct re_guts *g, const char *string, size_t nmatch, regmatch_t pmatch[], int e…
189 regmatch_t pmatch[], in matcher() argument
213 start = string + pmatch[0].rm_so; in matcher()
214 stop = string + pmatch[0].rm_eo; in matcher()
269 m->pmatch = NULL; in matcher()
297 if (m->pmatch != NULL) in matcher()
298 free((char *)m->pmatch); in matcher()
322 if (m->pmatch == NULL) in matcher()
323 m->pmatch = (regmatch_t *)malloc((m->g->nsub + 1) * in matcher()
[all …]
H A Dregexec.c204 regmatch_t pmatch[__restrict], in regexec()
222 return(mmatcher(g, string, nmatch, pmatch, eflags)); in regexec()
224 return(smatcher(g, string, nmatch, pmatch, eflags)); in regexec()
226 return(lmatcher(g, string, nmatch, pmatch, eflags)); in regexec()
/freebsd/usr.sbin/ofwdump/
H A Dofwdump.c211 const char *pmatch, bool raw, bool str) in ofw_dump_node() argument
228 if (pmatch) in ofw_dump_node()
229 ofw_dump_property(fd, n, level, pmatch, raw, str); in ofw_dump_node()
235 ofw_dump_node(fd, c, level + 1, rec, prop, pmatch, in ofw_dump_node()
242 ofw_dump(int fd, const char *start, bool rec, bool prop, const char *pmatch, in ofw_dump() argument
248 ofw_dump_node(fd, n, 0, rec, prop, pmatch, raw, str); in ofw_dump()
/freebsd/usr.bin/killall/
H A Dkillall.c98 regmatch_t pmatch; in main() local
362 pmatch.rm_so = 0; in main()
363 pmatch.rm_eo = strlen(thiscmd); in main()
364 if (regexec(&rgx, thiscmd, 0, &pmatch, in main()
388 pmatch.rm_so = 0; in main()
389 pmatch.rm_eo = strlen(thiscmd); in main()
390 if (regexec(&rgx, thiscmd, 0, &pmatch, in main()
/freebsd/contrib/llvm-project/llvm/lib/Support/
H A Dregengine.inc76 llvm_regmatch_t *pmatch; /* [nsub+1] (0 element unused) */
135 llvm_regmatch_t pmatch[],
152 start = string + pmatch[0].rm_so;
153 stop = string + pmatch[0].rm_eo;
174 m->pmatch = NULL;
190 free(m->pmatch);
212 if (m->pmatch == NULL)
213 m->pmatch = (llvm_regmatch_t *)malloc((m->g->nsub + 1) *
215 if (m->pmatch == NULL) {
220 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()
/freebsd/usr.bin/m4/
H A Dgnum4.c484 regmatch_t *pmatch; in dopatsubst() local
499 pmatch = xreallocarray(NULL, re.re_nsub+1, sizeof(regmatch_t), in dopatsubst()
502 argc > 4 && argv[4] != NULL ? argv[4] : "", pmatch); in dopatsubst()
503 free(pmatch); in dopatsubst()
514 regmatch_t *pmatch; in doregexp() local
533 pmatch = xreallocarray(NULL, re.re_nsub+1, sizeof(regmatch_t), NULL); in doregexp()
535 do_regexpindex(argv[2], &re, source, pmatch); in doregexp()
537 do_regexp(argv[2], &re, source, argv[4], pmatch); in doregexp()
538 free(pmatch); in doregexp()
/freebsd/usr.bin/split/
H A Dsplit.c292 regmatch_t pmatch; in split2() local
294 pmatch.rm_so = 0; in split2()
295 pmatch.rm_eo = len - 1; in split2()
296 if (regexec(&rgx, buf, 0, &pmatch, REG_STARTEND) == 0) in split2()
/freebsd/contrib/ntp/ntpd/
H A Dntp_restrict.c392 const restrict_u * pmatch,
402 cb = sizeof(pmatch->u.v6);
405 cb = sizeof(pmatch->u.v4); in match_restrict_entry()
409 if (res->mflags == pmatch->mflags && in match_restrict_entry()
410 !memcmp(&res->u, &pmatch->u, cb)) { in match_restrict_entry()
404 match_restrict_entry(const restrict_u * pmatch,int v6) match_restrict_entry() argument
/freebsd/usr.sbin/setfmac/
H A Dsetfmac.c395 regmatch_t pmatch; in apply_specs() local
417 pmatch.rm_so = 0; in apply_specs()
418 pmatch.rm_eo = ftsent->fts_pathlen; in apply_specs()
420 &pmatch, REG_STARTEND); in apply_specs()
/freebsd/sys/contrib/openzfs/lib/libzfs/
H A Dlibzfs_crypto.c118 regmatch_t pmatch[2]; in zfs_prop_parse_keylocation() local
120 if (regexec(&hdl->libzfs_urire, str, ARRAY_SIZE(pmatch), in zfs_prop_parse_keylocation()
121 pmatch, 0) == 0) { in zfs_prop_parse_keylocation()
124 if (pmatch[1].rm_so == -1) { in zfs_prop_parse_keylocation()
130 scheme_len = pmatch[1].rm_eo - pmatch[1].rm_so; in zfs_prop_parse_keylocation()
142 (void) memcpy(*schemep, str + pmatch[1].rm_so, scheme_len); in zfs_prop_parse_keylocation()
/freebsd/contrib/file/src/
H A Dfuncs.c738 const char *str, size_t nmatch, regmatch_t* pmatch, int eflags) in file_regexec() argument
751 memset(pmatch, 0, nmatch * sizeof(*pmatch)); in file_regexec()
752 rc = regexec(rx, str, nmatch, pmatch, eflags); in file_regexec()
H A Dsoftmagic.c2306 regmatch_t pmatch; in magiccheck() local
2335 1, &pmatch, 0); in magiccheck()
2339 ms->search.s += CAST(int, pmatch.rm_so); in magiccheck()
2340 ms->search.offset += CAST(size_t, pmatch.rm_so); in magiccheck()
2342 pmatch.rm_eo - pmatch.rm_so); in magiccheck()
/freebsd/usr.bin/find/
H A Dfunction.c1418 regmatch_t pmatch; in f_regex() local
1428 pmatch.rm_so = 0; in f_regex()
1429 pmatch.rm_eo = len; in f_regex()
1431 errcode = regexec(pre, str, 1, &pmatch, REG_STARTEND); in f_regex()
1439 if (errcode == 0 && pmatch.rm_so == 0 && pmatch.rm_eo == len) in f_regex()
/freebsd/contrib/one-true-awk/
H A Dproto.h51 extern int pmatch(fa *, const char *);
H A Drun.c806 mf = pmatch; in matchop()
2545 while (pmatch(pfa, start)) { in dosub()
2684 if (pmatch(pfa, t)) { in gensub()
2764 } while (pmatch(pfa,t)); in gensub()
H A Db.c740 int pmatch(fa *f, const char *p0) /* longest match, for sub */ in pmatch() function
/freebsd/usr.sbin/ppp/
H A Dcommand.c1036 FindCommand(struct cmdtab const *cmds, const char *str, int *pmatch) in FindCommand() argument
1048 *pmatch = 1; in FindCommand()
1055 *pmatch = 1; in FindCommand()
1063 *pmatch = nmatch; in FindCommand()
/freebsd/contrib/sendmail/src/
H A Dmap.c7767 regmatch_t pmatch[MAX_MATCH]; local
7781 name, MAX_MATCH, pmatch, 0);
7836 pmatch[*ip].rm_so < 0 || pmatch[*ip].rm_eo < 0)
7839 sp = name + pmatch[*ip].rm_so;
7840 endp = name + pmatch[*ip].rm_eo;
/freebsd/contrib/llvm-project/compiler-rt/lib/sanitizer_common/
H A Dsanitizer_common_interceptors.inc7926 struct __sanitizer_regmatch *pmatch[], int eflags) {
7928 COMMON_INTERCEPTOR_ENTER(ctx, regexec, preg, string, nmatch, pmatch, eflags);
7933 int res = REAL(regexec)(preg, string, nmatch, pmatch, eflags);
7934 if (!res && pmatch)
7935 COMMON_INTERCEPTOR_WRITE_RANGE(ctx, pmatch, nmatch * struct_regmatch_sz);