Esempio n. 1
0
File: vars.c Progetto: patuchov/core
int UnresolvedArgs(Rlist *args)
{
    Rlist *rp;

    for (rp = args; rp != NULL; rp = rp->next)
    {
        if (rp->type != RVAL_TYPE_SCALAR)
        {
            return true;
        }

        if (IsCf3Scalar(rp->item))
        {
            if (strstr(rp->item, "$(this)") || strstr(rp->item, "${this}") ||
                strstr(rp->item, "$(this.k)") || strstr(rp->item, "${this.k}") ||
                strstr(rp->item, "$(this.v)") || strstr(rp->item, "${this.v}"))
            {
                // We should allow this in function args for substitution in maplist() etc
                // We should allow this.k and this.v in function args for substitution in maparray() etc
            }
            else
            {
                return true;
            }
        }
    }

    return false;
}
Esempio n. 2
0
File: vars.c Progetto: amousset/core
bool RlistIsUnresolved(const Rlist *list)
{
    for (const Rlist *rp = list; rp != NULL; rp = rp->next)
    {
        if (rp->val.type != RVAL_TYPE_SCALAR)
        {
            return true;
        }

        if (IsCf3Scalar(RlistScalarValue(rp)))
        {
            if (strstr(RlistScalarValue(rp), "$(this)") || strstr(RlistScalarValue(rp), "${this}") ||
                strstr(RlistScalarValue(rp), "$(this.k)") || strstr(RlistScalarValue(rp), "${this.k}") ||
                strstr(RlistScalarValue(rp), "$(this.k[1])") || strstr(RlistScalarValue(rp), "${this.k[1]}") ||
                strstr(RlistScalarValue(rp), "$(this.v)") || strstr(RlistScalarValue(rp), "${this.v}"))
            {
                // We should allow this in function args for substitution in maplist() etc
                // We should allow this.k and this.k[1] and this.v in function args for substitution in maparray() etc
            }
            else
            {
                return true;
            }
        }
    }

    return false;
}
Esempio n. 3
0
int UnresolvedArgs(struct Rlist *args)
    
{ struct Rlist *rp;

for (rp = args; rp != NULL; rp = rp->next)
   {
   if (rp->type != CF_SCALAR)
      {
      return true;
      }
   
   if (IsCf3Scalar(rp->item))
      {
      return true;
      }
   }

return false;
}