pike.git / lib / master.pike.in

version» Context lines:

pike.git/lib/master.pike.in:1:   /* -*- Pike -*-    * -  * $Id: master.pike.in,v 1.102 2000/02/29 03:15:43 hubbe Exp $ +  * $Id: master.pike.in,v 1.103 2000/03/20 05:18:21 mast Exp $    *    * Master-file for Pike.    *    * Based on master.pike 1.67.    */      // Some configurable parameters useful for debugging      #define PIKE_AUTORELOAD   
pike.git/lib/master.pike.in:1319:    if(string tmp=describe_program(m)) return tmp;    if(object o=function_object(m))    return (describe_object(o)||"")+"->"+function_name(m);    else    return function_name(m) || "function";       case "program":    if(string tmp=describe_program(m)) return tmp;    return typ;    -  case "object": +  default: +  if (objectp(m))    if(string tmp=describe_object(m)) return tmp;    return typ; -  -  default: -  return typ; +     }   }      string stupid_describe_comma_list(array x, int maxlen)   {    string ret="";       if(!sizeof(x)) return "";    if(maxlen<0) return ",,,"+sizeof(x);   
pike.git/lib/master.pike.in:1594:   }      // Returns a short description of a backtrace, containing only the   // error message.   string describe_error (mixed trace)   {    if((arrayp(trace) && sizeof(trace)==2 && stringp(trace[0])) ||    (objectp(trace) && trace->is_generic_error))    {    if (catch { -  return trace[0] || "No error message!\n"; +  return trace[0] || "No error message.\n";    }) {    return "Error indexing backtrace!\n";    }    }    return sprintf ("Backtrace is of unknown type %t!\n", trace);   }         class Codec   {    mapping f=all_constants();       string nameof(mixed x)    {    if(mixed tmp=search(f,x))    return "efun:"+tmp;    -  switch(sprintf("%t",x)) -  { -  case "program": +  if (programp(x)) {    if(mixed tmp=search(programs,x))    return tmp;       if(mixed tmp=search(values(_static_modules), x))    return "_static_modules."+(indices(_static_modules)[tmp]); -  break; -  -  case "object": +  } +  else if (objectp(x))    if(mixed tmp=search(objects,x))    if(tmp=search(programs,tmp))    return tmp; -  break; -  } +     return ([])[0];    }       function functionof(string x)    {    if(sscanf(x,"efun:%s",x)) return f[x];    return 0;    }       object objectof(string x)