Searched refs:pattern (Results 1 - 25 of 58) sorted by relevance

123

/ast/src/lib/libtksh/lib/tksh7.6/
H A Dparray.tcl13 proc parray {a {pattern *}} {
19 foreach name [lsort [array names array $pattern]] {
25 foreach name [lsort [array names array $pattern]] {
/ast/src/cmd/ksh93/tests/
H A Dexpand.sh101 pattern=$1
105 got=$(eval print -r -- "$pattern")
106 [[ $got == $expected ]] || err_exit "'$pattern' failed -- expected '$expected' got '$got'"
107 #print -r -- " '$pattern' '$got' \\"
110 # ~(N) no expand glob pattern option
H A Dsubstring.sh134 while read -r pattern string expected
136 then if [[ $string != $pattern ]]
137 then err_exit "$pattern does not match $string"
139 if [[ ${string##$pattern} != "" ]]
140 then err_exit "\${$string##$pattern} not null"
142 if [ "${string##$pattern}" != '' ]
143 then err_exit "\"\${$string##$pattern}\" not null"
145 if [[ ${string/$pattern} != "" ]]
146 then err_exit "\${$string/$pattern} not null"
148 else if [[ $string == $pattern ]]
[all...]
H A Dglob.sh77 typeset lineno expected subject pattern got
78 lineno=$1 expected=$2 subject=$3 pattern=$4
81 $pattern) got='<match>' ;;
86 then 'err_exit' $lineno "case $subject in $pattern) -- expected '$expected', got '$got'"
/ast/src/lib/libast/regex/
H A Dregcache.c33 #define ROUND 64 /* pattern buffer size round */
39 char* pattern; member in struct:Cache_s
75 * return regcomp() compiled re for pattern and reflags
79 regcache(const char* pattern, regflags_t reflags, int* status) argument
90 * 0 pattern flushes the cache and reflags>0 extends cache
93 if (!pattern)
131 * check if the pattern is in the cache
134 for (i = 0; i < sizeof(key) && pattern[i]; i++)
135 ((char*)&key)[i] = pattern[i];
145 else if (*(Key_t*)matchstate.cache[i]->pattern
[all...]
H A Dregerror.c40 /* REG_EESCAPE */ "trailing \\ in pattern",
49 /* REG_ENULL */ "empty subexpr in pattern",
85 fatal(regdisc_t* disc, int code, const char* pattern) argument
89 if (pattern)
90 (*disc->re_errorf)(NiL, disc, disc->re_errorlevel, "regular expression: %s: %s", pattern, reg_error[code+1]); local
/ast/src/lib/libast/comp/
H A Dre_comp.c42 re_comp(const char* pattern) argument
46 if (!pattern || !*pattern)
59 if (!(r = regcomp(&state.re, pattern, REG_LENIENT|REG_NOSUB|REG_NULL)))
H A Dfnmatch.c53 fnmatch(const char* pattern, const char* subject, register int flags) argument
65 if (!(reflags = regcomp(&re, pattern, reflags)))
73 else if (!(reflags = regcomp(&re, pattern, reflags|REG_RIGHT)))
H A Dregcmp.c61 regcmp(const char* pattern, ...) argument
78 va_start(ap, pattern);
79 if (pattern || !*pattern || !(sp = sfstropen()))
89 s = (char*)pattern;
H A Dregexp.c55 _re_comp(regexp_t* re, const char* pattern, char* handle, unsigned int size) argument
65 n = regcomp(&env->re, pattern, REG_LENIENT|REG_NULL);
/ast/src/cmd/sort/
H A Dsfopen.c29 * program<del><pattern><del>
30 * input<del><pattern><del>command<del>
31 * output<del><pattern><del>command<del>
38 * (literal) \<n> in command expands to the <n>th subexpression in the file path pattern match
56 char* pattern; member in struct:Io_s
63 char* pattern; member in struct:Match_s
113 io->pattern = v;
128 mv->pattern = v;
182 sfprintf(sfstdout, " program %s \n", mp->pattern);
184 sfprintf(sfstdout, " input %s %s\n", io->pattern, i
[all...]
/ast/src/cmd/std/
H A Dfile.c66 "[p:pattern|match?Only files with descriptions matching the \bsh\b(1)"
68 " files match, 0 otherwise.]:[pattern]"
69 "[q:quiet|silent?Do not list matching \b--pattern\b files.]"
112 " [+match?case insensitive \bsh\b(1) match pattern operator"
122 " description pattern matches feasible. \adescription\a may"
148 type(Magic_t* mp, char* file, const char* pattern, register Magicdisc_t* disc) argument
162 if (!pattern)
169 else if (strmatch(s, pattern))
183 char* pattern = 0; local
238 pattern
[all...]
/ast/src/lib/libtk/generic/
H A DtkFileFilter.c278 globPtr->pattern = (char*)ckalloc(len+1);
279 globPtr->pattern[0] = '*';
280 strcpy(globPtr->pattern+1, globList[i]);
284 globPtr->pattern = (char*)ckalloc(4*sizeof(char));
285 strcpy(globPtr->pattern, "*.*");
293 globPtr->pattern = (char*)ckalloc(3*sizeof(char));
294 strcpy(globPtr->pattern, "*.");
297 globPtr->pattern = (char*)ckalloc(len);
298 strcpy(globPtr->pattern, globList[i]);
301 globPtr->pattern
[all...]
H A DtkFileFilter.h26 struct GlobPattern * next; /* Chains to the next glob pattern
27 * in a glob pattern list */
28 char * pattern; /* String value of the pattern, such member in struct:GlobPattern
43 GlobPattern * patterns; /* Head of glob pattern type list */
44 GlobPattern * patternsTail; /* Tail of glob pattern type list */
/ast/src/lib/libtksh/src/
H A Dlist.c237 Tcl_RegExpMatch(interp, string, pattern)
240 char *pattern; /* Regular expression to match against
244 char *regexp = fmtmatch(pattern);
249 pattern, (char *) NULL);
268 Tcl_RegExp Tcl_RegExpCompile(Tcl_Interp *interp, char *pattern)
273 int len = strlen(pattern)+3;
278 strcpy(npattern+1, pattern);
286 Tcl_AppendResult(interp, "error while compiling regular expression: ", pattern, (char *) NULL);
293 dprintf(("Compiled %s to %s then %s\n", pattern,npattern,exp->re));
/ast/src/lib/libtksh/tcl/
H A DtclUtil.c820 * See if a particular string matches a particular pattern.
823 * The return value is 1 if string matches pattern, and
825 * special characters in the pattern: *?\[] (see the manual
835 Tcl_StringMatch(string, pattern)
837 register char *pattern; /* Pattern, which may contain
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
848 if (*pattern == 0) {
855 if ((*string == 0) && (*pattern != '*')) {
859 /* Check for a "*" as the next pattern characte
[all...]
H A DtclUnixFile.c646 * directory for all files which match a given pattern.
661 TclMatchFiles(interp, separators, dirPtr, pattern, tail)
665 char *pattern; /* Pattern to match against. */
666 char *tail; /* Pointer to end of pattern. */
696 * Check to see if the pattern needs to compare with hidden files.
699 if ((pattern[0] == '.')
700 || ((pattern[0] == '\\') && (pattern[1] == '.'))) {
733 * Clean up the end of the pattern and the tail pointer. Leave
735 * following the pattern, o
[all...]
/ast/src/cmd/cs/vcs_src/
H A Dvcs_search.c378 int pattern2time(pattern, to)
379 char* pattern;
391 message((5, "pattern2time ++ [%s]", pattern));
397 if (*pattern == '(')
399 for (s=buf, pattern++; *pattern && *pattern != ')'; s++, pattern++)
401 *s = *pattern;
410 s = pattern;
[all...]
/ast/src/lib/libast/disc/
H A Dsfdcmore.c49 char pattern[128]; /* match pattern */ member in struct:__anon257
174 for (r = more->pattern[0];; s++)
180 else if (*s == r && (e - s) >= more->match && !strncmp(s, more->pattern, more->match))
221 if (n >= sizeof(more->pattern))
222 n = sizeof(more->pattern) - 1;
223 memcpy(more->pattern, s, n);
224 more->pattern[n] = 0;
227 if (more->match = strlen(more->pattern))
/ast/src/lib/libcmd/
H A Dgetconf.c141 char* pattern; local
166 pattern = 0;
180 pattern = opt_info.arg;
190 pattern = opt_info.arg;
203 pattern = opt_info.arg;
242 astconflist(sfstdout, path, flags, pattern);
/ast/src/cmd/ksh93/sh/
H A Dexpand.c93 int path_expand(Shell_t *shp,const char *pattern, struct argnod **arghead) argument
123 extra += scantree(shp->alias_tree,pattern,arghead);
124 extra += scantree(shp->fun_tree,pattern,arghead);
141 * instead of being an augmented shell pattern.
193 if(memcmp(pattern,"~(N",3)==0)
195 glob(pattern, flags, 0, gp);
217 * scan tree and add each name that matches the given pattern
219 static int scantree(Dt_t *tree, const char *pattern, struct argnod **arghead) argument
228 if(strmatch(cp=nv_name(np),pattern))
432 /* generate each pattern an
[all...]
H A Dmacro.c79 char pattern; /* set when file expansion follows */ member in struct:_mac_
80 char patfound; /* set if pattern character found */
170 mp->pattern = (mode==1||mode==2);
226 mp->pattern = mp->split && !(flag&ARG_NOGLOB) && !sh_isoption(SH_NOGLOB);
235 mp->pattern = ((flag&ARG_EXP)!=0);
244 if(mp->pattern)
283 mp->split = mp->assign = mp->pattern = mp->patfound = mp->lit = mp->arith = mp->let = 0;
412 * expand argument but do not trim pattern characters
459 if(mp->pattern==2 && *cp=='/')
517 if(c==ESCAPE && mp->pattern)
1095 char idbuff[3], *id = idbuff, *pattern=0, *repstr=0, *arrmax=0; local
2784 mac_getstring(char *pattern) argument
[all...]
/ast/src/cmd/mailx/port/
H A Dmime.c128 const char* pattern; member in struct:__anon155
399 if (!wp->pattern || !strncasecmp(ent->name, wp->pattern, wp->prefix) && (!ent->name[wp->prefix] || ent->name[wp->prefix] == '/'))
427 mimelist(Mime_t* mp, Sfio_t* fp, const char* pattern) argument
435 if (ws.pattern = pattern)
437 for (s = pattern; *s && *s != '/'; s++);
439 ws.prefix = s - (char*)pattern;
440 else if (ent = (Ent_t*)dtmatch(mp->cap, pattern))
442 ws.pattern
[all...]
/ast/src/cmd/nmake/
H A Dscan.c65 char* pattern; /* match expression */ member in struct:Action_s
85 char* begin; /* begin pattern */
86 char* end; /* end pattern */
139 * scan pattern sort -- strcmp(3) convention
173 if (a->pattern)
175 while (a->pattern[i])
181 if (b->pattern && b->pattern[i] && b->pattern[i] != m->pattern[
[all...]
/ast/src/lib/libast/misc/
H A Dmime.c76 const char* pattern; member in struct:__anon289
348 if (!wp->pattern || !strncasecmp(ent->name, wp->pattern, wp->prefix) && (!ent->name[wp->prefix] || ent->name[wp->prefix] == '/'))
442 mimelist(Mime_t* mp, Sfio_t* fp, register const char* pattern) argument
450 if (ws.pattern = pattern)
452 while (*pattern && *pattern++ != '/');
453 if (!*pattern || *pattern
[all...]

Completed in 65 milliseconds

123