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.272 2003/04/15 18:47:02 nilsson Exp $ + // $Id: master.pike.in,v 1.273 2003/04/29 00:46:52 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:2845:       mapping(string:int) prev_pos = ([]);    array(string) frames = ({});    int loop_start = 0, loop_next, loops;       for(e = sizeof(trace)-1; e>=end; e--)    {    mixed tmp;    string row;    if (array err=[array]catch { -  tmp = trace[e]; +  tmp = ([array]trace)[e];    if(stringp(tmp))    { -  row=tmp; +  row=[string]tmp;    }    else if(arrayp(tmp))    { -  +  array tmp = [array]tmp;    string pos;    if(sizeof(tmp)>=2 && stringp(tmp[0])) {    if (intp(tmp[1])) { -  -  string exact_pos = tmp[0] + ":" + tmp[1]; -  -  pos=trim_file_name(tmp[0])+":"+tmp[1]; +  pos=trim_file_name([string]tmp[0])+":"+(string)tmp[1];    } else { -  pos = sprintf("%s:Bad line %t", trim_file_name(tmp[0]), tmp[1]); +  pos = sprintf("%s:Bad line %t", +  trim_file_name([string]tmp[0]), tmp[1]);    }    }else{ -  mixed desc="Unknown program"; +  string desc="Unknown program";    if(sizeof(tmp)>=3 && functionp(tmp[2]))    {    catch    { -  if(mixed tmp=function_object(tmp[2])) +  if(mixed tmp=function_object([function]tmp[2]))    if(tmp=object_program(tmp)) -  if(tmp=describe_program(tmp)) -  desc=tmp; +  if(tmp=describe_program([program]tmp)) +  desc=[string]tmp;    };    }    pos=desc;    }       string data;       if(sizeof(tmp)>=3)    {    if(functionp(tmp[2])) { -  data = describe_function (tmp[2]); +  data = describe_function ([function]tmp[2]);    }    else if (stringp(tmp[2])) { -  data= tmp[2]; +  data = [string]tmp[2];    } else    data ="unknown function";       data+="("+    desc->describe_comma_list(tmp[3..], backtrace_len)+    ")";       if(sizeof(pos)+sizeof(data) < linewidth-4)    {    row=sprintf("%s: %s",pos,data);
pike.git/lib/master.pike.in:3021:    string nameof(mixed x)    {    if(string s=search(f,x))    return "efun:"+s;       if (programp(x)) {    if(string s=search(programs,x))    return s;       if(int tmp=search(values(_static_modules), x)) -  return "_static_modules."+(indices(_static_modules)[tmp]); +  return "_static_modules."+[string](indices(_static_modules)[tmp]);    }    else if (objectp(x))    if(program p=search(objects,x))    if(string s=search(programs,p))    return s;    return UNDEFINED;    }       function functionof(string x)    {
pike.git/lib/master.pike.in:3071:       mixed encode_object(object x)    {    if(x->_encode) return ([function]x->_encode)();    error("Cannot encode objects yet.\n");    }          void decode_object(object o, mixed data)    { -  o->_decode(data); +  ([function(mixed:void)]o->_decode)(data);    }   }         mapping(string:Codec) codecs = set_weak_flag(([]),1);   Codec get_codec(string|void fname, int|void mkobj)   {    string key = fname + "\0" + mkobj;    if (codecs[key]) return codecs[key];    return codecs[key] = Codec(fname, mkobj);