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.230 2002/11/28 02:12:25 mast Exp $ + // $Id: master.pike.in,v 1.231 2002/11/28 20:11:14 nilsson 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:747:    if(stringp(prog))    {    if(program p=cast_to_program(prog, backtrace()[-2][0]))    return p(@args);    else    error("Failed to find program %s.\n", prog);    }    return prog(@args);   }    - //! @decl object clone(string|program prog, mixed ... args) - //! @appears clone - //! - //! Alternate name for the function @[new()]. - //! - //! @note - //! Considered obsolete. - //! - //! @seealso - //! @[new()] -  - function clone = new; -  +    /* This array contains the names of the functions    * that a replacing master-object may want to override.    */   constant master_efuns = ({    "error",    "basename",    "dirname",    "is_absolute_path",    "explode_path",   
pike.git/lib/master.pike.in:781:    "compile_file",    "add_include_path",    "remove_include_path",    "add_module_path",    "remove_module_path",    "add_program_path",    "remove_program_path",    "describe_backtrace",    "describe_error",    "new", -  "clone", +     "normalize_path",    "getenv",    "putenv",      #ifdef GETCWD_CACHE    "cd",    "getcwd",   #endif   });      string include_prefix;      /* Note that create is called before add_precompiled_program    */   void create()   {    object o = this_object();    -  foreach(master_efuns, string e) { -  if (o[e]) { +  foreach(master_efuns, string e) +  if (o[e])    add_constant(e, o[e]); -  } else { -  throw(({ sprintf("Function %O is missing from master.pike.\n", e), -  backtrace() })); -  } -  } +  else +  error("Function %O is missing from master.pike.\n", e);       add_constant("strlen", sizeof);    add_constant("write", _static_modules.files()->_stdout->write);      #define CO(X) add_constant(#X,_static_modules.Builtin.__backend->X)    CO(call_out);    CO(_do_call_outs);    CO(find_call_out);    CO(remove_call_out);    CO(call_out_info);