pike.git / lib / master.pike.in

version» Context lines:

pike.git/lib/master.pike.in:1:   /* -*- Pike -*-    * -  * $Id: master.pike.in,v 1.103 2000/03/20 05:18:21 mast Exp $ +  * $Id: master.pike.in,v 1.104 2000/03/23 20:05:09 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:1266:    if(o->open(f,"r"))    return o->read();   }      int clipped=0;   int canclip=0;      // FIXME   string stupid_describe(mixed m, int maxlen)   { -  switch(string typ=sprintf("%t",m)) +  string typ; +  if (catch (typ=sprintf("%t",m))) +  typ = "object"; // Object with a broken _sprintf(), probably. +  switch(typ)    {    case "int":    case "float":    return (string)m;       case "string":    canclip++;    if(sizeof(m) < maxlen)    {    string t = sprintf("%O", m);
pike.git/lib/master.pike.in:1426:    }    }       return ret;   }      string describe_object(object o)   {    string s;    if(!o) return 0; -  /* -  // This seems broken. Maybe objects should be programs here, but -  // that's essentially what the call to describe_program() below -  // does. /mast -  if(s=search(objects,object_program(o))) -  { -  if(sscanf(reverse(s),"%s.%s",string ext,string rest) && ext=="domp") -  return EXPLODE_PATH(reverse(rest))[-1]; -  return s; -  } -  */ +  if (!catch(s=sprintf("%O",o)) && stringp(s)) return s;    if(( s=describe_program(object_program(o)) ))    return s+"()";    return 0;   }      string describe_program(program p)   {    string s;    if(!p) return 0;    if(s=search(programs,p))
pike.git/lib/master.pike.in:1569:    }else{    row=sprintf("%s:\n%s",pos,sprintf(" %*-/s",linewidth-6,data));    }    } else {    row = pos;    }    }    else    {    if (tmp) { -  row = sprintf("%O", tmp); +  if (catch (row = sprintf("%O", tmp))) +  row = describe_program(object_program(tmp)) + " with broken _sprintf()";    } else {    row = "Destructed object";    }    }    }) {    row += sprintf("Error indexing backtrace line %d (%O)!", e, err[1]);    }    ret += row + "\n";    }    }