Branch: Tag:

2001-01-19

2001-01-19 12:41:40 by Per Hedbor <ph@opera.com>

Various changes, object -> typed object, the start of a new user database system, and a few other minor fixes

Rev: server/base_server/basic_defvar.pike:1.23
Rev: server/base_server/config_userdb.pike:1.19
Rev: server/base_server/configuration.pike:1.409
Rev: server/base_server/disk_cache.pike:1.58
Rev: server/base_server/fonts.pike:1.68
Rev: server/base_server/global_variables.pike:1.60
Rev: server/base_server/hosts.pike:1.29
Rev: server/base_server/javamodule.pike:1.4
Rev: server/base_server/language.pike:1.35
Rev: server/base_server/module_support.pike:1.85
Rev: server/base_server/newdecode.pike:1.29
Rev: server/base_server/prototypes.pike:1.5
Rev: server/base_server/read_config.pike:1.54
Rev: server/base_server/roxen.pike:1.610
Rev: server/base_server/roxenloader.pike:1.230
Rev: server/bin/buildenv.pike:1.6
Rev: server/bin/distclean.pike:1.2
Rev: server/bin/garbagecollector.pike:1.20
Rev: server/bin/lsquota.pike:1.2
Rev: server/bin/unpack_cif.pike:1.4
Rev: server/config_interface/standard/boxes/slashdot.pike:1.3
Rev: server/config_interface/standard/inheritinfo.pike:1.17
Rev: server/config_interface/standard/logutil.pike:1.14
Rev: server/config_interface/standard/sites/create_site_with_template.pike:1.13
Rev: server/config_interface/standard/sites/drop_module.pike:1.11
Rev: server/config_interface/standard/sites/module_info.pike:1.5
Rev: server/config_interface/standard/sites/site_content.pike:1.103
Rev: server/config_interface/standard/sites/site_header.pike:1.17
Rev: server/config_interface/standard/sites/verify_site_name.pike:1.6
Rev: server/etc/include/module_constants.h:1.5
Rev: server/etc/modules/Dims.pmod:1.10
Rev: server/etc/modules/ExtScript.pmod:1.12
Rev: server/etc/modules/GText.pmod:1.12
Rev: server/etc/modules/Roxen.pmod:1.66
Rev: server/modules/security/INFO:1.1
Rev: server/modules/security/httpbasic.pike:1.1
Rev: server/ntroxenloader.pike:1.7

4:   // Per Hedbor, Henrik Grubbström, Pontus Hagland, David Hedbor and others.      // ABS and suicide systems contributed freely by Francesco Chemolli - constant cvs_version="$Id: roxen.pike,v 1.609 2001/01/13 17:43:28 nilsson Exp $"; + constant cvs_version="$Id: roxen.pike,v 1.610 2001/01/19 12:41:35 per Exp $";      // Used when running threaded to find out which thread is the backend thread,   // for debug purposes only. - object backend_thread; + Thread.Thread backend_thread;      // The argument cache. Used by the image cache.   ArgCache argcache;
324:   /* Used by read_config.pike, since there seems to be problems with    * overloading otherwise.    */ - static object PRIVS(string r, int|string|void u, int|string|void g) + static Privs PRIVS(string r, int|string|void u, int|string|void g)   {    return Privs(r, u, g);   }
334:   // This will be changed to a list of server global modules, to make it   // easier to implement new types of fonts (such as PPM color fonts, as   // an example) - object fonts; + class Fonts + { +  class Font +  { +  Image.Image write( string ... what ); +  array(int) text_extents( string ... what ); +  }; +  array available_font_versions(string name, int size); +  string describe_font_type(string n); +  Font get_font(string f, int size, int bold, int italic, +  string justification, float|int xspace, float|int yspace);    -  +  Font resolve_font(string f, string|void justification); +  array(string) available_fonts( ); + } + Fonts fonts; +    // Will replace Configuration after create() is run.   program _configuration; /*set in create*/   
411: Inside #if defined(THREADS)
   */   #ifdef THREADS    - object do_thread_create(string id, function f, mixed ... args) + Thread do_thread_create(string id, function f, mixed ... args)   { -  object t = thread_create(f, @args); +  Thread.Thread t = thread_create(f, @args);    catch(t->set_name( id ));    THREAD_WERR(id+" started");    return t;
