Home
last modified time | relevance | path

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

12

/NextBSD/usr.bin/sort/
HDsort.c631 regmatch_t pmatch[4]; in parse_pos() local
645 if (regexec(&re, s, nmatch, pmatch, 0) != 0) in parse_pos()
648 if (pmatch[0].rm_eo <= pmatch[0].rm_so) in parse_pos()
651 if (pmatch[1].rm_eo <= pmatch[1].rm_so) in parse_pos()
654 len = pmatch[1].rm_eo - pmatch[1].rm_so; in parse_pos()
657 strncpy(f, s + pmatch[1].rm_so, len); in parse_pos()
680 if (pmatch[2].rm_eo > pmatch[2].rm_so) { in parse_pos()
681 len = pmatch[2].rm_eo - pmatch[2].rm_so - 1; in parse_pos()
684 strncpy(c, s + pmatch[2].rm_so + 1, len); in parse_pos()
709 if (pmatch[3].rm_eo > pmatch[3].rm_so) { in parse_pos()
[all …]
/NextBSD/usr.bin/grep/regex/
HDfastmatch.c130 size_t nmatch, regmatch_t pmatch[], int eflags) in tre_fastnexec() argument
136 type, nmatch, pmatch, eflags)); in tre_fastnexec()
139 pmatch, eflags); in tre_fastnexec()
144 regmatch_t pmatch[], int eflags) in tre_fastexec() argument
146 return tre_fastnexec(preg, string, (size_t)-1, nmatch, pmatch, eflags); in tre_fastexec()
151 size_t nmatch, regmatch_t pmatch[], int eflags) in tre_fastwnexec() argument
157 type, nmatch, pmatch, eflags)); in tre_fastwnexec()
160 pmatch, eflags); in tre_fastwnexec()
165 size_t nmatch, regmatch_t pmatch[], int eflags) in tre_fastwexec() argument
167 return tre_fastwnexec(preg, string, (size_t)-1, nmatch, pmatch, eflags); in tre_fastwexec()
HDglue.h46 size_t slen = (size_t)(pmatch[0].rm_eo - pmatch[0].rm_so); \
47 size_t offset = pmatch[0].rm_so; \
50 if ((long long)pmatch[0].rm_eo - pmatch[0].rm_so < 0) \
55 pmatch[i].rm_so += offset; \
56 pmatch[i].rm_eo += offset; \
HDfastmatch.h45 regmatch_t pmatch[], int eflags);
58 size_t nmatch, regmatch_t pmatch[], int eflags);
70 size_t nmatch, regmatch_t pmatch[], int eflags);
80 size_t nmatch, regmatch_t pmatch[], int eflags);
HDtre-fastmatch.c843 tre_str_type_t type, int nmatch, regmatch_t pmatch[], int eflags) in tre_match_fast() argument
870 pmatch[0].rm_so = 0; in tre_match_fast()
871 pmatch[0].rm_eo = len; in tre_match_fast()
929 pmatch[0].rm_so = j; in tre_match_fast()
930 pmatch[0].rm_eo = j + (type == STR_WIDE ? fg->wlen : fg->len); in tre_match_fast()
953 pmatch[0].rm_so = j; in tre_match_fast()
954 pmatch[0].rm_eo = j + ((type == STR_WIDE) ? fg->wlen : fg->len); in tre_match_fast()
HDtre-fastmatch.h18 tre_str_type_t type, int nmatch, regmatch_t pmatch[], int eflags);
/NextBSD/usr.bin/grep/
HDutil.c274 regmatch_t pmatch; in procline() local
281 pmatch.rm_so = st; in procline()
282 pmatch.rm_eo = l->len; in procline()
288 l->dat, 1, &pmatch, eflags); in procline()
291 &pmatch, eflags); in procline()
295 : (size_t)pmatch.rm_eo; in procline()
300 if (pmatch.rm_so != 0 || in procline()
301 (size_t)pmatch.rm_eo != l->len) in procline()
308 if (pmatch.rm_so != 0 && in procline()
309 sscanf(&l->dat[pmatch.rm_so - 1], in procline()
[all …]
/NextBSD/contrib/nvi/regex/
HDengine.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 …]
HDregexec.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()
/NextBSD/lib/libc/regex/
HDengine.c84 regmatch_t *pmatch; /* [nsub+1] (0 element unused) */ member
104 static int matcher(struct re_guts *g, const char *string, size_t nmatch, regmatch_t pmatch[], int e…
153 regmatch_t pmatch[], in matcher() argument
177 start = string + pmatch[0].rm_so; in matcher()
178 stop = string + pmatch[0].rm_eo; in matcher()
233 m->pmatch = NULL; in matcher()
256 if (m->pmatch != NULL) in matcher()
257 free((char *)m->pmatch); in matcher()
281 if (m->pmatch == NULL) in matcher()
282 m->pmatch = (regmatch_t *)malloc((m->g->nsub + 1) * in matcher()
[all …]
HDregexec.c210 regmatch_t pmatch[__restrict], in regexec()
228 return(mmatcher(g, (char *)string, nmatch, pmatch, eflags)); in regexec()
230 return(smatcher(g, (char *)string, nmatch, pmatch, eflags)); in regexec()
232 return(lmatcher(g, (char *)string, nmatch, pmatch, eflags)); in regexec()
/NextBSD/usr.sbin/ofwdump/
HDofwdump.c212 const char *pmatch, int raw, int str) in ofw_dump_node() argument
229 if (pmatch) in ofw_dump_node()
230 ofw_dump_property(fd, n, level, pmatch, raw, str); in ofw_dump_node()
236 ofw_dump_node(fd, c, level + 1, rec, prop, pmatch, in ofw_dump_node()
243 ofw_dump(int fd, const char *start, int rec, int prop, const char *pmatch, in ofw_dump() argument
249 ofw_dump_node(fd, n, 0, rec, prop, pmatch, raw, str); in ofw_dump()
/NextBSD/contrib/llvm/lib/Support/
HDregengine.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 …]
HDregexec.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()
/NextBSD/contrib/libgnuregex/
HDregexec.c41 size_t nmatch, regmatch_t pmatch[],
52 static unsigned re_copy_regs (struct re_registers *regs, regmatch_t *pmatch,
61 static void update_regs (const re_dfa_t *dfa, regmatch_t *pmatch,
71 size_t nmatch, regmatch_t *pmatch,
220 regexec (preg, string, nmatch, pmatch, eflags) in regexec() argument
224 regmatch_t pmatch[];
236 start = pmatch[0].rm_so;
237 length = pmatch[0].rm_eo;
251 length, nmatch, pmatch, eflags);
267 regmatch_t pmatch[], int eflags) in __compat_regexec() argument
[all …]
/NextBSD/usr.bin/killall/
HDkillall.c99 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()
/NextBSD/usr.bin/m4/
HDgnum4.c465 regmatch_t *pmatch; in dopatsubst() local
480 pmatch = xreallocarray(NULL, re.re_nsub+1, sizeof(regmatch_t), in dopatsubst()
483 argc > 4 && argv[4] != NULL ? argv[4] : "", pmatch); in dopatsubst()
484 free(pmatch); in dopatsubst()
495 regmatch_t *pmatch; in doregexp() local
514 pmatch = xreallocarray(NULL, re.re_nsub+1, sizeof(regmatch_t), NULL); in doregexp()
516 do_regexpindex(argv[2], &re, source, pmatch); in doregexp()
518 do_regexp(argv[2], &re, source, argv[4], pmatch); in doregexp()
519 free(pmatch); in doregexp()
/NextBSD/usr.bin/split/
HDsplit.c282 regmatch_t pmatch; in split2() local
284 pmatch.rm_so = 0; in split2()
285 pmatch.rm_eo = len - 1; in split2()
286 if (regexec(&rgx, bfr, 0, &pmatch, REG_STARTEND) == 0) in split2()
/NextBSD/contrib/ntp/ntpd/
HDntp_restrict.c319 const restrict_u * pmatch, in match_restrict_entry() argument
329 cb = sizeof(pmatch->u.v6); in match_restrict_entry()
332 cb = sizeof(pmatch->u.v4); in match_restrict_entry()
336 if (res->mflags == pmatch->mflags && in match_restrict_entry()
337 !memcmp(&res->u, &pmatch->u, cb)) in match_restrict_entry()
/NextBSD/usr.sbin/setfmac/
HDsetfmac.c393 regmatch_t pmatch; in apply_specs() local
415 pmatch.rm_so = 0; in apply_specs()
416 pmatch.rm_eo = ftsent->fts_pathlen; in apply_specs()
418 &pmatch, REG_STARTEND); in apply_specs()
/NextBSD/usr.bin/find/
HDfunction.c1394 regmatch_t pmatch; in f_regex() local
1404 pmatch.rm_so = 0; in f_regex()
1405 pmatch.rm_eo = len; in f_regex()
1407 errcode = regexec(pre, str, 1, &pmatch, REG_STARTEND); in f_regex()
1415 if (errcode == 0 && pmatch.rm_so == 0 && pmatch.rm_eo == len) in f_regex()
/NextBSD/contrib/file/src/
HDsoftmagic.c1972 regmatch_t pmatch[1]; in magiccheck() local
1994 pmatch[0].rm_so = 0; in magiccheck()
1995 pmatch[0].rm_eo = slen; in magiccheck()
1998 1, pmatch, REG_STARTEND); in magiccheck()
2004 ms->search.s += (int)pmatch[0].rm_so; in magiccheck()
2005 ms->search.offset += (size_t)pmatch[0].rm_so; in magiccheck()
2007 (size_t)(pmatch[0].rm_eo - pmatch[0].rm_so); in magiccheck()
HDfuncs.c496 regmatch_t* pmatch, int eflags) in file_regexec() argument
499 return regexec(&rx->rx, str, nmatch, pmatch, eflags); in file_regexec()
/NextBSD/contrib/one-true-awk/
HDproto.h55 extern int pmatch(fa *, const char *);
HDrun.c584 mf = pmatch; in matchop()
1799 if (pmatch(pfa, t)) { in sub()
1861 if (pmatch(pfa, t)) { in gsub()
1918 } while (pmatch(pfa,t)); in gsub()

12