diff --git a/bin/hilfe b/bin/hilfe index 298463675cc73818bffcc3a45ab9851ec772c643..9a60fad6dc1a2e7f300274a35a158026a6f6866f 100755 --- a/bin/hilfe +++ b/bin/hilfe @@ -36,7 +36,6 @@ object eval(string f) object o; mixed err; prog=("#pragma unpragma_strict_types\n#pragma all_inline\n"+ - "static object ___hilfe=previous_object();\n"+ "static mapping ___variables=___hilfe->query_variables();\n"+ map(indices(variables),lambda(string f) { return sprintf("mixed %s=___variables[\"%s\"];",f,f); })*"\n"+ @@ -49,7 +48,8 @@ object eval(string f) #ifdef DEBUG write("program:"+prog); #endif - if(err=catch(o=clone(compile_string(prog)))) + program p; + if(err=catch(p=compile_string(prog))) { #ifdef DEBUG write(describe_backtrace(err)); @@ -57,6 +57,11 @@ object eval(string f) #endif return 0; } + if(err=catch(o=clone(p))) + { + write(describe_backtrace(err)); + return 0; + } return o; } @@ -526,6 +531,7 @@ void main(int argc,string *argv) { string s; add_efun("write",my_write); + add_efun("___hilfe",this_object()); print_version(); while(s=readline(strlen(input) ? ">> " : "> "))