d5190b1997-02-10Fredrik Hübinette (Hubbe) inherit Array; inherit Stdio; inherit String; inherit Process;
c2a4061997-02-06Fredrik Hübinette (Hubbe)  #define error(X) throw( ({ (X), backtrace()[0..sizeof(backtrace())-2] }) ) varargs int member_array(mixed needle,mixed *haystack,int start) { return search(haystack,needle,start); } object previous_object() { int e; mixed **trace; object o,ret; trace=backtrace(); o=function_object(trace[-2][2]); for(e=sizeof(trace)-3;e>=0;e--) { if(!trace[e][2]) continue; ret=function_object(trace[e][2]); if(o!=ret) return ret; } return 0; } function this_function() { return backtrace()[-2][2]; } function get_function(object o, string a) { mixed ret; ret=o[a]; return functionp(ret) ? ret : 0; } string *map_regexp(string *s, string reg) {
16a0c31997-04-09Niels Möller  object(Regexp) regexp = Regexp(reg); s=filter(s,regexp->match);
c2a4061997-02-06Fredrik Hübinette (Hubbe)  return s; } constant PI = 3.1415926535897932384626433832795080;
d888c51997-03-04Fredrik Hübinette (Hubbe) function all_efuns = all_constants; function explode = `/; function filter_array = filter; function map_array = map; function implode = `*; function m_indices = indices; function m_sizeof = sizeof; function m_values = values; function strstr = search; function sum = `+; function add_efun = add_constant; function l_sizeof = sizeof; function listp = multisetp; function mklist = mkmultiset; function aggregate_list = aggregate_multiset;
c2a4061997-02-06Fredrik Hübinette (Hubbe) #if efun(gethostname)
d888c51997-03-04Fredrik Hübinette (Hubbe) function query_host_name=gethostname;
c2a4061997-02-06Fredrik Hübinette (Hubbe) #endif