/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/comp/ |
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.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 | 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.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/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 | Makefile | 50 test.re : test.glob - test.fnmatch - test.match - test.regex 54 repetition.dat re-assoc.mm re-definitions.mm re-nullsubexpr.mm \ 55 testregex.mm re-categorize.mm re-interpretation.mm re-repetition.mm 58 testregex.tgz : README.re Makefile.re \
|
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 | testmatch.c | 280 report(char* comment, char* fun, char* re, char* s, char* msg, int flags, int unspecified, int expand) argument 285 if (re) 288 quote(re, expand); 329 bad(char* comment, char* re, char* s, int expand) argument 332 report(comment, NiL, re, s, NiL, 0, 0, expand); 476 matchcheck(int nmatch, ssize_t* match, char* ans, char* re, char* s, int flags, int query, int unspecified, int expand) argument 486 bad("improper answer\n", re, s, expand); 495 bad("improper answer\n", re, s, expand); 504 bad("improper answer\n", re, s, expand); 509 report("failed: match was", NiL, re, 623 char* re; local [all...] |
H A D | testregex.c | 121 compf(const regex_t* re, const char* xstr, size_t xlen, regdisc_t* disc) argument 129 execf(const regex_t* re, void* data, const char* xstr, size_t xlen, const char* sstr, size_t slen, char** snxt, regdisc_t* disc) argument 654 report(char* comment, char* fun, char* re, char* s, int len, char* msg, int flags, unsigned long test) argument 659 if (re) 662 quote(re, -1, test|TEST_DELIMIT); 717 bad(char* comment, char* re, char* s, int len, unsigned long test) argument 720 report(comment, NiL, re, s, len, NiL, 0, test); 884 matchcheck(regmatch_t* match, int nmatch, int nsub, char* ans, char* re, char* s, int len, int flags, unsigned long test) argument 906 report("callout failed", NiL, re, s, len, NiL, flags, test); 916 bad("improper answer\n", re, 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 1242 char* re; local [all...] |
/ast/src/cmd/ksh93/tests/ |
H A D | quoting.sh | 306 re='@(?*)/@(?*)/@(?*)' 307 [[ ${subject/${re}/\3} != words ]] && err_exit 'string replacement with \3 not working' 308 [[ ${subject/${re}/'\3'} != '\3' ]] && err_exit 'string replacement with '"'\3'"' not working' 309 [[ ${subject/${re}/"\\3"} != '\3' ]] && err_exit 'string replacement with "\\3" not working' 310 [[ ${subject/${re}/"\3"} != '\3' ]] && err_exit 'string replacement with "\3" not working' 312 [[ ${subject/${re}/${string}} != words ]] && err_exit 'string replacement with $string not working with string=\3' 313 [[ $(print -r "${subject/${re}/${string}}") != words ]] && err_exit 'string replacement with $string not working with string=\3 using print' 314 [[ ${subject/${re}/"${string}"} != '\3' ]] && err_exit 'string replacement with "$string" not working with string=\3' 315 [[ $(print -r "${subject/${re}/"${string}"}") != '\3' ]] && err_exit 'string replacement with "$string" not working with string=\3 using print' 317 [[ ${subject/${re}/ [all...] |
/ast/src/lib/libast/regex/ |
H A D | regnexec.c | 237 #define matchpush(e,x) ((x)->re.group.number?_matchpush(e,x):0) 238 #define matchcopy(e,x) do if ((x)->re.group.number) { Match_frame_t* fp = (void*)stkframe(stkstd)->data; memcpy(fp->match, fp->save, fp->size); } while (0) 239 #define matchpop(e,x) do if ((x)->re.group.number) { Match_frame_t* fp = (void*)stkframe(stkstd)->data; memcpy(fp->match, fp->save, fp->size); stkpop(stkstd); } while (0) 256 if (rex->re.group.number <= 0 || (num = rex->re.group.last - rex->re.group.number + 1) <= 0) 264 f->match = m = env->match + rex->re.group.number; 408 DEBUG_TEST(0x0010,(sfprintf(sfstdout, "AHA#%04d 0x%04x parserep %s %d %d %d %d `%-.*s'\n", __LINE__, debug_flag, rexname(rex->re.group.expr.rex), rex->re.group.number, rex->lo, n, rex->hi, env->end - s, s)),(0)); 431 catcher.re [all...] |
H A D | regrexec.c | 64 mid = (len < e->re.bm.right) ? 0 : (len - e->re.bm.right); 65 skip = e->re.bm.skip; 66 fail = e->re.bm.fail; 67 mask = e->re.bm.mask; 68 complete = e->re.bm.complete && !nmatch; 69 exactlen = e->re.bm.size; 70 leftlen = e->re.bm.left + exactlen; 71 rightlen = exactlen + e->re.bm.right;
|
H A D | regdecomp.c | 94 if (decomp(e->re.group.expr.binary.left, sp, type, delimiter, flags)) 97 if (e->re.group.expr.binary.right && decomp(e->re.group.expr.binary.right, sp, type, delimiter, flags)) 147 if (decomp(e->re.group.expr.rex, sp, type, delimiter, flags)) 157 if (settst(e->re.charclass, m)) 265 meta(sp, e->re.onechar, type, 0, delimiter); 300 t = (s = e->re.string.base) + e->re.string.size; 310 if (e->re.trie.root[c]) 318 detrie(e->re [all...] |
H A D | regcomp.c | 119 unsigned char* cursor; /* curent point in re */ 161 e->re.data = (char*)e + sizeof(Rex_t); 203 drop(disc, e->re.group.expr.binary.left); 204 drop(disc, e->re.group.expr.binary.right); 214 drop(disc, e->re.group.expr.rex); 218 triedrop(disc, e->re.trie.root[i]); 246 if (e->re.group.expr.binary.left) 247 mark(e->re.group.expr.binary.left, set); 248 if (e->re.group.expr.binary.right) 249 mark(e->re [all...] |
H A D | regstat.c | 40 p->env->stats.re_record = p->env->rex->re.bm.size; 51 p->env->stats.re_record = (p && p->env && p->env->rex->type == REX_BM) ? p->env->rex->re.bm.size : -1;
|
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/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/libtksh/src/ |
H A D | list.c | 262 char *re; 282 exp->re = fmtmatch(npattern); 283 if (!exp->re) 290 exp->re ++; 291 exp->re[strlen(exp->re)-1] = 0; 293 dprintf(("Compiled %s to %s then %s\n", pattern,npattern,exp->re)); 306 exp->n = strgrpmatch(string, exp->re, exp->pos, 10, STR_MAXIMAL); 313 exp->re, string, (string==start)? "l" : "*", exp->n)); 322 void Tcl_RegExpRange(Tcl_RegExp re, in [all...] |
/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/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/libtk/library/demos/ |
H A D | dialog2.tcl | 13 set i [tk_dialog .dialog2 "Dialog with local grab" {This dialog box uses a global grab, so it prevents you from interacting with anything on your display until you invoke one of the buttons below. Global grabs are almost always a bad idea; don't use them unless you're truly desperate.} warning 0 OK Cancel {Show Code}]
|
/ast/src/lib/libvcodex/ |
H A D | vcqsort.c | 27 #define SWAP(le, re, ne) \ 29 Vcchar_t *rr = (Vcchar_t*)(re); \
|