Branch: Tag:

2008-08-15

2008-08-15 12:33:55 by Martin Stjernholm <mast@lysator.liu.se>

Moving to pike 7.8 and dropping compatibility with earlier pikes.

Rev: server/arg_cache_plugins/replicate.pike:1.27
Rev: server/base_server/__default.pmod:1.2
Rev: server/base_server/cache.pike:1.90
Rev: server/base_server/config_userdb.pike:1.53
Rev: server/base_server/configuration.pike:1.653
Rev: server/base_server/emit_object.pike:1.7
Rev: server/base_server/fonts.pike:1.87
Rev: server/base_server/global_variables.pike:1.110
Rev: server/base_server/javamodule.pike:1.7
Rev: server/base_server/language.pike:1.43
Rev: server/base_server/module.pike:1.231
Rev: server/base_server/module_support.pike:1.135
Rev: server/base_server/prototypes.pike:1.219
Rev: server/base_server/roxen.pike:1.981
Rev: server/base_server/roxenlib.pike:1.224
Rev: server/base_server/roxenloader.pike:1.397
Rev: server/base_server/rxmlhelp.pike:1.65
Rev: server/base_server/smtprelay.pike:3.2
Rev: server/base_server/snmpagent.pike:1.24
Rev: server/bin/buildenv.pike:1.10
Rev: server/bin/create_testcert.pike:1.2
Rev: server/bin/functions:1.19
Rev: server/bin/garbagecollector.pike:1.23
Rev: server/bin/setup_nsr.pike:1.4
Rev: server/bin/sqlhelper.pike:1.4
Rev: server/config_interface/actions/change_version.pike:1.15
Rev: server/config_interface/actions/debug_info.pike:1.40
Rev: server/config_interface/actions/feature_list.pike:1.14
Rev: server/config_interface/actions/ftpstatus.pike:1.4
Rev: server/config_interface/actions/generate_rsa.pike:1.7
Rev: server/config_interface/actions/make_rsa_csr.pike:1.11
Rev: server/config_interface/actions/make_selfsigned_dsa.pike:1.11
Rev: server/config_interface/actions/make_selfsigned_rsa.pike:1.10
Rev: server/config_interface/actions/ssl_common.pike:1.8
Rev: server/config_interface/actions/tablist.pike:1.10
Rev: server/config_interface/actions/threads.pike:1.8
Rev: server/etc/env.d/java.pike:1.19
Rev: server/etc/include/variables.h:1.18
Rev: server/etc/modules/DBManager.pmod:1.76
Rev: server/etc/modules/ExtSQL.pmod:1.4
Rev: server/etc/modules/ExtScript.pmod:1.22
Rev: server/etc/modules/GText.pmod:1.20
Rev: server/etc/modules/HTML.pmod:1.8
Rev: server/etc/modules/JavaModule.pmod:1.25
Rev: server/etc/modules/LazyImage.pmod/CoordinateSystem.pike:1.4
Rev: server/etc/modules/LazyImage.pmod/Legend.pike:1.5
Rev: server/etc/modules/LazyImage.pmod/module.pmod:1.19
Rev: server/etc/modules/License.pmod:1.27
Rev: server/etc/modules/Map.pmod:1.7
Rev: server/etc/modules/PropertySet.pike:1.12
Rev: server/etc/modules/RXML.pmod/PEnt.pike:1.24
Rev: server/etc/modules/RXML.pmod/PXml.pike:1.65
Rev: server/etc/modules/RXML.pmod/module.pmod:1.367
Rev: server/etc/modules/Roxen.pmod:1.246
Rev: server/etc/modules/RoxenDebug.pmod:1.12
Rev: server/etc/modules/RoxenRPC.pmod/HTTP.pmod/Client.pike:1.10
Rev: server/etc/modules/RoxenRPC.pmod/HTTP.pmod/Server.pike:1.6
Rev: server/etc/modules/RoxenSSLFile.pike:1.27(DEAD)
Rev: server/etc/modules/SNMP.pmod:1.10
Rev: server/etc/modules/Servlet.pmod:1.31
Rev: server/etc/modules/SloppyDOM.pmod:1.16
Rev: server/etc/modules/StateHandler.pmod:1.13
Rev: server/etc/modules/VFS.pmod:1.7
Rev: server/etc/modules/Variable.pmod/Date.pike:1.9
Rev: server/etc/modules/Variable.pmod/Email.pike:1.15
Rev: server/etc/modules/Variable.pmod/Image.pike:1.5
Rev: server/etc/modules/Variable.pmod/Language.pike:1.2
Rev: server/etc/modules/Variable.pmod/MapLocation.pike:1.6
Rev: server/etc/modules/Variable.pmod/Mapping.pike:1.9
Rev: server/etc/modules/Variable.pmod/Upload.pike:1.5
Rev: server/etc/modules/Variable.pmod/module.pmod:1.108
Rev: server/etc/modules/_NewLDAP.pmod/client.pike:1.11(DEAD)
Rev: server/etc/modules/_NewLDAP.pmod/ldap_globals.h:1.1(DEAD)
Rev: server/etc/modules/_NewLDAP.pmod/ldap_privates.pmod:1.1(DEAD)
Rev: server/etc/modules/_NewLDAP.pmod/module.pmod:1.4(DEAD)
Rev: server/etc/modules/_NewLDAP.pmod/protocol.pike:1.1(DEAD)
Rev: server/etc/roxen_master.pike:1.150
Rev: server/etc/test/tests/ftp/ftp_test.pike:1.4
Rev: server/font_handlers/freetype.pike:1.30
Rev: server/font_handlers/imagedir.pike:1.15
Rev: server/font_handlers/imagetar.pike:1.10
Rev: server/font_handlers/ttf.pike:1.18
Rev: server/languages/catala.pike:1.11
Rev: server/languages/chinese.pike:1.2
Rev: server/languages/croatian.pike:1.11
Rev: server/languages/czech.pike:1.18
Rev: server/languages/dutch.pike:1.11
Rev: server/languages/finnish.pike:1.10
Rev: server/languages/french.pike:1.13
Rev: server/languages/german.pike:1.11
Rev: server/languages/hungarian.pike:1.7
Rev: server/languages/italian.pike:1.13
Rev: server/languages/japanese.pike:1.22
Rev: server/languages/maori.pike:1.9
Rev: server/languages/norwegian.pike:1.12
Rev: server/languages/polish.pike:1.8
Rev: server/languages/portuguese.pike:1.11
Rev: server/languages/russian.pike:1.10
Rev: server/languages/serbian.pike:1.10
Rev: server/languages/slovenian.pike:1.17
Rev: server/languages/spanish.pike:1.12
Rev: server/languages/swedish.pike:1.20
Rev: server/modules/configuration/config_tags.pike:1.197
Rev: server/modules/configuration/roxen_test.pike:1.68
Rev: server/modules/configuration/update.pike:1.40
Rev: server/modules/examples/userdb_ex.pike:1.8
Rev: server/modules/filesystems/filesystem.pike:1.157
Rev: server/modules/filesystems/incoming.pike:1.19
Rev: server/modules/filesystems/restrictedfs.pike:1.24
Rev: server/modules/filesystems/sqlfs.pike:1.9
Rev: server/modules/filesystems/userfs.pike:1.71
Rev: server/modules/filters/tableborder.pike:1.13
Rev: server/modules/filters/whitespace_remover.pike:1.4
Rev: server/modules/graphics/business.pike:1.152
Rev: server/modules/graphics/gxml.pike:1.38
Rev: server/modules/graphics/pimage.pike:1.31
Rev: server/modules/graphics/rimage/rimage.pike:1.23
Rev: server/modules/icecast/icecast.pike:1.12
Rev: server/modules/icecast/pl_common.pike:1.9
Rev: server/modules/js-support/javascript_support.pike:1.68
Rev: server/modules/ldap/ldaptag.pike:2.38
Rev: server/modules/ldap/userdb_ldap.pike:1.14
Rev: server/modules/logging/home_logger.pike:1.35
Rev: server/modules/misc/preferred_language.pike:1.32
Rev: server/modules/misc/randomtext.pike:1.10
Rev: server/modules/misc/wapadapter.pike:1.13
Rev: server/modules/misc/webdav.pike:1.38
Rev: server/modules/proxies/connect.pike:1.20
Rev: server/modules/proxies/proxy.pike:1.57
Rev: server/modules/proxies/wais.pike:1.28
Rev: server/modules/scripting/cgi.pike:2.65
Rev: server/modules/scripting/fastcgi.pike:2.13
Rev: server/modules/scripting/perl.pike:2.26
Rev: server/modules/scripting/php.pike:2.5
Rev: server/modules/scripting/piketag.pike:2.38
Rev: server/modules/scripting/servlet.pike:2.24
Rev: server/modules/scripting/webapp.pike:2.32
Rev: server/modules/security/auth_httpbasic.pike:1.12
Rev: server/modules/security/auth_httpcookie.pike:1.12
Rev: server/modules/security/htaccess.pike:1.106
Rev: server/modules/security/userdb_sql.pike:1.10
Rev: server/modules/security/userdb_system.pike:1.12
Rev: server/modules/tags/accessed.pike:1.57
Rev: server/modules/tags/email.pike:1.43
Rev: server/modules/tags/emit_exec.pike:1.4
Rev: server/modules/tags/emit_timerange.pike:1.29
Rev: server/modules/tags/insert_cached_href.pike:1.22
Rev: server/modules/tags/obox.pike:1.41
Rev: server/modules/tags/rxmltags.pike:1.553
Rev: server/modules/tags/wizz.pike:1.10
Rev: server/modules/tags/writefile.pike:1.20
Rev: server/modules/throttling/throttling_byaddress.pike:1.6
Rev: server/modules/throttling/throttling_bytime.pike:1.8
Rev: server/ntroxenloader.pike:1.9
Rev: server/protocols/ftp.pike:2.125
Rev: server/protocols/http.pike:1.561
Rev: server/protocols/prot_hilfe.pike:2.15
Rev: server/protocols/prot_snmp.pike:2.8
Rev: server/sbin/roxen-create-server:1.5
Rev: server/tools/ntroxen/startdll/cmdline.cpp:1.21

