pike.git / lib / master.pike.in

version» Context lines:

pike.git/lib/master.pike.in:1:   // -*- Pike -*-   //   // Master Control Program for Pike.   //   // This file is part of Pike. For copyright information see COPYRIGHT.   // Pike is distributed under GPL, LGPL and MPL. See the file COPYING   // for more information.   // - // $Id: master.pike.in,v 1.453 2008/08/31 20:19:14 grubba Exp $ + // $Id: master.pike.in,v 1.454 2008/09/13 15:31:58 grubba Exp $      #pike __REAL_VERSION__   //#pragma strict_types      // Some programs destroys character pairs beginning with the currency   // symbol when running in chinese locale.   #if "ยค/" != "\244/"   #error "master.pike.in is corrupted."   #endif   
pike.git/lib/master.pike.in:137:   #define resolv_debug(X...) do {} while (0)   #endif // !RESOLV_DEBUG      constant no_value = (<>);   constant NoValue = typeof (no_value);      // Some API compatibility stuff.      //! Pike 0.6 master compatibility interface.   //! - //! Most of the interface is implemented via mixin. + //! Most of the interface is implemented via mixin, + //! or overloading by more recent masters.   //! -  + //! This interface is used for compatibility with + //! all pikes until Pike 0.6. + //!   //! @deprecated predef::MasterObject   //!   //! @seealso   //! @[get_compat_master()], @[master()], @[predef::MasterObject]   protected class Pike_0_6_master   {    int is_absolute_path(string p);    array(string) explode_path(string p);    string dirname(string x);    string basename(string x);
pike.git/lib/master.pike.in:335:       default:    return typ;    }    }       string describe_program(program p);    string describe_backtrace(array(mixed) trace);    class Codec {};    -  object get_compat_master(int major, int minor); +  object get_compat_master(int major, int minor) +  { +  // 0.0 - 0.6 +  if (!major && (minor < 7)) +  return this_program::this; +  return get_compat_master(major, minor);    } -  + }      //! Pike 7.0 master compatibility interface.   //! - //! Most of the interface is implemented via mixin. + //! Most of the interface is implemented via mixin, + //! or overloading by more recent masters.   //! -  + //! This interface is used for compatibility with + //! Pike 0.7 through 7.0. + //!   //! @deprecated predef::MasterObject   //!   //! @seealso   //! @[get_compat_master()], @[master()], @[predef::MasterObject]   class Pike_7_0_master   {    inherit Pike_0_6_master;    constant bt_max_string_len = 1;    constant out_of_date_warning = 1;   #ifdef PIKE_FAKEROOT
pike.git/lib/master.pike.in:556:    return ret;    }   #pragma deprecation_warnings       string describe_object(object o);    string describe_backtrace(array(mixed) trace, void|int linewidth);    string describe_error(mixed trace);       object get_compat_master(int major, int minor)    { -  return Pike_0_6_master::this; +  if (!major && (minor < 7)) +  return Pike_0_6_master::get_compat_master(major, minor); +  // 0.7 - 7.0 +  if ((major < 7) || ((major == 7) && !minor)) +  return this_program::this; +  return get_compat_master(major, minor);    }   }      //! Pike 7.2 master compatibility interface.   //! - //! Most of the interface is implemented via mixin. + //! Most of the interface is implemented via mixin, + //! or overloading by more recent masters.   //! -  + //! This interface is used for compatibility with + //! Pike 7.1 and 7.2. + //!   //! @deprecated predef::MasterObject   //!   //! @seealso   //! @[get_compat_master()], @[master()], @[predef::MasterObject]   protected class Pike_7_2_master   {    inherit Pike_7_0_master;   #ifdef PIKE_MODULE_RELOC    string relocate_module(string s);    string unrelocate_module(string s);
pike.git/lib/master.pike.in:604:    protected string stupid_describe(mixed m, int maxlen);    protected string stupid_describe_comma_list(array x, int maxlen);    class Describer {};    string describe_function(function f);    class CompatResolver {};    int(0..1) asyncp();    class Version {};    extern object currentversion;    extern mapping(object:object) compat_handler_cache;    object get_compilation_handler(int major, int minor); -  string _sprintf(); -  local string _sprintf(int|void t) -  { -  return UNDEFINED; -  } +  string _sprintf(int|void t);    object get_compat_master(int major, int minor)    { -  if ((major > 0) || (minor > 6)) return Pike_7_0_master::this; +  if ((major < 7) || ((major == 7) && (minor < 1)))    return Pike_7_0_master::get_compat_master(major, minor); -  +  // 7.1 & 7.2 +  if ((major == 7) && (minor < 3)) +  return this_program::this; +  return get_compat_master(major, minor);    }   }      //! Pike 7.4 master compatibility interface.   //! - //! Most of the interface is implemented via mixin. + //! Most of the interface is implemented via mixin, + //! or overloading by more recent masters.   //! -  + //! This interface is used for compatibility with + //! Pike 7.3 and 7.4. + //!   //! @deprecated predef::MasterObject   //!   //! @seealso   //! @[get_compat_master()], @[master()], @[predef::MasterObject]   protected class Pike_7_4_master   {    inherit Pike_7_2_master;    local protected object Pike_7_4_compat_handler;   #ifdef RESOLV_DEBUG    void resolv_debug (sprintf_format fmt, sprintf_args... args);
pike.git/lib/master.pike.in:672:    string _sprintf(int t);    local mixed resolv(string identifier, string|void current_file)    {    if (!Pike_7_4_compat_handler) {    Pike_7_4_compat_handler = global::get_compilation_handler(7, 4);    }    return Pike_7_4_compat_handler->resolv(identifier, current_file);    }    object get_compat_master(int major, int minor)    { -  if ((major == 7) && (minor > 0)) return Pike_7_2_master::this; +  if ((major < 7) || ((major == 7) && (minor < 3)))    return Pike_7_2_master::get_compat_master(major, minor); -  +  // 7.3 & 7.4 +  if ((major == 7) && (minor < 5)) +  return this_program::this; +  return get_compat_master(major, minor);    }   }      //! Pike 7.6 master compatibility interface.   //! - //! Most of the interface is implemented via mixin. + //! Most of the interface is implemented via mixin, + //! or overloading by more recent masters.   //! -  + //! This interface is used for compatibility with + //! Pike 7.5 and 7.6. + //!   //! @deprecated predef::MasterObject   //!   //! @seealso   //! @[get_compat_master()], @[master()], @[predef::MasterObject]   protected class Pike_7_6_master   {    inherit Pike_7_4_master;    local protected object Pike_7_6_compat_handler;    local mixed resolv(string identifier, string|void current_file)    {    if (!Pike_7_6_compat_handler) {    Pike_7_6_compat_handler = global::get_compilation_handler(7, 6);    }    return Pike_7_6_compat_handler->resolv(identifier, current_file);    }    array get_backtrace (object|array err);    object get_compat_master(int major, int minor)    { -  if ((major == 7) && (minor > 2)) return Pike_7_4_master::this; +  if ((major < 7) || ((major == 7) && (minor < 5)))    return Pike_7_4_master::get_compat_master(major, minor); -  +  // 7.5 & 7.6 +  if ((major == 7) && (minor < 7)) +  return this_program::this; +  return get_compat_master(major, minor);    }   }      //! Namespaces for compat masters.   //!   //! This inherit is used to provide compatibility namespaces   //! for @[get_compat_master()].   //!   //! @seealso   //! @[get_compat_master()]
pike.git/lib/master.pike.in:5576:    }   }      //! Return a master object compatible with the specified version of Pike.   //!   //! This function is used to implement the various compatibility versions   //! of @[master()].   //!   //! @seealso   //! @[get_compilation_handler()], @[master()] - local object get_compat_master(int major, int minor) + object get_compat_master(int major, int minor)   { -  if ((major > 7) || ((major == 7) && (minor > 6))) return this; -  if ((major == 7) && (minor > 4)) return Pike_7_6_master::this; +  if ((major < 7) || ((major == 7) && (minor < 7)))    return Pike_7_6_master::get_compat_master(major, minor); -  +  // 7.7 and later. +  return this;   }