Esempio n. 1
0
void ScopeDeleteVariable(const char *scope, const char *id)
{
    Scope *ptr = ScopeGet(scope);

    if (ptr == NULL)
    {
        return;
    }

    if (HashDeleteElement(ptr->hashtable, id) == false)
    {
        CfDebug("No variable matched %s\n", id);
    }
}
Esempio n. 2
0
File: vars.c Progetto: rdparker/core
void DeleteScalar(const char *scope_name, const char *lval)
{
    Scope *scope = GetScope(scope_name);

    if (scope == NULL)
    {
        return;
    }

    if (HashDeleteElement(scope->hashtable, lval) == false)
    {
        CfDebug("Attempt to delete non-existent variable %s in scope %s\n", lval, scope_name);
    }
}
Esempio n. 3
0
void ScopeDeleteVariable(const char *ns, const char *scope, const char *id)
{
    Scope *ptr = ScopeGet(ns, scope);

    if (ptr == NULL)
    {
        return;
    }

    if (HashDeleteElement(ptr->hashtable, id) == false)
    {
        Log(LOG_LEVEL_DEBUG, "No variable matched '%s' for removal", id);
    }
}
Esempio n. 4
0
void DeleteVariable(char *scope,char *id)

{
struct Scope *ptr = GetScope(scope);

if (ptr == NULL)
   {
   return;
   }

if (HashDeleteElement(ptr->hashtable, id) == false)
   {
   Debug("No variable matched %s\n",id);
   }
}
Esempio n. 5
0
void ScopeDeleteSpecialScalar(const char *scope, const char *lval)
{
    assert(ScopeIsReserved(scope));

    Scope *scope_ptr = ScopeGet(scope);

    if (scope_ptr == NULL)
    {
        return;
    }

    if (HashDeleteElement(scope_ptr->hashtable, lval) == false)
    {
        CfDebug("Attempt to delete non-existent variable %s in scope %s\n", lval, scope);
    }
}
Esempio n. 6
0
void ScopeDeleteScalar(const VarRef *ref)
{
    assert(!ScopeIsReserved(ref->scope));

    Scope *scope = ScopeGet(ref->ns, ref->scope);

    if (scope == NULL)
    {
        return;
    }

    if (HashDeleteElement(scope->hashtable, ref->lval) == false)
    {
        Log(LOG_LEVEL_DEBUG, "Attempt to delete non-existent variable '%s' in scope '%s'", ref->lval, ref->scope);
    }
}
Esempio n. 7
0
File: scope.c Progetto: jeffali/core
void ScopeDeleteSpecial(const char *scope, const char *lval)
{
    assert(ScopeIsReserved(scope));

    Scope *scope_ptr = ScopeGet(scope);

    if (scope_ptr == NULL)
    {
        return;
    }

    if (HashDeleteElement(scope_ptr->hashtable, lval) == false)
    {
        Log(LOG_LEVEL_DEBUG, "Attempt to delete non-existent variable '%s' in scope '%s'", lval, scope);
    }
}
Esempio n. 8
0
void ScopeDeleteScalar(VarRef lval)
{
    assert(!ScopeIsReserved(lval.scope));
    if (ScopeIsReserved(lval.scope))
    {
        ScopeDeleteSpecialScalar(lval.scope, lval.lval);
    }

    Scope *scope = ScopeGet(lval.scope);

    if (scope == NULL)
    {
        return;
    }

    if (HashDeleteElement(scope->hashtable, lval.lval) == false)
    {
        CfDebug("Attempt to delete non-existent variable %s in scope %s\n", lval.lval, lval.scope);
    }
}
Esempio n. 9
0
void ScopeDeleteScalar(VarRef lval)
{
    assert(!ScopeIsReserved(lval.scope));
    if (ScopeIsReserved(lval.scope))
    {
        ScopeDeleteSpecial(lval.scope, lval.lval);
    }

    Scope *scope = ScopeGet(lval.scope);

    if (scope == NULL)
    {
        return;
    }

    if (HashDeleteElement(scope->hashtable, lval.lval) == false)
    {
        Log(LOG_LEVEL_DEBUG, "Attempt to delete non-existent variable '%s' in scope '%s'", lval.lval, lval.scope);
    }
}
Esempio n. 10
0
void ScopeDeleteSpecial(SpecialScope scope, const char *lval)
{
    Scope *scope_ptr = ScopeGet(NULL, SpecialScopeToString(scope));

    if (scope_ptr == NULL)
    {
        Log(LOG_LEVEL_WARNING,
            "Attempt to delete variable '%s' in non-existent scope '%s'",
            lval, SpecialScopeToString(scope));
        return;
    }

    if (HashDeleteElement(scope_ptr->hashtable, lval) == false)
    {
        Log(LOG_LEVEL_WARNING,
            "Attempt to delete non-existent variable '%s' in scope '%s'",
            lval, SpecialScopeToString(scope));
        return;
    }

    Log(LOG_LEVEL_DEBUG, "Deleted existent variable '%s' in scope '%s'",
        lval, SpecialScopeToString(scope));
}