Lines Matching refs:ctxt

111 	GNode		*ctxt;
788 VarPossiblyExpand(const char *name, GNode *ctxt)
793 buf = Var_Subst(name, ctxt, 0);
852 VarFindEnv(const char name[], GNode *ctxt)
858 if ((var = VarLookup(&ctxt->context, name)) != NULL)
871 VarFindOnly(const char name[], GNode *ctxt)
877 if ((var = VarLookup(&ctxt->context, name)) != NULL)
887 VarFindAny(const char name[], GNode *ctxt)
912 if ((var = VarLookup(&ctxt->context, name)) != NULL)
916 if (ctxt != VAR_CMD) {
922 if (ctxt != VAR_GLOBAL && (!checkEnvFirst && !localCheckEnvFirst)) {
931 if ((ctxt != VAR_GLOBAL) && (checkEnvFirst || localCheckEnvFirst)) {
948 VarAdd(const char *name, const char *val, GNode *ctxt)
952 Lst_AtFront(&ctxt->context, v = VarCreate(name, val, 0));
953 DEBUGF(VAR, ("%s:%s = %s\n", ctxt->name, name, val));
964 Var_Delete(const char *name, GNode *ctxt)
968 DEBUGF(VAR, ("%s:delete %s\n", ctxt->name, name));
969 LST_FOREACH(ln, &ctxt->context) {
972 Lst_Remove(&ctxt->context, ln);
994 Var_Set(const char *name, const char *val, GNode *ctxt)
1004 n = VarPossiblyExpand(name, ctxt);
1005 v = VarFindOnly(n, ctxt);
1007 v = VarAdd(n, val, ctxt);
1011 DEBUGF(VAR, ("%s:%s = %s\n", ctxt->name, n, val));
1014 if (ctxt == VAR_CMD || (v->flags & VAR_TO_ENV)) {
1041 Var_SetEnv(const char *name, GNode *ctxt)
1057 v = VarFindAny(name, ctxt);
1082 * XXX: Knows its calling circumstances in that if called with ctxt
1088 Var_Append(const char *name, const char *val, GNode *ctxt)
1093 n = VarPossiblyExpand(name, ctxt);
1094 if (ctxt == VAR_GLOBAL) {
1095 v = VarFindEnv(n, ctxt);
1097 v = VarFindOnly(n, ctxt);
1100 VarAdd(n, val, ctxt);
1104 DEBUGF(VAR, ("%s:%s = %s\n", ctxt->name, n, Buf_Data(v->val)));
1116 Var_Exists(const char *name, GNode *ctxt)
1121 n = VarPossiblyExpand(name, ctxt);
1122 v = VarFindAny(n, ctxt);
1139 Var_Value(const char name[], GNode *ctxt)
1144 n = VarPossiblyExpand(name, ctxt);
1145 v = VarFindAny(n, ctxt);
1317 vp->ctxt,
1381 buf = Var_Subst(value, vp->ctxt, vp->err);
1879 v = VarFindAny(vname, vp->ctxt);
1885 if ((vp->ctxt == VAR_CMD) || (vp->ctxt == VAR_GLOBAL)) {
1951 v = VarFindOnly(name, vp->ctxt);
1985 v = VarFindAny(vname, vp->ctxt);
1992 if ((vp->ctxt == VAR_CMD) || (vp->ctxt == VAR_GLOBAL)) {
2043 v = VarFindOnly(name, vp->ctxt);
2109 vp->ctxt,
2151 v = VarFindAny(vname, vp->ctxt);
2166 if ((vp->ctxt == VAR_CMD) || (vp->ctxt == VAR_GLOBAL)) {
2229 Var_Parse(const char input[], GNode *ctxt, Boolean err,
2235 ctxt,
2257 Var_Match(const char input[], GNode *ctxt)
2262 ctxt,
2336 Var_Subst(const char *str, GNode *ctxt, Boolean err)
2366 ctxt,
2444 GNode *ctxt = VAR_GLOBAL;
2469 ctxt,