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.231 2002/11/28 20:11:14 nilsson Exp $ + // $Id: master.pike.in,v 1.232 2002/11/28 22:03:49 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:718:    }    };    werror("Original error:\n"    "%O\n", trace);    }) {    werror("sprintf() failed to write error.\n");    }    }   }    - //! @decl object new(string|program prog, mixed ... args) - //! @appears new - //! - //! Instantiate a program. - //! - //! A new instance of the class @[prog] will be created. - //! All global variables in the new object be initialized, and - //! then @[lfun::create()] will be called with @[args] as arguments. - //! - //! @note - //! These two functions are considered obsolete, use - //! @code{((program)@[prog])(@@@[args])@} - //! instead. - //! - //! @seealso - //! @[destruct()], @[compile_string()], @[compile_file()] - //! - object new(string|program prog, mixed ... args) - { -  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); - } -  +    /* 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",       "compile_string",    "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", +     "normalize_path",    "getenv",    "putenv",      #ifdef GETCWD_CACHE    "cd",    "getcwd",   #endif   });