/ast/src/lib/libast/comp/ |
H A D | re_comp.c | 37 regex_t re; member in struct:__anon251 57 regfree(&state.re); 59 if (!(r = regcomp(&state.re, pattern, REG_LENIENT|REG_NOSUB|REG_NULL))) 65 regerror(r, &state.re, state.error, sizeof(state.error)); 73 switch (regexec(&state.re, subject, 0, NiL, 0))
|
H A D | fnmatch.c | 57 regex_t re; local 65 if (!(reflags = regcomp(&re, pattern, reflags))) 67 reflags = regexec(&re, subject, 1, &match, 0); 68 regfree(&re); 73 else if (!(reflags = regcomp(&re, pattern, reflags|REG_RIGHT))) 75 reflags = regexec(&re, subject, 0, NiL, 0); 76 regfree(&re);
|
H A D | regexp.c | 36 regex_t re; member in struct:__anon253 55 _re_comp(regexp_t* re, const char* pattern, char* handle, unsigned int size) argument 65 n = regcomp(&env->re, pattern, REG_LENIENT|REG_NULL); 89 re->re_nbra = env->re.re_nsub; 94 _re_exec(regexp_t* re, const char* subject, const char* handle, int anchor) argument 98 regmatch_t match[elementsof(re->re_braslist)+1]; 100 if (regexec(&env->re, subject, elementsof(match), match, 0) || anchor && match[0].rm_so) 102 re->re_loc1 = (char*)subject + match[0].rm_so; 103 re [all...] |
H A D | regcmp.c | 39 regex_t re; member in struct:__anon252 51 register Regex_t* re = (Regex_t*)handle; local 53 if (data || (size = roundof(size, ALIGN_BOUND2)) > (re->buf + re->size - re->cur)) 55 data = (void*)re->cur; 56 re->cur += size; 64 register Regex_t* re; local 161 re = 0; 165 if ((n += INC) > TOT || !(re 192 register Regex_t* re; local [all...] |
H A D | regexp.h | 79 _re_read(register regexp_t* re, const char* instring, char* ep, const char* endbuf, int seof) argument 89 re->re_nodelim = 0; 95 re->re_nodelim = 1; 97 if (!re->re_sed && !prev) 107 if (re->re_sed) 110 re->re_nodelim = 1; 121 if (c = _re_comp(re, _re_putc(0), ep, (char*)endbuf - ep))
|
/ast/src/lib/libast/string/ |
H A D | strmatch.c | 82 register regex_t* re; local 135 if (!(re = regcache(p, reflags, NiL))) 143 if (regexec(re, b, n, matchstate.match, reflags & ~(REG_MINIMAL|REG_SHELL_GROUP|REG_LEFT|REG_RIGHT|REG_ICASE))) 147 i = re->re_nsub;
|
/ast/src/cmd/re/ |
H A D | sed3.c | 63 reerror(regex_t* re, int code) argument 67 regerror(code, re, buf, sizeof(buf)); 73 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) 77 reerror(re, code); 82 substitute(regex_t *re, Text *data) argument 87 if(reexec(re, (char*)data->s, data->w - data->s, elementsof(matches), matches, 0)) 89 if(c = regsubexec(re, (char*)data->s, elementsof(matches), matches)) { 90 reerror(re, c); 93 n = re [all...] |
H A D | testfmt.c | 160 report(char* comment, char* fun, char* re, char* msg, int expand) argument 167 if (re) 170 quote(re, expand); 179 bad(char* comment, char* re, char* s, int expand) argument 182 report(comment, NiL, re, s, expand); 319 char* re; local 503 if ((re = field[1]) && expand) 504 escape(re); 526 sfprintf(sfstdout, "test %-3d %s \"%s\" \"%s\"\n", state.lineno, fun, re, ans ? ans : "NIL"); 528 s = (*call)(re); [all...] |
H A D | grep.c | 113 * this grep is based on the Posix re package. 131 regex_t re; /* compiled re */ member in struct:Item_s 154 List_t re; /* re list */ member in struct:State_s 218 if (c = regcomp(&x->re, s, state.options|REG_MULTIPLE)) 219 regfatal(&x->re, 4, c); 225 if (state.number || state.before || state.after || !regrecord(&x->re)) 228 else if (state.label || regcomb(&p->tail->re, &x->re)) [all...] |
H A D | sed2.c | 33 #define re ae macro 542 pe,qe,re,se,te,vv,vv,we,xe,ye,vv,Le,vv,Re,vv,vv /* p-y{} */
|
H A D | testfnmatch.c | 251 report(char* comment, char* re, char* s, char* msg, int unspecified, int expand) argument 256 if (re) 259 quote(re, expand); 292 bad(char* comment, char* re, char* s, int expand) argument 295 report(comment, re, s, NiL, 0, expand); 492 char* re; local 834 if ((re = field[1]) && expand) 835 escape(re); 873 printf("test %-3d %s \"%s\" \"%s\"\n", state.lineno, state.which, re, s); 885 eret = fnmatch(re, [all...] |
/ast/src/cmd/dsslib/ip_t/ |
H A D | ireexec.h | 26 * IREINIT the re element integral type 27 * IRENEXT the re advance function 28 * IREEXEC the re exec function 38 * advance IREINT re until success:1 or failure:0 42 IRENEXT(Ire_t* ire, register Re_t* re, int must, IREINT* lp, IREINT* rp) argument 51 if (!re) 55 if (re->lo) 57 must -= re->lo; 58 bp = lp + re->lo - 1; 60 else if (IRENEXT(ire, re 117 register Re_t* re = ire->re; local [all...] |
H A D | ire.c | 23 * ire re implementation 39 struct Re_s* re; \ 125 * compile and return ire re handle 137 Re_t* re; local 197 if (!(re = irenewof(ire, 0, Re_t, 1, 0))) 213 for (re = ire->re; re; re = re [all...] |
/ast/src/lib/libast/regex/ |
H A D | regcache.c | 32 #define CACHE 8 /* default # cached re's */ 40 regex_t re; member in struct:Cache_s 70 regfree(&matchstate.cache[i]->re); 75 * return regcomp() compiled re for pattern and reflags 167 regfree(&cp->re); 183 if (i = regcomp(&cp->re, pattern, reflags)) 197 return &cp->re;
|
/ast/src/lib/libpp/ |
H A D | ppexpr.c | 114 regex_t re; local 129 else if ((c = regcomp(&re, pp.token, REG_AUGMENTED|REG_LENIENT|REG_NULL)) || (c = regexec(&re, tmp, NiL, 0, 0)) && c != REG_NOMATCH) 130 regfatal(&re, 4, c); 134 regfree(&re);
|
H A D | ppcontrol.c | 39 regex_t re; member in struct:edit 45 regex_t re; member in struct:map 156 * return symbol pointer for next token macro (re)definition 527 if (!(i1 = regexec(&map->re, p, elementsof(match), match, 0))) 536 regfatal(&map->re, 4, i1); 551 if (!(i0 = regexec(&edit->re, p, elementsof(match), match, 0))) 554 if (i0 = regsubexec(&edit->re, p, elementsof(match), match)) 555 regfatal(&edit->re, 4, i0); 556 p = edit->re.re_sub->re_buf; 557 if (edit->re [all...] |
/ast/src/lib/libast/disc/ |
H A D | sfkeyprintf.c | 48 regex_t* re[2]; member in struct:__anon259 287 if (fp->re[x]) 288 regfree(fp->re[x]); 290 fp->re[x] = &fp->red[x]; 291 if (regcomp(fp->re[x], f.next, REG_DELIMITED|REG_NULL)) 293 f.next += fp->re[x]->re_npat; 294 if (regsubcomp(fp->re[x], f.next, NiL, 0, 0)) 296 f.next += fp->re[x]->re_npat; 297 if (!regexec(fp->re[x], s, elementsof(match), match, 0) && !regsubexec(fp->re[ [all...] |
/ast/src/lib/libast/misc/ |
H A D | findlib.h | 66 regex_t re; member in struct:__anon278
|
/ast/src/cmd/std/ |
H A D | split.c | 169 regex_t* re; member in struct:op 176 getop(struct op** prev, Sfoff_t size, size_t repeat, int flags, int re) argument 180 if (op = newof(0, struct op, 1, re ? sizeof(regex_t) : 0)) 186 if (re) 187 op->re = (regex_t*)(op + 1); 208 if (n = regcomp(op->re, cp, REG_DELIMITED|REG_NOSUB)) 210 regfatal(op->re, 2, n); 213 cp += op->re->re_npat; 437 if (!(c = regexec(op->re, s, 0, NiL, 0))) 442 regfatal(op->re, [all...] |
/ast/src/cmd/builtin/ |
H A D | nl.c | 208 regex_t re[3]; local 253 nl.section[m] = &re[m]; 254 if(regcomp(&re[m], opt_info.arg+1, REG_NOSUB)) 296 if(nl.section[m] == (void*)&re[m]) 297 regfree(&re[m]);
|
/ast/src/lib/libvcodex/Vchuff/ |
H A D | vchuffpart.c | 110 static int part(Part_t* pt, Vcchar_t* data, size_t size, ssize_t* rfreq, double re) argument 112 static int part(pt, data, size, pos, rfreq, re) 117 double re; /* entropy of this dataset */ 125 cost = pt->ctab + size*vclog(size) - re; 134 re = eupdate(re, rfreq, lfreq, 0); 142 re -= rfreq[b]*vclog(rfreq[b]); 145 re += rfreq[b]*vclog(rfreq[b]); 148 rc = pt->ctab + (size-p)*vclog(size-p) - re; 153 if(part(pt, data+p, size-p, rfreq, re) < [all...] |
/ast/src/lib/libcmd/ |
H A D | expr.c | 300 regex_t re; local 312 if (n = regcomp(&re, rp.str, REG_LEFT|REG_LENIENT)) 313 regfatal(&re, ERROR_exit(2), n); 314 if (!(n = regexec(&re, cp, elementsof(match), match, 0))) 316 if (re.re_nsub > 0) 334 regfatal(&re, ERROR_exit(2), n); 335 else if (re.re_nsub) 340 regfree(&re);
|
/ast/src/lib/libtksh/tcl/ |
H A D | tclUtil.c | 843 /* See if we're at the end of both the pattern and the string. 844 * If so, we succeeded. If we're at the end of the pattern 1477 Tcl_RegExpExec(interp, re, string, start) 1479 Tcl_RegExp re; /* Compiled regular expression; must have 1482 char *string; /* String against which to match re. */ 1489 regexp *regexpPtr = (regexp *) re; 1522 Tcl_RegExpRange(re, index, startPtr, endPtr) 1523 Tcl_RegExp re; /* Compiled regular expression that has 1534 regexp *regexpPtr = (regexp *) re; 1571 Tcl_RegExp re; 1552 Tcl_RegExp re; local [all...] |
/ast/src/cmd/kshlib/cmdtst/ |
H A D | grep.c | 123 * this grep is based on the Posix re package. 158 regex_t re; /* main compiled re */ member in struct:State_s 171 Sfio_t* tmp; /* tmp re compile string */ 175 List_t labels; /* labelled re list */ 205 labelcomp(const regex_t* re, const char* s, size_t len, regdisc_t* disc) argument 217 labelexec(const regex_t* re, void* data, const char* xstr, size_t xlen, const char* sstr, size_t slen, char** snxt, regdisc_t* disc) argument 384 state->re.re_disc = &state->redisc; 390 if (c = regcomp(&state->re, s, state->options)) 392 regfatal(&state->re, [all...] |
/ast/src/cmd/pax/ |
H A D | pax.c | 200 if (!(c = regcomp(&mp->re, s, REG_DELIMITED|REG_LENIENT|REG_NULL))) 202 s += mp->re.re_npat; 203 if (!(c = regsubcomp(&mp->re, s, NiL, 0, 0))) 204 s += mp->re.re_npat; 207 regfatal(&mp->re, 4, c); 256 regex_t* re; local 266 if (!(re = newof(0, regex_t, 1, 0))) 268 if (c = regcomp(re, s, REG_SHELL|REG_AUGMENTED|REG_DELIMITED|REG_LENIENT|REG_NULL|REG_LEFT|REG_RIGHT)) 269 regfatal(re, 4, c); 270 s += re [all...] |