Roxen.git / server / base_server / mainconfig.pike

version» Context lines:

Roxen.git/server/base_server/mainconfig.pike:1:   inherit "config/builders"; - string cvs_version = "$Id: mainconfig.pike,v 1.36 1997/03/26 05:54:02 per Exp $"; + string cvs_version = "$Id: mainconfig.pike,v 1.37 1997/04/05 01:25:33 per Exp $";   inherit "roxenlib";   inherit "config/draw_things";    - import Stdio; +    import Array; -  + import Stdio;    -  + /* Work-around for Simulate.perror */ + #define perror roxen_perror +    #include <confignode.h>   #include <module.h>      #define dR "00"   #define dG "06"   #define dB "30"      #define bdR "00"   #define bdG "50"   #define bdB "90"
Roxen.git/server/base_server/mainconfig.pike:21:   #define BODY "<body "+(roxen->QUERY(BG)?"background=/image/background.gif ":"")+"bgcolor=#"+dR+dG+dB+" text=#ffffff link=#ffffaa vlink=#ffffaa alink=#f0e0f0>"      #define TABLEP(x, y) (id->supports->tables ? x : y)   #define PUSH(X) do{res+=({(X)});}while(0)      int bar=time(1);      class Node {    inherit "struct/node";    +  import Simulate; +     mixed original;    int changed, moredocs;       int bar=time();    function saver = lambda(object o) { if(o->changed) o->change(-o->changed); };       string|array error;       void change(int i)    {
Roxen.git/server/base_server/mainconfig.pike:288:    op[i][1] = allvars["protocol_"+i]||op[i][1];    op[i][2] = allvars["ip_number_"+i]||op[i][2];    op[i][3] = allvars["arguments_"+i]||op[i][3];    } else // Delete this port.    op[i]=0;    }    return op - ({ 0 });       case TYPE_DIR_LIST:    array foo; -  array st; +     foo=map((var-" ")/",", lambda(string var, object node) { -  array st; -  if (!strlen( var ) || !(st = file_stat( var )) || (st[1] != -2)) +  if (!strlen( var ) || file_size( var ) != -2)    {    if(node->error)    node->error += ", " +var + " is not a directory";    else    node->error = var + " is not a directory";    return 0;    }    if(var[-1] != '/')    return var + "/";    return var;    }, node);       if(sizeof(foo-({0})) != sizeof(foo))    return 0;    return foo;       case TYPE_DIR: -  +  array st;    if (!strlen( var ) || !(st = file_stat( var )) || (st[1] != -2))    {    node->error = var + " is not a directory";    return 0;    }    if(var[-1] != '/')    return var + "/";    return var;       case TYPE_TEXT_FIELD:
Roxen.git/server/base_server/mainconfig.pike:627:    o->enable_module("contenttypes#0");    o->enable_module("wais#0");    break;       case "copy":    string from;    mapping tmp;    sscanf(type, "%*s'%s'", from);    tmp = roxen->copy_configuration(from, name);    if(!tmp) error("No configuration to copy from!\n"); -  tmp["spider#0"]->LogFile = "../logs/" -  +roxen->short_name(name)+"/Log"; -  roxen->save_it(name); +  tmp["spider#0"]->LogFile = "../logs/"+roxenp()->short_name(name)+"/Log"; +  roxenp()->save_it(name);    roxen->enable_configuration(name);    }    confnode = root->descend("Configurations");    node=confnode->descend(name);       node->describer = describe_configuration;    node->saver = save_configuration;    node->data = roxen->configurations[-1];    node->type = NODE_CONFIGURATION;    build_configuration(node);