From a8d50067ec981e182ca9e45f93fc6f0f3d7f6c53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=BCbinette=20=28Hubbe=29?= <hubbe@hubbe.net> Date: Fri, 17 Jan 1997 11:01:54 -0800 Subject: [PATCH] Now works Rev: bin/hilfe:1.3 --- bin/hilfe | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/bin/hilfe b/bin/hilfe index 298463675c..9a60fad6dc 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) ? ">> " : "> ")) -- GitLab