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.256 2003/02/26 16:35:09 mast Exp $ + // $Id: master.pike.in,v 1.257 2003/02/27 14:27:35 grubba Exp $      #pike __REAL_VERSION__      // Some programs destroys character pairs beginning with the currency   // symbol when running in chinese locale.   #if "ยค/" != "\244/"   #error "master.pike.in is corrupted."   #endif      // --- Some configurable parameters
pike.git/lib/master.pike.in:571:    case "":    case ".pike":    foreach(query_precompiled_names(fname), string oname) {    if(Stat s2=master_file_stat(fakeroot(oname)))    {    if(s2[1]>=0 && s2[3]>=s[3])    {    mixed err=catch {    AUTORELOAD_CHECK_FILE(oname);    ret = decode_value(master_read_file(oname), -  Codec(fname, mkobj)); +  (handler && handler->get_codec || +  get_codec)(fname, mkobj));   #ifdef RESOLV_DEBUG    werror ("low_findprog: %s returning decoded dump\n", fname);   #endif    return programs[fname] = ret;       };    m_delete(programs, fname);    if (handler && handler->compile_warning) {    handler->compile_warning(oname, 0,    sprintf("Decode failed:\n"
pike.git/lib/master.pike.in:936:       class module_checker    {    int `!()    {   #ifdef MODULE_TRACE    werror("%*ndirnode(%O)->module_checker()->`!()\n",    sizeof(backtrace()),dirname);   #endif    // Pretend not to exist for now... -  module=0; +  // module=0;    if(module=findmodule(dirname+"/module", handler))    {    if(mixed tmp=module->_module_value)    module=tmp;       /* This allows for `[] to have side effects first time    * it is called. (Specifically, the Calendar module uses    * this    */    cache=([]);
pike.git/lib/master.pike.in:2889:    if(sscanf(x,"resolv:%s",x)) return [function]resolv(x);    return 0;    }       object objectof(string x)    {    if(sscanf(x,"efun:%s",x)) return [object]f[x];    if(sscanf(x,"resolv:%s",x)) return [object]resolv(x);    if(sscanf(x,"mpath:%s",x))    foreach(pike_module_path, string path) { -  object ret = low_cast_to_object(combine_path(path,x),0); +  object ret = low_cast_to_object(combine_path(path,x),0, +  this_object());    if (objectp (ret)) return ret;    } -  return cast_to_object(x,0); +  return low_cast_to_object(x, 0, this_object());    }       program programof(string x)    {    if(sscanf(x,"efun:%s",x)) return [program]f[x];    if(sscanf(x,"resolv:%s",x)) return [program]resolv(x);    if(sscanf(x,"mpath:%s",x))    foreach(pike_module_path, string path) -  if(program ret=cast_to_program(combine_path(path,x),0)) +  if(program ret=cast_to_program(combine_path(path,x), 0, +  this_object()))    return ret; -  return cast_to_program(x,0); +  return cast_to_program(x, 0, this_object());    }       mixed encode_object(object x)    {    if(x->_encode) return ([function]x->_encode)();    error("Cannot encode objects yet.\n");    }          void decode_object(object o, mixed data)    {    o->_decode(data);    }   }       -  + mapping(string:Codec) codecs = set_weak_flag(([])); + Codec get_codec(string|void fname, int|void mkobj) + { +  string key = fname + "\0" + mkobj; +  if (codecs[key]) return codecs[key]; +  return codecs[key] = Codec(fname, mkobj); + } +  +  +    //! Contains version information about a Pike version.   class Version   {       //! The major and minor parts of the version.    int major;    int minor;       //! @decl void create(int major, int minor)    //! Set the version in the object.