Roxen.git / server / config_interface / actions / debug_summary.pike

version» Context lines:

Roxen.git/server/config_interface/actions/debug_summary.pike:1:   /* -  * $Id: debug_summary.pike,v 1.5 2002/05/15 14:43:32 anders Exp $ +  * $Id: debug_summary.pike,v 1.6 2002/06/05 20:16:40 nilsson Exp $    */   #include <stat.h>   #include <roxen.h>   //<locale-token project="admin_tasks">LOCALE</locale-token>   #define LOCALE(X,Y) _DEF_LOCALE("admin_tasks",X,Y)      constant action = "debug_info";      LocaleString name= LOCALE(0,"Debug Summary");   LocaleString doc = LOCALE(0,
Roxen.git/server/config_interface/actions/debug_summary.pike:37:      string indent(string text, int level)   {    array a=text/"\n";    for(int i=0; i<sizeof(a); i++)    if(sizeof(a[i]))    a[i]=" "*level+a[i];    return a*"\n";   }    + string decomment(string text) { +  text -= "\r"; +  while( sscanf(text, "%s#%*s\n%s", string a, string b)==3 ) +  text = a + b; +  return text; + } +    string describe_var_low(mixed value)   {    if(arrayp(value))    return "{"+map(value, describe_var_low)*", "+"}";    else    return sprintf("%O", value);   }      string describe_var(mixed var)   {
Roxen.git/server/config_interface/actions/debug_summary.pike:76:   #else    res+=sprintf(" %-30s %s %s %s\n", "Platform:",    uname()->sysname||"",    uname()->release||"",    uname()->machine);   #endif       res += "\n";    res += make_headline("Local environment variables");   #ifdef __NT__ -  res += indent(Stdio.read_file("../local/environment.ini")||"", 1); +  res += indent(decomment(Stdio.read_file("../local/environment.ini")||""), 1);   #else -  res += indent(Stdio.read_file("../local/environment")||"", 1); +  res += indent(decomment(Stdio.read_file("../local/environment")||""), 1);   #endif       res += "\n";    res += make_headline("System environment variables");    foreach(sort(indices(getenv())), string envvar)    res+=sprintf(" %-30s %s\n", envvar+":", getenv(envvar));       return res;   }