Roxen.git / server / base_server / global_variables.pike

version» Context lines:

Roxen.git/server/base_server/global_variables.pike:659:    string c, v;    if(sscanf(argv[p],"%s=%s", c, v) == 2)    {    sscanf(c, "%*[-]%s", c);    if(variables[c])    {    if(catch{    mixed res = compile_string( "mixed f(){ return "+v+";}")()->f();    if(sprintf("%t", res) != sprintf("%t", variables[c][VAR_VALUE]) &&    res != 0 && variables[c][VAR_VALUE] != 0) -  werror("Warning: Setting variable "+c+"\n" +  report_debug("Warning: Setting variable "+c+"\n"    "to a value of a different type than the default value.\n"    "Default was "+sprintf("%t", variables[c][VAR_VALUE])+    " new is "+sprintf("%t", res)+"\n");    variables[c][VAR_VALUE]=res;    })    { -  werror("Warning: Asuming '"+v+"' should be taken " +  report_debug("Warning: Asuming '"+v+"' should be taken "    "as a string value.\n");    if(!stringp(variables[c][VAR_VALUE])) -  werror("Warning: Old value was not a string.\n"); +  report_debug("Warning: Old value was not a string.\n");    variables[c][VAR_VALUE]=v;    }    }    else -  perror("Unknown variable: "+c+"\n"); +  report_debug("Unknown variable: "+c+"\n");    }    }   }         static mapping __vars = ([ ]);      // These two should be documented somewhere. They are to be used to   // set global, but non-persistent, variables in Roxen.   mixed set_var(string var, mixed to)   {    return __vars[var] = to;   }      mixed query_var(string var)   {    return __vars[var];   }