Branch: Tag:

1997-02-13

1997-02-13 13:01:14 by Per Hedbor <ph@opera.com>

Many changes, now uses normal pike, and replace_master. Requires the new module system.

Rev: server/base_server/cache.pike:1.10
Rev: server/base_server/color.pike:1.6
Rev: server/base_server/config/builders.pike:1.4
Rev: server/base_server/config/describers.pike:1.18
Rev: server/base_server/config/draw_things.pike:1.17
Rev: server/base_server/config/low_describers.pike:1.4
Rev: server/base_server/configuration.pike:1.13
Rev: server/base_server/db.pike:1.5
Rev: server/base_server/disk_cache.pike:1.13
Rev: server/base_server/fonts.pike:1.2
Rev: server/base_server/hosts.pike:1.9
Rev: server/base_server/language.pike:1.7
Rev: server/base_server/mainconfig.pike:1.32
Rev: server/base_server/newdecode.pike:1.5
Rev: server/base_server/persistent.pike:1.5
Rev: server/base_server/read_config.pike:1.8
Rev: server/base_server/roxen.pike:1.36
Rev: server/base_server/roxenlib.pike:1.15
Rev: server/base_server/roxenloader.pike:1.7
Rev: server/base_server/socket.pike:1.4
Rev: server/etc/include/stdio.h:1.2(DEAD)
Rev: server/etc/roxen_master.pike:1.21
Rev: server/modules/directories/directories.pike:1.8
Rev: server/modules/filesystems/secure_fs.pike:1.6
Rev: server/modules/filesystems/userfs.pike:1.9
Rev: server/modules/graphics/graphic_text.pike:1.26
Rev: server/modules/misc/contenttypes.pike:1.6
Rev: server/modules/misc/ismap.pike:1.6
Rev: server/modules/misc/userdb.pike:1.9
Rev: server/modules/scripting/pikescript.pike:1.7
Rev: server/modules/tags/htmlparse.pike:1.22
Rev: server/protocols/http.pike:1.18

1: - string cvs_version = "$Id: configuration.pike,v 1.12 1997/01/29 05:32:09 per Exp $"; + string cvs_version = "$Id: configuration.pike,v 1.13 1997/02/13 13:00:53 per Exp $";   #include <module.h>   #include <roxen.h>   /* A configuration.. */      inherit "roxenlib";    -  + import Array;    -  +    function store = roxen->store;   function retrieve = roxen->retrieve;   function remove = roxen->remove;
452:    {    if(query("LogFile") == "stdout")    { -  log_function=stdout->write; +  log_function=Stdio.stdout->write;    possfd=-1;    } else if(query("LogFile") == "stderr") { -  log_function=stderr->write; +  log_function=Stdio.stderr->write;    } else {    if(strlen(query("LogFile")))    {    int opened; -  lf=File(); +  lf=files.file();    opened=lf->open( query("LogFile"), "wac");    if(!opened)    mkdirhier(query("LogFile"));
1211:       parse_log_formats();    init_log_file(); -  map_array(indices(open_ports), do_dest); +  map(indices(open_ports), do_dest);       erro = catch {    perror("Opening ports for "+query_name()+" ");
1252:    "Tried:\n"    "Port Protocol IP-Number \n"    "---------------------------\n" -  + map_array(query("Ports"), lambda(array p) { +  + map(query("Ports"), lambda(array p) {    return sprintf("%5d %-10s %-20s\n", @p);    })*"");    }
1511:    {    parse_module = me;    if(_toparse_modules) -  map_array(_toparse_modules, +  map(_toparse_modules,    lambda(object o, object me)    { me->add_parse_module(o); }, me);    }
1755:   #endif    }    } -  perr("-> "+implode_nicely(res)+"\n"); +  perr("-> "+res*","+"\n");       for(i=0; i<10; i++)    {
1845:   #endif    if(!s)    { -  t = read_bytes("/etc/resolv.conf"); +  t = Stdio.read_bytes("/etc/resolv.conf");    if(t)    {    if(!sscanf(t, "domain %s\n", s))
2053:    {    string dir;    -  _master->set_inhibit_compile_errors(1); + // _master->set_inhibit_compile_errors(perror);       err = catch { obj = roxen->load_from_dirs(roxen->QUERY(ModuleDirs), module_file); };    -  if ( _master->errors != "" ) -  { -  report_error( "Module load failed ("+module_file+"):\n " -  +(err[0]-(getcwd()+"/"))+"- " -  + (((_master->errors-(getcwd()+"/"))||"")/"\n" -  -({""}))*"\n- "+"\n" ); -  return 0; -  } if( err && obj ) { +  if( err && obj ) {    obj=0;    report_error("Error while enabling module ("+module_file+"):\n"+    describe_backtrace(err)+"\n");    }    -  _master->set_inhibit_compile_errors(0); + // _master->set_inhibit_compile_errors(0);       prog = roxen->last_loaded();    }