5:   #include <config.h>   #include <module.h>   #include <module_constants.h> - constant cvs_version="$Id: prototypes.pike,v 1.218 2008/06/24 12:14:29 mast Exp $"; + constant cvs_version="$Id: prototypes.pike,v 1.219 2008/08/15 12:33:53 mast Exp $";      #ifdef DAV_DEBUG   #define DAV_WERROR(X...) werror(X)
29:    "cvs_version", "Roxen", "ignore_identifiers"   >);    - static class Variable + protected class Variable   {    constant is_variable = 1;    constant type = "Basic";
170:   }      // Simulate an import of useful stuff from Parser.XML.Tree. - static constant SimpleNode = Parser.XML.Tree.SimpleNode; - static constant SimpleRootNode = Parser.XML.Tree.SimpleRootNode; - static constant SimpleHeaderNode = Parser.XML.Tree.SimpleHeaderNode; - static constant SimpleTextNode = Parser.XML.Tree.SimpleTextNode; - static constant SimpleElementNode = Parser.XML.Tree.SimpleElementNode; + protected constant SimpleNode = Parser.XML.Tree.SimpleNode; + protected constant SimpleRootNode = Parser.XML.Tree.SimpleRootNode; + protected constant SimpleHeaderNode = Parser.XML.Tree.SimpleHeaderNode; + protected constant SimpleTextNode = Parser.XML.Tree.SimpleTextNode; + protected constant SimpleElementNode = Parser.XML.Tree.SimpleElementNode;      //! @appears DAVLock   //!
238:    //! As a special case, if the value is @expr{0@} (zero), the lock    //! has infinite duration.    -  static void create(string locktoken, string path, int(0..1) recursive, +  protected void create(string locktoken, string path, int(0..1) recursive,    string|SimpleNode lockscope, string|SimpleNode locktype,    int(0..) expiry_delta, array(SimpleNode) owner)    {
292:    return res;    }    -  static string _sprintf (int flag) +  protected string _sprintf (int flag)    {    return flag == 'O' &&    sprintf ("DAVLock(%O on %O, %s, %s%s)", locktoken, path,
465:    AuthModule find_auth_module( string name );    UserDB find_user_database( string name );    -  static string _sprintf( ) +  protected string _sprintf( )    {    return "Configuration("+name+")";    }
512:   {    // FIXME: _get_iterator()    -  static array _indices() +  protected array _indices()    {    return indices( real_variables );    }    -  static array _values() +  protected array _values()    {    return map( _indices(), `[] );    }    -  static mixed fix_value( mixed what ) +  protected mixed fix_value( mixed what )    {    if( !what ) return what;    if( !arrayp(what) ) return what; // huh
532:    return what*"\0";    }    -  static mixed `[]( string ind ) { +  protected mixed `[]( string ind ) {    return fix_value( real_variables[ ind ] );    }    -  static mixed `->(string ind ) { +  protected mixed `->(string ind ) {    return `[]( ind );    }    -  static mixed `[]=( string ind, mixed what ) { +  protected mixed `[]=( string ind, mixed what ) {    real_variables[ ind ] = ({ what });    return what;    }    -  static mixed `->=(string ind, mixed what ) { +  protected mixed `->=(string ind, mixed what ) {    return `[]=( ind,what );    }    -  static mixed _m_delete( mixed what ) { +  protected mixed _m_delete( mixed what ) {   // report_debug(" _m_delete( %O )\n", what );    return fix_value( m_delete( real_variables, what ) );    }    -  static int _equal( mixed what ) { +  protected int _equal( mixed what ) {    return `==(what);    }    -  static int `==( mixed what ) { +  protected int `==( mixed what ) {    if( mappingp( what ) && (real_variables == what) )    return 1;    }    -  static string _sprintf( int f ) +  protected string _sprintf( int f )    {    switch( f )    {
574:    }    }    -  static this_program `|( mapping what ) +  protected this_program `|( mapping what )    {    foreach( indices(what), string q )`[]=( q,what[q] );    return this_object();    }    -  static this_program `+=( mapping what ) +  protected this_program `+=( mapping what )    {    foreach( indices(what), string q )`[]=( q,what[q] );    return this_object();    }    -  static this_program `+( mapping what ) +  protected this_program `+( mapping what )    {    foreach( indices(what), string q )`[]=( q,what[q] );    return this_object();    }    -  static mapping cast(string to) +  protected mapping cast(string to)    {    if (to[..6]=="mapping")    {
615:    array(string) languages=({});    array(float) qualities=({});    -  static string _sprintf(int c, mapping|void attrs) +  protected string _sprintf(int c, mapping|void attrs)    {    return sprintf("PrefLanguages(%O)", get_languages());    }
729:    RoxenDebug.ObjectMarker __marker = RoxenDebug.ObjectMarker (this);   #endif    -  static array(array(CacheActivationCB|array)) activation_cbs; +  protected array(array(CacheActivationCB|array)) activation_cbs;    // Functions to call when the cache key is activated, i.e. stored    // together with some result in a cache. Zero when the key already    // is active.    -  static void create (void|int activate_immediately) +  protected void create (void|int activate_immediately)    {    if (!activate_immediately) activation_cbs = ({});    }
822:    return 0;    }    -  static string _sprintf (int flag) +  protected string _sprintf (int flag)    {    return flag == 'O' &&    sprintf ("%s(%s)%s",
855:   {    inherit CacheKey;    -  static int flags; +  protected int flags;       int invalidp()    //! Return nonzero if this cache key has been invalidated.
898:   }      // Kludge for resolver problems - static function _charset_decoder_func; + protected function _charset_decoder_func;      string browser_supports_vary(string ignored, RequestID id)   {
908:   // This is a somewhat simplistic regexp that doesn't handle   // quoted-string parameter values correctly. It's only used on content   // types so we know wide strings aren't a problem. - static Regexp ct_charset_search = Regexp (";[ \t\n\r]*charset="); + protected Regexp ct_charset_search = Regexp (";[ \t\n\r]*charset=");      class RequestID   //! @appears RequestID
1102:    //!    //! @seealso    //! @[cookies], @[register_vary_callback()], @[Roxen.get_cookie_callback()] -  static class CookieJar +  protected class CookieJar    {    //! Contains the set of cookies that have been zapped in some way. -  static mapping(string:string) eaten = ([]); +  protected mapping(string:string) eaten = ([]);    -  static void create(string|array(string)|void contents) +  protected void create(string|array(string)|void contents)    {    VARY_WERROR("Initiating cookie jar.\n");    real_cookies = ([]);
1137:    }    }    } -  static string `->(string cookie) +  protected string `->(string cookie)    {    if (supports && zero_type(eaten[cookie])) {    VARY_WERROR("Looking at cookie %O from %s\n",
1155:    }    return real_cookies[cookie];    } -  static string `[](mixed cookie) +  protected string `[](mixed cookie)    {    if (stringp(cookie)) {    return `->(cookie);    }    return UNDEFINED;    } -  static string `->=(string cookie, string value) +  protected string `->=(string cookie, string value)    {    if (zero_type(eaten[cookie])) {    eaten[cookie] = real_cookies[cookie];    }    return real_cookies[cookie] = value;    } -  static string `[]=(mixed cookie, string value) +  protected string `[]=(mixed cookie, string value)    {    // FIXME: Warn if not string?    return `->=(cookie, value);    } -  static string _m_delete(string cookie) +  protected string _m_delete(string cookie)    {    // FIXME: Warn if not string?    if (zero_type(eaten[cookie])) {
1182:    }    return m_delete(real_cookies, cookie);    } -  static array(string) _indices() +  protected array(string) _indices()    {    register_vary_callback("cookie");    return indices(real_cookies);    } -  static array(string) _values() +  protected array(string) _values()    {    register_vary_callback("cookie");    return values(real_cookies);    } -  static int _sizeof() +  protected int _sizeof()    {    register_vary_callback("cookie");    return sizeof(real_cookies);    } -  static mapping(string:string) `+(mapping(string:string) other) +  protected mapping(string:string) `+(mapping(string:string) other)    {    register_vary_callback("cookie");    return real_cookies + other;    } -  static mapping(string:string) ``+(mapping(string:string) other) +  protected mapping(string:string) ``+(mapping(string:string) other)    {    register_vary_callback("cookie");    return other + real_cookies;
1210:       //! Used to retrieve the original set of cookies at    //! protocol cache store time. -  static mapping(string:string) `~() +  protected mapping(string:string) `~()    {    VARY_WERROR("Disconnecting cookie jar.\n");    return real_cookies + eaten;    }    -  static string _sprintf(int fmt) +  protected string _sprintf(int fmt)    {    return fmt == 'O' && sprintf("CookieJar(%O)", real_cookies);    }
1425:    //! the same for all id objects generated by <insert href> tags and    //! similar conditions that invoke @[clone_me()].    -  static void create(Stdio.File fd, Protocol port, Configuration conf){} +  protected void create(Stdio.File fd, Protocol port, Configuration conf){}    void send(string|object what, int|void len){}    -  static SimpleNode xml_data; // XML data for the request. +  protected SimpleNode xml_data; // XML data for the request.       SimpleNode get_xml_data()    {
1444:    }       // Parsed if-header for the request. -  static mapping(string:array(array(array(string)))) if_data; +  protected mapping(string:array(array(array(string)))) if_data;      #ifdef IF_HEADER_DEBUG   #define IF_HDR_MSG(X...) werror (X)
1743:    }    }    -  static string cached_url_base; +  protected string cached_url_base;       string url_base()    //! Returns the base part of the URL, i.e. what should be added in
1890:    }    }    -  static constant http_nontoken_chars = ([ +  protected constant http_nontoken_chars = ([    0:1, 1:1, 2:1, 3:1, 4:1, 5:1, 6:1, 7:1, 8:1, 9:1, 10:1, 11:1, 12:1, 13:1,    14:1, 15:1, 16:1, 17:1, 18:1, 19:1, 20:1, 21:1, 22:1, 23:1, 24:1, 25:1,    26:1, 27:1, 28:1, 29:1, 30:1, 31:1, '(':1, ')':1, '<':1, '>':1, '@':1,
1996:    return removed;    }    -  static MultiStatus multi_status; +  protected MultiStatus multi_status;       MultiStatus get_multi_status()    //! Returns a @[MultiStatus] object that will be used to produce a
2123:    return charset || encoder;    }    -  static string charset_name(function|string what) +  protected string charset_name(function|string what)    {    switch (what) {    case string_to_unicode: return "ISO10646-1";
2132:    }    }    -  static function charset_function(function|string what, int allow_entities) +  protected function charset_function(function|string what, int allow_entities)    {    switch (what) {    case "ISO-10646-1":
2161:    }    }    -  static array(string) join_charset(string old, +  protected array(string) join_charset(string old,    function|string add,    function oldcodec,    int allow_entities)
2498: Inside #if defined(RAM_CACHE)
   file->data = data;    heads->ETag = misc->etag =    sprintf("\"%s\"", -  Crypto.string_to_hex(Crypto.md5()->update(data)->digest())); +  String.string2hex(Crypto.MD5()->update(data)->digest()));    }   #endif /* RAM_CACHE */   
2768:   //! @appears MultiStatus   class MultiStatus   { -  static mapping(string:MultiStatusNode) status_set = ([]); +  protected mapping(string:MultiStatusNode) status_set = ([]);    -  static mapping(string:string) args = ([ +  protected mapping(string:string) args = ([    "xmlns:DAV": "DAV:",    // MS namespace for data types; see comment in    // XMLPropStatNode.add_property. Note: The XML parser in the
2926:    ]);    }    -  class Prefixed (static string href_prefix) +  class Prefixed (protected string href_prefix)    {    MultiStatus get_multi_status() {return MultiStatus::this;}    void add_property(string path, string prop_name,
2959:   }      // Only for protyping and breaking of circularities. - static class PropertySet + protected class PropertySet   {    string path;    RequestID id;
3068:    //! because it's being dropped or reloaded in the admin interface,    //! or the server is being shut down orderly.    -  void ready_to_receive_requests (Configuration conf); +  void ready_to_receive_requests (void|Configuration conf);    //! This function is called after all modules in a configuration    //! have been loaded and @[start]ed. If a function is added later on    //! it's called directly @[start].
3076:    //! When a configuration is loaded on server start, this function is    //! still called before the handler threads are started.    //! +  //! @[conf] is the configuration that the module instance belongs +  //! to, i.e. the same as the return value from @[my_configuration]. +  //!    //! @note    //! This function is intended for things that can't be done in    //! @[start] because all modules might not be loaded by then. There
3197:    //! database.   }    - static mapping(string:function(void:void)) user_sql_inited = ([]); - static Sql.Sql user_mysql; - static void init_user_sql(string table) + protected mapping(string:function(void:void)) user_sql_inited = ([]); + protected Sql.Sql user_mysql; + protected void init_user_sql(string table)   {    string db = all_constants()->REPLICATE?"replicate":"local";    if( !user_mysql )
3258:   }      #ifdef THREADS - static Thread.Mutex mutex = Thread.Mutex(); + protected Thread.Mutex mutex = Thread.Mutex();   #endif      //! @appears User   class User( UserDB database )   { -  static string table; +  protected string table;       string name();    //! The user (short) name
3343:   #define LOCK()   #endif    -  static string module_name( RoxenModule module ) +  protected string module_name( RoxenModule module )    {    if( !module )    // NULL does not work together with indexes, but this is