pike.git / lib / master.pike.in

version» Context lines:

pike.git/lib/master.pike.in:1: - /* $Id: master.pike.in,v 1.61 1999/10/15 23:07:40 hubbe Exp $ + /* $Id: master.pike.in,v 1.62 1999/10/15 23:13:49 hubbe Exp $    *    * Master-file for Pike.    *    * Based on master.pike 1.67.    */      // Some configurable parameters useful for debugging      #define PIKE_AUTORELOAD      // Used by describe_backtrace() et al.   #if !defined(BT_MAX_STRING_LEN) || (BT_MAX_STRING_LEN <= 0)   #undef BT_MAX_STRING_LEN - #define BT_MAX_STRING_LEN 255 + #define BT_MAX_STRING_LEN 200   #endif /* !defined(BT_MAX_STRING_LEN) || (BT_MAX_STRING_LEN <= 0) */      /*    * Functions begin here.    */      int is_absolute_path(string p)   {   #ifdef __NT__    p=replace(p,"\\","/");
pike.git/lib/master.pike.in:1304:   }      /* It is possible that this should be a real efun,    * it is currently used by handle_error to convert a backtrace to a    * readable message.    */   string describe_backtrace(mixed 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    {    linewidth=_static_modules.files()->_stdin->tcgetattr()->columns;    };    }       if((arrayp(trace) && sizeof(trace)==2 && stringp(trace[0])) ||
pike.git/lib/master.pike.in:1374:    if(sizeof(tmp)>=3)    {    if(functionp(tmp[2]))    data = function_name(tmp[2]);    else if (stringp(tmp[2])) {    data= tmp[2];    } else    data ="unknown function";       data+="("+ -  stupid_describe_comma_list(tmp[3..], BT_MAX_STRING_LEN)+ +  stupid_describe_comma_list(tmp[3..], backtrace_len)+    ")";       if(sizeof(pos)+sizeof(data) < linewidth-4)    {    row=sprintf("%s: %s",pos,data);    }else{    row=sprintf("%s:\n%s",pos,sprintf(" %*-/s",linewidth-6,data));    }    }    }