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.430 2008/05/30 22:26:56 nilsson Exp $ + // $Id: master.pike.in,v 1.431 2008/06/01 14:41:25 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    -  + //! @appears predef::MasterObject + //! + //! Master control program for Pike. + //! + //! @seealso + //! @[predef::master()], @[predef::replace_master()] +    // --- Some configurable parameters      #define PIKE_AUTORELOAD   #define GETCWD_CACHE   #define FILE_STAT_CACHE      // This define is searched and replaced by bin/install.pike.   #undef PIKE_MODULE_RELOC      #ifndef PIKE_WARNINGS
pike.git/lib/master.pike.in:247:    }    }       string describe_program(program p);    string describe_backtrace(array(mixed) trace);    class Codec {};       object get_compat_master(int major, int minor);   }    + //! Pike 7.0 master compatibility interface. + //! + //! Most of the interface is implemented via mixin. + //! + //! @seealso + //! @[get_compat_master()], @[master()]   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    extern object o;    string fakeroot(string s);   #endif   #ifdef PIKE_AUTORELOAD
pike.git/lib/master.pike.in:461:    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;    }   }    + //! Pike 7.2 master compatibility interface. + //! + //! Most of the interface is implemented via mixin. + //! + //! @seealso + //! @[get_compat_master()], @[master()]   static class Pike_7_2_master   {    inherit Pike_7_0_master;   #ifdef PIKE_MODULE_RELOC    string relocate_module(string s);    string unrelocate_module(string s);   #endif    extern int compat_major;    extern int compat_minor;   #ifdef FILE_STAT_CACHE
pike.git/lib/master.pike.in:507:    {    return UNDEFINED;    }    object get_compat_master(int major, int minor)    {    if ((major > 0) || (minor > 6)) return Pike_7_0_master::this;    return Pike_7_0_master::get_compat_master(major, minor);    }   }    + //! Pike 7.4 master compatibility interface. + //! + //! Most of the interface is implemented via mixin. + //! + //! @seealso + //! @[get_compat_master()], @[master()]   static class Pike_7_4_master   {    inherit Pike_7_2_master;    local static object Pike_7_4_compat_handler;    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;    return Pike_7_2_master::get_compat_master(major, minor);    }   }    -  + //! Pike 7.6 master compatibility interface. + //! + //! Most of the interface is implemented via mixin. + //! + //! @seealso + //! @[get_compat_master()], @[master()]   static class Pike_7_6_master   {    inherit Pike_7_4_master;    local static 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);    }    object get_compat_master(int major, int minor)    {    if ((major == 7) && (minor > 2)) return Pike_7_4_master::this;    return Pike_7_4_master::get_compat_master(major, minor);    }   }    - // Namespaces for compat masters. + //! Namespaces for compat masters. + //! + //! This inherit is used to provide compatibility namespaces + //! for @[get_compat_master()]. + //! + //! @seealso + //! @[get_compat_master()]   static inherit Pike_7_6_master;      //! @appears error   //! Throws an error. A more readable version of the code   //! @expr{throw( ({ sprintf(f, @@args), backtrace() }) )@}.   void error(string f, mixed ... args) {    if (sizeof(args)) f = sprintf(f, @args);    throw( ({ f, backtrace()[..<1] }) );   }   
pike.git/lib/master.pike.in:5301:   }      string _sprintf(int t)   {    switch(t) {    case 't': return "master";    case 'O': return "master()";    }   }    + //! 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_compat_handler()], @[master()]   local 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;    return Pike_7_6_master::get_compat_master(major, minor);   } -  +