754:    string rrhf;    static void got_connection()    { -  object q = accept( ); +  Stdio.File q = accept( );    if( q )    {    if( !requesthandler )    {    requesthandler = (program)(rrhf);    } -  object c; +  Configuration c;    if( refs < 2 )    {    if(!mu)
923: Inside #if constant(SSL.sslfile)
   inherit Protocol;       // SSL context -  object ctx; +  SSL.context ctx;       class destruct_protected_sslfile    { -  object sslfile; +  SSL.sslfile sslfile;       mixed `[](string s)    {
955: Inside #if constant(SSL.sslfile)
   sslfile->close();    }    -  void create(object q, object ctx) +  void create(object q)    {    sslfile = SSL.sslfile(q, ctx);    }    }    -  object accept() +  Stdio.File accept()    { -  object q = ::accept(); -  if (q) return destruct_protected_sslfile(q, ctx); +  Stdio.File q = ::accept(); +  if (q) +  return [object(Stdio.File)](object)destruct_protected_sslfile(q);    return 0;    }   
977: Inside #if constant(SSL.sslfile)
      restore();    -  object privs = Privs("Reading cert file"); +  Privs privs = Privs("Reading cert file");       string f, f2;   
1531:    request_id->conf->log(file, request_id);   }    + #if ROXEN_COMPAT < 2.2   // Support for unique user id's - private object current_user_id_file; + private Stdio.File current_user_id_file;   private int current_user_id_number, current_user_id_file_last_mod;      private void restore_current_user_id_number()
1577:    md5->update(query("server_salt") + (unique_id_counter++) + time(1));    return Crypto.string_to_hex(md5->digest());   } + #endif    -  +    #ifndef __NT__   static int abs_started;   
1679:    string dither = args->dither;    Image.Colortable ct;    Image.Color.Color bgcolor; -  object alpha; +  Image.Image alpha;    int true_alpha;       if( args->fs || dither == "fs" )
2527:    }      #ifdef THREADS -  object mutex_key; +  Thread.MutexKey mutex_key;    catch { mutex_key = euid_egid_lock->lock(); };    object threads_disabled = _disable_threads();   #endif
2662:    {    modified = 1;    report_notice(LOC_M(34,"Disabling old configuration %s")+"\n", conf->name); -  // Array.map(values(conf->server_ports), lambda(object o) { destruct(o); }); +     conf->stop();    destruct(conf);    }
2710:      void disable_configuration (string name)   { -  if (object conf = config_lookup[ name ]) { +  if (Configuration conf = config_lookup[ name ]) {    configurations -= ({conf});    fix_config_lookup();    }
2876:   }      program pipe; - object shuffle(object from, object to, -  object|void to2, function(:void)|void callback) + Pipe.pipe shuffle(Stdio.File from, Stdio.File to, +  Stdio.File|void to2, +  function(:void)|void callback)   {   #if efun(spider.shuffle)    if(!to2)
2892:    } else {   #endif    // 'smartpipe' does not support multiple outputs. -  object p = Pipe.pipe(); +  Pipe.pipe p = Pipe.pipe();    if (callback) p->set_done_callback(callback);    p->output(to);    if(to2) p->output(to2);
3233:    string code = sprintf(   #"    inherit ___LogFormat; -  void log( function callback, object request_id, mapping file ) +  void log( function callback, RequestID request_id, mapping file )    {    if(!callback) return;    string data = sprintf( %O %{, %s%} );