Searched defs:sub (Results 1 - 25 of 31) sorted by relevance

12

/ast/src/lib/libast/string/
H A Dccmapid.c142 ssize_t sub[2]; local
147 if (strgrpmatch(name, mp->match, sub, elementsof(sub) / 2, STR_MAXIMAL|STR_LEFT|STR_ICASE))
149 if (!(c = name[sub[1]]))
151 if (sub[1] > n && !isalpha(c))
153 n = sub[1];
H A Dstrmatch.c73 * match group begin offsets are even elements of sub
74 * match group end offsets are odd elements of sub
75 * the matched string is from s+sub[0] up to but not
76 * including s+sub[1]
80 strgrpmatch(const char* b, const char* p, ssize_t* sub, int n, register int flags) argument
99 if (sub && n > 0)
103 int* subi = (int*)sub;
108 sub[0] = sub[1] = 0;
133 if (!sub ||
204 strgrpmatch(const char* b, const char* p, int* sub, int n, int flags) argument
[all...]
/ast/src/lib/libast/regex/
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) function
155 if (!p->env->sub || (p->env->flags & REG_NOSUB) || !nmatch)
169 if (!c && (c = sub(p, b, s, b->re_ops, nmatch, match)))
H A Dregsubcomp.c111 register regsub_t* sub; local
132 if (!(sub = (regsub_t*)alloc(p->env->disc, 0, sizeof(regsub_t) + strlen(s))) || !(sub->re_ops = (regsubop_t*)alloc(p->env->disc, 0, (nops = 8) * sizeof(regsubop_t))))
134 if (sub)
135 alloc(p->env->disc, sub, 0);
139 sub->re_buf = sub->re_end = 0;
140 p->re_sub = sub;
141 p->env->sub = 1;
142 op = sub
362 regsub_t* sub; local
[all...]
/ast/src/cmd/re/
H A Dsed3.c27 recomp(Text *rebuf, Text *t, int sub) argument
40 if (!sub && *t->w == 'I') {
50 if (sub) {
H A Dtestmatch.c614 int sub; local
1009 sub = 1;
1026 if (sub)
1041 else if (sub)
1061 if (!sub)
1134 sub = 0;
/ast/src/lib/libast/comp/
H A Dregcmp.c40 unsigned char sub[SUB]; member in struct:__anon252
75 unsigned char sub[SUB]; local
142 memset(sub, 0, sizeof(sub));
145 sub[j] = paren[i] + 1;
185 memcpy(re->sub, sub, (nsub + 1) * sizeof(sub[0]));
196 char* sub[SUB + 1]; local
207 sub[
[all...]
H A Diconv.c426 ssize_t sub[2]; local
452 if (strgrpmatch(m, cp->match, sub, elementsof(sub) / 2, STR_MAXIMAL|STR_LEFT|STR_ICASE))
454 if (!(c = m[sub[1]]))
459 if (sub[1] > n && !isalpha(c))
462 n = sub[1];
479 for (m += sub[1]; *m && !isalnum(*m); m++);
/ast/src/cmd/ksh93/tests/
H A Dfunctions.sh859 sub() function
868 [[ $(sub -a) == OPTIND=2 ]] || err_exit 'OPTIND should be 2'
869 [[ $(sub -a) == OPTIND=2 ]] || err_exit 'OPTIND should be 2 again'
993 ( $SHELL -c ' function foo { typeset x=$1;print $1;};z=();z=($(foo bar)) ') 2> /dev/null || err_exit 'using a function to set an array in a command sub fails'
1086 foo sub
1087 [[ ${!bar[@]} == sub ]] || err_exit 'scoping problem with compound array variables'
/ast/src/cmd/sort/
H A Dsfopen.c164 ssize_t sub[20]; local
219 if (!io->pattern && !(m = 0) || (m = strgrpmatch(path, io->pattern, sub, elementsof(sub) / 2, STR_MAXIMAL|STR_LEFT|STR_RIGHT)))
233 if (c < m && (r = sub[c+1] - sub[c]))
234 sfwrite(state.cmd, path + sub[c], r);
/ast/src/cmd/std/
H A Dpss.c289 DIR* sub = 0; local
311 if (!sub && (ent->d_name[0] != 'c' && ent->d_name[0] != 't' && ent->d_name[0] != 'p' && ent->d_name[0] != 'v' || ent->d_name[1] != 'o' && ent->d_name[1] != 't'))
318 if (sub || !S_ISDIR(st.st_mode))
320 sub = dir;
328 dir = sub;
329 sub = 0;
339 if (!sub)
342 dir = sub;
343 sub = 0;
/ast/src/lib/libast/astsa/
H A Dstrmatch.c99 * gobble chars up to <sub> or ) keeping track of (...) and [...]
100 * sub must be one of { '|', '&', 0 }
105 gobble(Match_t* mp, register char* s, register int sub, int* g, int clear) argument
147 if (!sub)
156 return sub ? 0 : s;
159 if (!b && !p && sub == '|')
540 * match group begin offsets are even elements of sub
541 * match group end offsets are odd elements of sub
542 * the matched string is from s+sub[0] up to but not
543 * including s+sub[
547 strgrpmatch(const char* b, const char* p, ssize_t* sub, int n, int flags) argument
[all...]
/ast/src/cmd/ksh93/sh/
H A Darith.c63 register char *sub=0, *cp=(char*)np; local
84 Fun = sh_arith(shp,sub=stakptr(offset));
113 sub = nv_refsub(np);
124 if(sub)
125 nv_putsub(np,sub,assign==NV_ASSIGN?ARRAY_ADD:0);
131 if(sub)
135 sub = cp;
157 sfprintf(shp->strbuf,"%s%s%c",nv_name(np),sub,0);
158 sub = sfstruse(shp->strbuf);
160 if(strchr(sub,'
[all...]
H A Darray.c403 int nv_arraysettype(Namval_t *np, Namval_t *tp, const char *sub, int flags) argument
414 if(nq = nv_search(sub, ap->table, NV_ADD))
451 char *name, *sub=0; local
497 if(!(nelem&(ARRAY_SCAN|ARRAY_UNDEF)) && (sub=nv_getsub(np)))
498 sub = strdup(sub);
550 if(sub)
553 nv_putsub(np,sub,0L);
554 free((void*)sub);
1396 static int array_fixed_init(Namval_t *np, char *sub, cha argument
1446 array_fixed(Namval_t *np, char *sub, char *cp,int mode) argument
1652 int sub = -1; local
[all...]
H A Dnvdisc.c180 void *sub; member in struct:blocked
196 void *sub=0; local
199 sub = nv_associative(np,(const char*)0,NV_ACURRENT);
202 if(bp->np==np && bp->sub==sub && bp->isub==isub)
210 pp->sub = sub;
220 if(bp && (bp->isub>=0 || bp->sub))
221 nv_putsub(bp->np, bp->sub,(bp->isub<0?0:bp->isub)|ARRAY_SETSUB);
259 char *sub local
[all...]
H A Dnvtype.c213 char *cp, *sub; local
220 if((ap = nv_arrayptr(nq)) && !(ap->nelem&ARRAY_UNDEF) && (sub= nv_getsub(nq)))
221 sfprintf(sh.strbuf,"%s[%s].%s",cp,sub,np->nvname);
H A Dparse.c256 register int c,sub=0,lit=0; local
263 if(sub)
273 sub++;
275 sub--;
/ast/src/cmd/coshell/
H A Dcommand.c364 server(int fd, int op, int sub, int arg, char* dat) argument
605 else switch (sub)
625 error(ERROR_OUTPUT|2, con[fd].info.user.fds[2], "%c: invalid signal id", sub);
666 if (sub == 'a' || sub == 'e' || sp->fd || (sub == 'l' || sub == 's') && sp->temp && !(sp->flags & IGN)) *sv++ = sp;
671 strsort((char**)(sv = state.shellv), n, sub == 'a' || sub == 'e' || sub
[all...]
/ast/src/cmd/dsslib/bgp/
H A Dbgplib.h60 Bgproute_t sub[2]; member in struct:Bgp_s
/ast/src/lib/libtksh/src/
H A Dvarcmd.c10 char *sub; member in struct:ArraySearch
669 nv_scanfrom(searchPtr->nv, searchPtr->sub);
798 nv_scanfrom(searchPtr->nv, searchPtr->sub);
799 if (searchPtr->sub && (! nv_nextsub(searchPtr->nv))) {
802 interp->result = searchPtr->sub = nv_getsub(searchPtr->nv);
889 searchPtr->sub = NULL;
/ast/src/lib/libcmd/
H A Dcp.c252 FTSENT* sub; local
515 while (sub = fts_read(fts))
517 if (strneq(s, sub->fts_name, n) && sub->fts_name[n] == '.' && strneq(sub->fts_name + n + 1, state->suffix, state->suflen) && (m = strtol(sub->fts_name + n + state->suflen + 1, &e, 10)) && streq(e, state->suffix) && m > v)
519 if (sub->fts_level)
520 fts_set(NiL, sub, FTS_SKIP);
/ast/src/cmd/3d/
H A Dstrmatch.c187 * gobble chars up to <sub> or ) keeping track of (...) and [...]
188 * sub must be one of { '|', '&', 0 }
193 gobble(Match_t* mp, register char* s, register int sub, int* g, int clear) argument
235 if (!sub)
244 return sub ? 0 : s;
247 if (!b && !p && sub == '|')
750 * match group begin offsets are even elements of sub
751 * match group end offsets are odd elements of sub
752 * the matched string is from s+sub[0] up to but not
753 * including s+sub[
757 strgrpmatch(const char* b, const char* p, ssize_t* sub, int n, int flags) argument
[all...]
/ast/src/cmd/ksh93/include/
H A Dname.h91 char *sub; member in struct:Namref
164 #define nv_refsub(n) ((n)->nvalue.nrp->sub)
/ast/src/lib/libast/misc/
H A Dmagic.c85 regex_t* sub; member in union:Entry::__anon285
683 if (!ep->value.sub)
685 if ((c = regexec(ep->value.sub, p, elementsof(matches), matches, 0)) || (c = regsubexec(ep->value.sub, p, elementsof(matches), matches)))
693 if ((c = regexec(ep->value.sub, p, elementsof(matches), matches, 0)) || (c = regsubexec(ep->value.sub, p, elementsof(matches), matches)))
696 regmessage(mp, ep->value.sub, c);
700 p = ep->value.sub->re_sub->re_buf;
2063 if (ep->value.sub = vmnewof(mp->vm, 0, regex_t, 1, 0))
2065 ep->value.sub
[all...]
/ast/src/lib/libpp/
H A Dppproto.c594 int sub; local
1149 sub = 0;
1153 sub++;
1167 if (m != im && sub == 1)
1177 else if ((flags & MATCH) && sub == 1 && *nns(ip) != '*')

Completed in 111 milliseconds

12