/ast/src/lib/libast/regex/ |
H A D | regexec.c | 36 regexec(const regex_t* p, const char* s, size_t nmatch, regmatch_t* match, regflags_t flags) argument 41 int m = match->rm_so; 44 if (!(r = regnexec(p, s + m, match->rm_eo - m, nmatch, match, flags)) && m > 0) 45 for (e = match + nmatch; match < e; match++) 46 if (match->rm_so >= 0) 48 match->rm_so += m; 49 match 74 regmatch_t* match; local [all...] |
H A D | regsubexec.c | 71 sub(const regex_t* p, register regsub_t* b, const char* ss, register regsubop_t* op, size_t nmatch, register regmatch_t* match) argument 86 if ((c = match[op->off].rm_so) < 0) 89 if ((c = match[op->off].rm_eo) < 0) 148 regsubexec(const regex_t* p, const char* s, size_t nmatch, regmatch_t* match) argument 165 PUTS(p, b, s, match->rm_eo, return fatal(p->env->disc, c, NiL)); 168 PUTS(p, b, s, match->rm_so, return fatal(p->env->disc, c, NiL)); 169 if (!c && (c = sub(p, b, s, b->re_ops, nmatch, match))) 172 s += match->rm_eo; 175 if (c = regnexec(p, s, e - s, nmatch, match, p->env->flags|(match 216 regmatch_t* match; local [all...] |
H A D | regsub.c | 35 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 210 s = (char*)op + match[c].rm_so; 211 e = (char*)op + match[c].rm_eo; 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 256 sfwrite(dp, op, match->rm_eo); 259 sfwrite(dp, op, match->rm_so); 260 if (r = subold(dp, op, sp, nmatch, match, flags, sre)) 263 op += match->rm_eo; 264 } while ((m > 0 || (flags & REG_SUB_ALL)) && !(r = regexec(p, op, nmatch, match, p->env->flags|(match [all...] |
H A D | regrexec.c | 36 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 109 if (complete || (env->rex = ((r - l) > 128) ? e : e->next) && !(n = regnexec(p, (char*)l, r - l, nmatch, match, flags))) 165 regmatch_t* match; local 169 if (!(match = oldof(0, regmatch_t, nmatch, 0))) 171 if (!(r = regrexec_20120528(p, s, len, nmatch, match, flags, sep, handle, record))) 174 oldmatch[i].rm_so = match[i].rm_so; 175 oldmatch[i].rm_eo = match[i].rm_eo; 177 free(match);
|
/ast/src/lib/libast/path/ |
H A D | pathrepl.c | 27 * in place replace of first occurrence of /match/ with /replace/ in path 36 pathrepl(char* path, const char* match, const char* replace) argument 38 return pathrepl_20100601(path, PATH_MAX, match, replace); 46 pathrepl_20100601(register char* path, size_t size, const char* match, register const char* replace) argument 48 register const char* m = match; 52 if (!match) 53 match = ""; 56 if (streq(match, replace)) 89 m = match;
|
H A D | pathgetlink.c | 60 int match = 0; local 72 if (match) 82 if (!match && t < &tmp[sizeof(tmp) - univ_size + 1]) for (n = 0; n < UNIV_MAX; n++) 89 match = 1;
|
/ast/src/lib/libvcodex/Vcwindow/ |
H A D | vcwdecode.c | 43 if((vcw->match.type = TYPECAST(int,data)) == VCD_SOURCEFILE ) 45 else if(vcw->match.type == VCD_TARGETFILE) 55 if(!(vcw->match.wdata = sfreserve(sf, size, 0)) || sfvalue(sf) < size ) 57 vcw->match.wsize = size; 58 vcw->match.wpos = here; 59 vcw->match.msize = size; 60 vcw->match.more = 0; 62 return &vcw->match;
|
/ast/src/lib/libodelta/ |
H A D | suftree.c | 122 register Suftree *match, *clocus, *locus, *link; local 150 /* the current match length */ 189 rescan must match a prefix of that child. 191 match = child_find(link,*rescan); 192 /**/ ASSERT(match != NULL) 197 /* rescan contains LABEL(match) */ 198 if(relen >= LENGTH(match)) 200 link = match; 201 relen -= LENGTH(match); 202 rescan += LENGTH(match); 319 register Suftree *match; local [all...] |
/ast/src/lib/libast/string/ |
H A D | strmatch.c | 29 * match shell file patterns 63 regmatch_t* match; member in struct:State_s 70 * subgroup match 71 * 0 returned if no match 73 * match group begin offsets are even elements of sub 74 * match group end offsets are odd elements of sub 139 if (!(matchstate.match = newof(matchstate.match, regmatch_t, n, 0))) 143 if (regexec(re, b, n, matchstate.match, reflags & ~(REG_MINIMAL|REG_SHELL_GROUP|REG_LEFT|REG_RIGHT|REG_ICASE))) 155 *subi++ = matchstate.match[ 193 ssize_t match[2]; local [all...] |
/ast/src/lib/libast/comp/ |
H A D | regexp.c | 98 regmatch_t match[elementsof(re->re_braslist)+1]; local 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->re_loc2 = (char*)subject + match[0].rm_eo; 106 re->re_braslist[n-1] = (char*)subject + match[n].rm_so; 107 re->re_braelist[n-1] = (char*)subject + match[n].rm_eo;
|
H A D | fnmatch.c | 58 regmatch_t match; local 67 reflags = regexec(&re, subject, 1, &match, 0); 69 if (!reflags && (reflags = subject[match.rm_eo]))
|
H A D | regcmp.c | 197 regmatch_t match[SUB + 1]; local 212 if (regexec(&re->re, subject, SUB + 1, match, 0)) 218 k = match[i].rm_eo - match[i].rm_so; 219 strlcpy(sub[n], subject + match[i].rm_so, k); 222 __loc1 = (char*)subject + match[0].rm_so; 223 return (char*)subject + match[0].rm_eo;
|
/ast/src/lib/libjcl/ |
H A D | path.c | 61 Match_t match[7]; member in struct:State_s 173 *z = state.match[n].length; 174 return (char*)state.match[n].string; 178 * match tail pattern t to s 198 return (s - b) + (state.match[state.matched].length = strlen(state.match[state.matched].string = s)); 210 state.match[state.matched].length = u - s; 211 state.match[state.matched].string = s; 225 * longest matching prefix match function 230 match(cons function [all...] |
/ast/src/lib/libdss/ |
H A D | cxmap.c | 177 regmatch_t match[10]; local 222 if (!regexec(&edit->re, buf, elementsof(match), match, 0) && !regsubexec(&edit->re, buf, elementsof(match), match)) 275 regmatch_t match[10]; local 284 else if (!regexec(&edit->re, str, elementsof(match), match, 0) && !regsubexec(&edit->re, str, elementsof(match), match)) 340 regmatch_t match[10]; local [all...] |
/ast/src/cmd/re/ |
H A D | testmatch.c | 33 static const char id[] = "\n@(#)$Id: test" LEGACY "match (AT&T Research) 2012-06-25 $\0\n"; 110 H(" m ~STR_MAXIMAL minimal match (default is STR_MAXIMAL)\n"); 129 H(" Field 3: the string to match.\n"); 132 H(" the match array, a list of (m,n) entries with m and n being first\n"); 134 H(" array is specified and success is expected. The match[]\n"); 449 matchprint(ssize_t* match, int nmatch, char* ans) argument 454 if (match[nmatch-2] != -2 && (!state.ignore.position || match[nmatch-2] >= 0 && match[nmatch-2] >= 0)) 459 if (match[ 476 matchcheck(int nmatch, ssize_t* match, char* ans, char* re, char* s, int flags, int query, int unspecified, int expand) argument 632 ssize_t match[200]; local [all...] |
H A D | testregex.c | 187 T(" -o ignore match[] overrun errors\n"); 218 T(" b REG_NOTBOL lhs does not match ^\n"); 220 T(" d REG_SHELL_DOT explicit leading . match\n"); 221 T(" e REG_NOTEOL rhs does not match $\n"); 223 T(" g FNM_LEADING_DIR testfnmatch only -- match until /\n"); 229 T(" m REG_MINIMAL minimal match\n"); 230 T(" n REG_NEWLINE explicit \\n match\n"); 232 T(" p REG_SHELL_PATH explicit / match\n"); 239 T(" w REG_NOSUB no subexpression match array\n"); 269 T(" Field 3: the string to match 860 matchprint(regmatch_t* match, int nmatch, int nsub, char* ans, unsigned long test) argument 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 1255 regmatch_t match[100]; local [all...] |
/ast/src/lib/libast/astsa/ |
H A D | strmatch.c | 29 * match shell file patterns -- derived from Bourne and Korn shell gmatch() 168 * match a single pattern 518 * match any pattern in a group 537 * subgroup match 538 * 0 returned if no match 540 * match group begin offsets are even elements of sub 541 * match group end offsets are odd elements of sub 552 Match_t match; local 555 match.last_s = e = s + strlen(s); 558 match [all...] |
/ast/src/cmd/std/ |
H A D | mount.c | 44 " and \b--type\b options can be used to match parts of the table.]" 48 " names. A leading \b!\b inverts the match sense.]:[[!]]host,...]" 60 " names. A leading \b!\b inverts the match sense.]:[[!]]type,...]" 86 " and \b--type\b options can be used to match parts of the table.]" 90 " names. A leading \b!\b inverts the match sense.]:[[!]]host,...]" 95 " names. A leading \b!\b inverts the match sense.]:[[!]]type,...]" 190 Dt_t* match; member in struct:__anon234 214 if (!state.match) 218 if (!(state.match = dtopen(&state.matchdisc, Dtoset))) 219 error(ERROR_SYSTEM|3, "out of space [match tabl [all...] |
/ast/src/lib/libsum/ |
H A D | sumlib.c | 45 const char* match; member in struct:Method_s 59 const char* match; member in struct:Map_s 236 * simple alternation prefix match 240 match(register const char* s, register const char* p) function 281 if (match(name, maps[n].match)) 287 if (match(name, methods[n].match)) 369 n += sfprintf(sp, "[+%s?%s]", methods[i].match, methods[i].description); 374 n += sfprintf(sp, "[+%s?%s Shorthand for \b%s\b.]", maps[i].match, map [all...] |
/ast/src/cmd/3d/ |
H A D | strmatch.c | 34 * match shell file patterns -- derived from Bourne and Korn shell gmatch() 262 * match a single pattern 720 * match any pattern in a group 747 * subgroup match 748 * 0 returned if no match 750 * match group begin offsets are even elements of sub 751 * match group end offsets are odd elements of sub 762 Match_t match; local 765 match.last_s = e = s + strlen(s); 768 match [all...] |
/ast/src/lib/libast/disc/ |
H A D | sfdcmore.c | 48 int match; /* match length, 0 if none */ member in struct:__anon257 49 char pattern[128]; /* match pattern */ 70 more->match = 0; 171 if (more->match) 173 match: 180 else if (*s == r && (e - s) >= more->match && !strncmp(s, more->pattern, more->match)) 185 more->match = 0; 227 if (more->match [all...] |
/ast/src/cmd/ksh93/tests/ |
H A D | substring.sh | 137 then err_exit "$pattern does not match $string" 257 var=$($SHELL -c 'v=/vin:/usr/vin r=vin; : ${v//vin/${r//v/b}};typeset -p .sh.match') 2> /dev/null 258 [[ $var == 'typeset -a .sh.match=((vin vin) )' ]] || err_exit '.sh.match not correct when replacement pattern contains a substring match' 267 [[ ${.sh.match[0]} == dfg ]] || err_exit '.sh.match[0] not dfg' 268 [[ ${.sh.match[1]} == d ]] || err_exit '.sh.match[1] not d' 269 [[ ${.sh.match[ [all...] |
/ast/src/lib/libz/ |
H A D | deflate.c | 18 * string matches are performed only when the previous match ends. So it 22 * is used to find longer strings when a small match has been found. 97 local void check_match OF((deflate_state *s, IPos start, IPos match, 124 ush good_length; /* reduce lazy search above this match length */ 125 ush max_lazy; /* do not perform lazy search above this match length */ 126 ush nice_length; /* quit search above this match length */ 984 * Initialize the "longest match" routines for a new zlib stream 1015 * Set match_start to the longest match starting at the given string and 1021 * OUT assertion: the match length is not greater than s->lookahead. 1024 /* For 80x86 and 680x0, an optimized version will be provided in match 1033 register Bytef *match; /* matched string */ local 1180 register Bytef *match; /* matched string */ local [all...] |
/ast/src/lib/libast/misc/ |
H A D | error.c | 90 regex_t* match; member in struct:State_s 119 "match", OPT_MATCH, 192 if (error_state.match) 193 regfree(error_state.match); 196 if ((error_state.match || (error_state.match = newof(0, regex_t, 1, 0))) && regcomp(error_state.match, v, REG_EXTENDED|REG_LENIENT)) 198 free(error_state.match); 199 error_state.match = 0; 202 else if (error_state.match) [all...] |
/ast/src/lib/libcmd/ |
H A D | expr.c | 85 "[+match\b \astring\a \aexpr\a?Equivalent to \astring\a \b:\b " 223 if (cp[1] == 'a' && !strcmp(cp, "match")) 301 regmatch_t match[2]; local 314 if (!(n = regexec(&re, cp, elementsof(match), match, 0))) 319 if (match[1].rm_so >= 0) 321 np->str = cp + match[1].rm_so; 322 np->str[match[1].rm_eo - match[1].rm_so] = 0; 331 np->num = match[ [all...] |