Lines Matching defs:type

96 /* type of macro expansions */
1089 register int type=0; /* M_xxx */
1107 if(type<M_SIZE)
1111 mode = type = 0;
1114 if(type==M_BRACE)
1119 type = M_SIZE;
1123 type = M_TYPE;
1128 type = M_VNAME;
1134 type = M_SIZE;
1161 if(type)
1163 type = M_BRACE;
1166 if(type)
1174 if(type)
1200 if(c=='.' && type==0)
1214 while((d=c,(c=fcmbget(&LEN)),isaname(c))||type && c=='.');
1215 while(c==LBRACT && (type||mp->arrayok))
1220 if(type==M_VNAME)
1221 type = M_SUBNAME;
1242 if(type && mp->dotdot)
1246 if(type==M_VNAME)
1247 type = M_SUBNAME;
1248 else if(type==M_SIZE)
1254 if(c==0 && type==M_VNAME)
1255 type = M_SUBNAME;
1259 while(type && c=='.');
1260 if(c==RBRACE && type && fcpeek(-2)=='.')
1271 type = M_TREE;
1276 if(isastchar(c) && type)
1278 if(type==M_VNAME || type==M_SIZE)
1283 if(type==M_VNAME)
1284 type = M_NAMESCAN;
1286 type = M_NAMECOUNT;
1318 if((!np || nv_isnull(np)) && type==M_BRACE && c==RBRACE && !(flag&NV_ARRAY) && strchr(id,'.'))
1338 if(type)
1358 if(type==M_SUBNAME)
1367 else if(ap && (isastchar(mode)||type==M_TREE) && !(ap->nelem&ARRAY_SCAN) && type!=M_SIZE)
1376 if(type<=1 && np && nv_isvtree(np) && mp->pattern==1 && !mp->split)
1379 if(type && cc=='}')
1393 if((type==M_VNAME||type==M_SUBNAME) && mp->shp->argaddr && strcmp(nv_name(np),id))
1395 c = (type>M_BRACE && isastchar(mode));
1396 if(np && (type==M_TREE || !c || !ap))
1401 if(type==M_VNAME || (type==M_SUBNAME && ap))
1403 type = M_BRACE;
1409 else if(type==M_TYPE)
1412 type = M_BRACE;
1424 else if(type==M_TREE)
1428 if(type && fcpeek(0)=='+')
1450 if(sh_isoption(SH_NOUNSET) && !isastchar(mode) && (type==M_VNAME || type==M_SIZE))
1453 if(type==M_VNAME)
1456 type = M_BRACE;
1458 else if(type==M_TYPE)
1459 type = M_BRACE;
1480 if(type>M_TREE)
1484 if(type==M_NAMESCAN || type==M_NAMECOUNT)
1489 if(type==M_NAMECOUNT)
1502 else if(type==M_SUBNAME)
1543 if(type && c==':')
1554 if(type)
1579 type = fcget();
1580 if(type=='%' || type=='#')
1585 type = 0;
1626 type = (int)sh_strnum(argp,&ptr,1);
1631 if(type<0 && (type+= dolmax)<0)
1632 type = 0;
1633 if(type==0)
1638 v = getdolarg(mp->shp,dolg=type,&vsize);
1640 dolmax = type;
1643 else if(type < dolmax)
1644 v = mp->shp->st.dolv[dolg=type];
1650 if(type<0)
1653 type = -type;
1655 type += array_maxindex(np);
1659 while(type-- >0 && (v=0,nv_nextsub(np)))
1662 else if(type > 0)
1664 if(nv_putsub(np,NIL(char*),type|ARRAY_SCAN))
1670 else if(type>0)
1678 if(type<0 && (type += vsize)<0)
1679 type = 0;
1680 if(vsize < type)
1686 for(c=type;c;c--)
1692 v += type;
1697 if((type = (int)sh_strnum(ptr+1,&ptr,1)) <=0)
1703 if(dolg+type < dolmax)
1704 dolmax = dolg+type;
1707 dolmax = type;
1709 else if(type < vsize)
1716 while(type-->0)
1722 type = vp-v;
1726 vsize = type;
1741 if(type=='/' || type=='#' || type=='%')
1743 c = type;
1744 type = '/';
1748 type = 0;
1752 if(type==c) /* ## or %% */
1755 type = 0;
1758 if((type=='/' || c=='/') && (repstr = mac_getstring(pattern)))
1778 flag = (type || c=='/')?(STR_GROUP|STR_MAXIMAL):STR_GROUP;
1808 if(*v && c=='/' && type)
1953 else if(var && sh_isoption(SH_NOUNSET) && type<=M_TREE && (!np || nv_isnull(np) || (nv_isarray(np) && !np->nvalue.cp)))
1976 if(type==M_BRACE && sh_lexstates[ST_NORM][c]==S_BREAK)
1982 if(type)
1991 * <type> is 0 for older `...` version
1993 static void comsubst(Mac_t *mp,register Shnode_t* t, int type)
2017 if(type)
2073 type = 1;
2105 type = 3;
2108 sp = sh_subshell(mp->shp,t,sh_isstate(SH_ERREXIT),type);