Home
last modified time | relevance | path

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

/openbsd/src/usr.bin/grep/
Dutil.c52 static int grep_search(fastgrep_t *, char *, size_t, regmatch_t *pmatch, int);
199 regmatch_t pmatch = { 0 }; in procline() local
227 l->len - offset, &pmatch, flags); in procline()
228 pmatch.rm_so += offset; in procline()
229 pmatch.rm_eo += offset; in procline()
234 pmatch.rm_so = offset; in procline()
235 pmatch.rm_eo = l->len; in procline()
236 r = regexec(&r_pattern[i], l->dat, 1, &pmatch, flags); 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()
[all …]
Dgrep.h94 void printline(str_t *line, int sep, regmatch_t *pmatch);
/openbsd/src/usr.bin/sort/
Dsort.c480 regmatch_t pmatch[4]; in parse_pos() local
494 if (regexec(&re, s, nmatch, pmatch, 0) != 0) in parse_pos()
497 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()
506 memcpy(f, s + pmatch[1].rm_so, len); 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()
533 memcpy(c, s + pmatch[2].rm_so + 1, len); in parse_pos()
558 if (pmatch[3].rm_eo > pmatch[3].rm_so) { in parse_pos()
[all …]
/openbsd/src/lib/libc/regex/
Dengine.c74 regmatch_t *pmatch; /* [nsub+1] (0 element unused) */ member
135 regmatch_t pmatch[], int eflags) in matcher() argument
151 start = string + pmatch[0].rm_so; in matcher()
152 stop = string + pmatch[0].rm_eo; in matcher()
173 m->pmatch = NULL; in matcher()
189 free(m->pmatch); in matcher()
211 if (m->pmatch == NULL) in matcher()
212 m->pmatch = reallocarray(NULL, m->g->nsub + 1, in matcher()
214 if (m->pmatch == NULL) { in matcher()
219 m->pmatch[i].rm_so = m->pmatch[i].rm_eo = -1; in matcher()
[all …]
Dregexec.c141 regmatch_t pmatch[], int eflags) in regexec() argument
159 return(smatcher(g, string, nmatch, pmatch, eflags)); in regexec()
161 return(lmatcher(g, string, nmatch, pmatch, eflags)); in regexec()
/openbsd/src/lib/libkeynote/
Dkeynote.y491 regmatch_t pmatch[32]; variable
503 memset(pmatch, 0, sizeof(pmatch));
518 i = regexec(&preg, $1, 32, pmatch, 0);
532 for (i = 1; i < 32 && pmatch[i].rm_so != -1; i++)
534 gr = calloc(pmatch[i].rm_eo - pmatch[i].rm_so +
544 strncpy(gr, $1 + 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/gnu/llvm/llvm/lib/Support/
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 …]
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()
/openbsd/src/usr.bin/m4/
Dgnum4.c473 regmatch_t *pmatch; in dopatsubst() local
488 pmatch = xreallocarray(NULL, re.re_nsub+1, sizeof(regmatch_t), in dopatsubst()
491 argc > 4 && argv[4] != NULL ? argv[4] : "", pmatch); in dopatsubst()
492 free(pmatch); in dopatsubst()
503 regmatch_t *pmatch; in doregexp() local
522 pmatch = xreallocarray(NULL, re.re_nsub+1, sizeof(regmatch_t), NULL); in doregexp()
524 do_regexpindex(argv[2], &re, source, pmatch); in doregexp()
526 do_regexp(argv[2], &re, source, argv[4], pmatch); in doregexp()
527 free(pmatch); in doregexp()
/openbsd/src/usr.bin/split/
Dsplit.c242 regmatch_t pmatch; in split2() local
244 pmatch.rm_so = 0; in split2()
245 pmatch.rm_eo = len - 1; in split2()
246 if (regexec(&rgx, bfr, 0, &pmatch, REG_STARTEND) == 0) in split2()
/openbsd/src/bin/csh/
Dglob.c82 static int pmatch(Char *, Char *);
789 gres |= pmatch(string, *p); in Gmatch()
796 pmatch(Char *string, Char *pattern) in pmatch() function
/openbsd/src/usr.bin/file/
Dmagic-load.c84 regmatch_t pmatch; in magic_set_result() local
270 pmatch.rm_so = 0; in magic_set_result()
271 pmatch.rm_eo = fmtlen; in magic_set_result()
272 if (regexec(re, fmt, 1, &pmatch, REG_STARTEND) != 0) { in magic_set_result()
/openbsd/src/gnu/usr.bin/cvs/lib/
Dregex.h496 regmatch_t pmatch[], int eflags));
Dregex.c6254 regexec (preg, string, nmatch, pmatch, eflags) in regexec() argument
6258 regmatch_t pmatch[];
6300 pmatch[r].rm_so = regs.start[r];
6301 pmatch[r].rm_eo = regs.end[r];
/openbsd/src/usr.bin/awk/
Dproto.h52 extern int pmatch(fa *, const char *);
Drun.c806 mf = pmatch; in matchop()
2567 while (pmatch(pfa, start)) { in dosub()
2706 if (pmatch(pfa, t)) { in gensub()
2786 } while (pmatch(pfa,t)); in gensub()
Db.c743 int pmatch(fa *f, const char *p0) /* longest match, for sub */ in pmatch() function
/openbsd/src/gnu/usr.bin/gcc/gcc/fixinc/
Dgnu-regex.c5627 regexec (preg, string, nmatch, pmatch, eflags)
5631 regmatch_t pmatch[]; variable
5673 pmatch[r].rm_so = regs.start[r];
5674 pmatch[r].rm_eo = regs.end[r];
/openbsd/src/gnu/lib/libiberty/src/
Dregex.c8003 regmatch_t pmatch[], int eflags)
8044 pmatch[r].rm_so = regs.start[r];
8045 pmatch[r].rm_eo = regs.end[r];
/openbsd/src/gnu/llvm/compiler-rt/lib/sanitizer_common/
Dsanitizer_common_interceptors.inc8022 struct __sanitizer_regmatch *pmatch[], int eflags) {
8024 COMMON_INTERCEPTOR_ENTER(ctx, regexec, preg, string, nmatch, pmatch, eflags);
8029 int res = REAL(regexec)(preg, string, nmatch, pmatch, eflags);
8030 if (!res && pmatch)
8031 COMMON_INTERCEPTOR_WRITE_RANGE(ctx, pmatch, nmatch * struct_regmatch_sz);