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.312 2003/12/01 18:03:10 nilsson Exp $ + // $Id: master.pike.in,v 1.313 2003/12/06 10:08:13 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:920:    resolv_debug ("cast_to_program(%O, %O) => %O\n", pname, current_file, ret);    if (programp (ret)) return ret;    error("Cast %O to program failed%s.\n",    pname,    (current_file && current_file!="-") ? sprintf(" in %O",current_file) : "");   }         //! This function is called when an error occurs that is not caught   //! with catch(). - void handle_error(array(mixed)|object trace) + void handle_error(array|object trace)   {    if(mixed x=catch {    werror(describe_backtrace(trace));    }) {    // One reason for this might be too little stack space, which    // easily can occur for "out of stack" errors. It should help to    // tune up the STACK_MARGIN values in interpret.c then.    werror("Error in handle_error in master object:\n");    if(catch {    catch {
pike.git/lib/master.pike.in:1066:    p = low_cast_to_program(oname, current_file, current_handler, 1);    if(!p) return 0;    // NB: p might be a function in a fake_object...    if(!objectp (o=objects[p])) o=objects[p]=p();    return o;   }      //! This function is called when the drivers wants to cast a string   //! to an object because of an implict or explicit cast. This function   //! may also receive more arguments in the future. - object cast_to_object(string oname, string current_file) + object cast_to_object(string oname, string current_file, +  object|void current_handler)   {    resolv_debug ("cast_to_object(%O, %O)\n", oname, current_file);    INC_RESOLV_MSG_DEPTH(); -  object o = low_cast_to_object(oname, current_file); +  object o = low_cast_to_object(oname, current_file, current_handler);    DEC_RESOLV_MSG_DEPTH();    resolv_debug ("cast_to_object(%O, %O) => %O\n", oname, current_file, o);    if (objectp (o)) return o;    error("Cast %O to object failed%s.\n",    oname,    (current_file && current_file!="-") ? sprintf(" in %O",current_file) : "");   }      // Marker used for negative caching in module caches.   // FIXME: Won't this cause problems when inheriting "/master"?
pike.git/lib/master.pike.in:2724:    }   }         static object _charset_mod;      //! This function is called by cpp() when it wants to do   //! character code conversion.   string decode_charset(string data, string charset)   { -  // werror(sprintf("decode_charset(%O, %O)\n", data, charset)); +  // werror("decode_charset(%O, %O)\n", data, charset);       if (!_charset_mod) {    object mod = [object]resolv("Locale");       _charset_mod = [object](mod && mod["Charset"]);    if (!_charset_mod)    compile_cb_error ("Cannot handle charset - no Locale.Charset module found.");    }      
pike.git/lib/master.pike.in:3215:   //! Return a readable message that describes where the backtrace   //! @[trace] was made (by @[backtrace]).   //!   //! It may also be an error object or array (typically caught by a   //! @[catch]), in which case the error message also is included in the   //! description.   //!   //! @seealso   //! @[backtrace()], @[describe_error()], @[catch()], @[throw()]   //! - string describe_backtrace(mixed trace, void|int linewidth) + string describe_backtrace(array|object trace, void|int linewidth)   {    int e;    string ret;    int backtrace_len=((int)getenv("PIKE_BACKTRACE_LEN")) || bt_max_string_len;       if(!linewidth)    {    linewidth=99999;    catch    {