Searched refs:nmatch (Results 1 - 11 of 11) sorted by relevance

/ast/src/lib/libast/regex/
H A Dregexec.c36 regexec(const regex_t* p, const char* s, size_t nmatch, regmatch_t* match, regflags_t flags) argument
44 if (!(r = regnexec(p, s + m, match->rm_eo - m, nmatch, match, flags)) && m > 0)
45 for (e = match + nmatch; match < e; match++)
53 return regnexec(p, s, s ? strlen(s) : 0, nmatch, match, flags);
70 regexec(const regex_t* p, const char* s, size_t nmatch, oldregmatch_t* oldmatch, regflags_t flags) argument
78 if (!(match = oldof(0, regmatch_t, nmatch, 0)))
80 if (!(r = regexec_20120528(p, s, nmatch, match, flags)))
81 for (i = 0; i < nmatch; i++)
H A Dregsubexec.c71 sub(const regex_t* p, register regsub_t* b, const char* ss, register regsubop_t* op, size_t nmatch, register regmatch_t* match) argument
84 if (op->off >= nmatch)
148 regsubexec(const regex_t* p, const char* s, size_t nmatch, regmatch_t* match) argument
155 if (!p->env->sub || (p->env->flags & REG_NOSUB) || !nmatch)
169 if (!c && (c = sub(p, b, s, b->re_ops, nmatch, match)))
175 if (c = regnexec(p, s, e - s, nmatch, match, p->env->flags|(match->rm_so == match->rm_eo ? REG_ADVANCE : 0)))
212 regsubexec(const regex_t* p, const char* s, size_t nmatch, oldregmatch_t* oldmatch) argument
220 if (!(match = oldof(0, regmatch_t, nmatch, 0)))
222 for (i = 0; i < nmatch; i++)
227 if (!(r = regsubexec_20120528(p, s, nmatch, matc
[all...]
H A Dregrexec.c36 regrexec(const regex_t* p, const char* s, size_t len, size_t nmatch, regmatch_t* match, regflags_t flags, int sep, void* handle, regrecord_t record) argument
68 complete = e->re.bm.complete && !nmatch;
109 if (complete || (env->rex = ((r - l) > 128) ? e : e->next) && !(n = regnexec(p, (char*)l, r - l, nmatch, match, flags)))
161 regrexec(const regex_t* p, const char* s, size_t len, size_t nmatch, oldregmatch_t* oldmatch, regflags_t flags, int sep, void* handle, regrecord_t record) argument
169 if (!(match = oldof(0, regmatch_t, nmatch, 0)))
171 if (!(r = regrexec_20120528(p, s, len, nmatch, match, flags, sep, handle, record)))
172 for (i = 0; i < nmatch; i++)
H A Dregsub.c35 subold(register Sfio_t* dp, const char* op, register const char* sp, size_t nmatch, register regmatch_t* match, register regflags_t flags, int sre) argument
208 if (c >= nmatch)
242 regsub(const regex_t* p, Sfio_t* dp, const char* op, const char* sp, size_t nmatch, regmatch_t* match, regflags_t flags) argument
248 if ((p->env->flags & REG_NOSUB) || !nmatch)
260 if (r = subold(dp, op, sp, nmatch, match, flags, sre))
264 } while ((m > 0 || (flags & REG_SUB_ALL)) && !(r = regexec(p, op, nmatch, match, p->env->flags|(match->rm_so == match->rm_eo ? REG_ADVANCE : 0))));
H A Dregnexec.c1846 regnexec(const regex_t* p, const char* s, size_t len, size_t nmatch, regmatch_t* match, regflags_t flags) argument
1858 DEBUG_TEST(0x0001,(sfprintf(sfstdout, "AHA#%04d 0x%04x regnexec %d 0x%08x `%-.*s'\n", __LINE__, debug_flag, nmatch, flags, len, s)),(0));
1875 if (env->stack = env->hard || !(env->flags & REG_NOSUB) && nmatch)
1994 for (i = j = m = 0; j < nmatch; i++)
2062 regnexec(const regex_t* p, const char* s, size_t len, size_t nmatch, oldregmatch_t* oldmatch, regflags_t flags) argument
2070 if (!(match = oldof(0, regmatch_t, nmatch, 0)))
2072 if (!(r = regnexec_20120528(p, s, len, nmatch, match, flags)))
2073 for (i = 0; i < nmatch; i++)
/ast/src/cmd/re/
H A Dtestmatch.c124 H(" number use number for nmatch (20 by default)\n");
449 matchprint(ssize_t* match, int nmatch, char* ans) argument
453 for (; nmatch > 0; nmatch -= 2)
454 if (match[nmatch-2] != -2 && (!state.ignore.position || match[nmatch-2] >= 0 && match[nmatch-2] >= 0))
456 for (i = 0; i < nmatch; i += 2)
476 matchcheck(int nmatch, ssize_t* match, char* ans, char* re, char* s, int flags, int query, int unspecified, int expand) argument
483 for (i = 0, p = ans; i < nmatch
610 int nmatch; local
[all...]
H A Dtestregex.c263 T(" number use number for nmatch (20 by default)\n");
278 T(" each test. All array elements from 0 to nmatch-1 must be specified\n");
860 matchprint(regmatch_t* match, int nmatch, int nsub, char* ans, unsigned long test) argument
864 for (; nmatch > nsub + 1; nmatch--)
865 if ((match[nmatch-1].rm_so != -1 || match[nmatch-1].rm_eo != -1) && (!(test & TEST_IGNORE_POSITION) || match[nmatch-1].rm_so >= 0 && match[nmatch-1].rm_eo >= 0))
867 for (i = 0; i < nmatch;
884 matchcheck(regmatch_t* match, int nmatch, int nsub, char* ans, char* re, char* s, int len, int flags, unsigned long test) argument
1080 extract(int* tabs, char* spec, char* re, char* s, char* ans, char* msg, char* accept, regmatch_t* match, int nmatch, int nsub, unsigned long skip, unsigned long level, unsigned long test) argument
1140 catchfree(regex_t* preg, int flags, int* tabs, char* spec, char* re, char* s, char* ans, char* msg, char* accept, regmatch_t* match, int nmatch, int nsub, unsigned long skip, unsigned long level, unsigned long test) argument
1224 int nmatch; local
[all...]
H A Dsed3.c73 reexec(regex_t* re, char* s, size_t n, size_t nmatch, regmatch_t* match, int flags) argument
76 if((code = regnexec(re, s, n, nmatch, match, flags)) && code != REG_NOMATCH)
/ast/src/lib/libast/string/
H A Dstrmatch.c64 int nmatch; member in struct:State_s
137 if (n > matchstate.nmatch)
141 matchstate.nmatch = n;
/ast/src/cmd/ksh93/sh/
H A Dexpand.c223 register int nmatch=0; local
237 nmatch++;
240 return(nmatch);
H A Dinit.c176 int nmatch; member in struct:match
766 void sh_setmatch(Shell_t *shp,const char *v, int vsize, int nmatch, regoff_t match[],int index) argument
799 if(nmatch)
800 nv_putsub(SH_MATCHNOD, NIL(char*), (nmatch-1)|ARRAY_FILL|ARRAY_SETSUB);
802 ap->nelem = mp->nmatch = nmatch;
815 for(i=0; i < mp->nmatch; i++)
821 ap->nelem = mp->nmatch;
828 index *= 2*mp->nmatch;
829 if(mp->nmatch)
[all...]

Completed in 35 milliseconds