summaryrefslogtreecommitdiff
path: root/MLKReadEvalPrintLoop.m
diff options
context:
space:
mode:
authorMatthias Benkard <mulk@minimulk.mst-plus>2008-08-18 16:13:54 +0200
committerMatthias Benkard <mulk@minimulk.mst-plus>2008-08-18 16:13:54 +0200
commiteec88254d7e37ecb07b0503a9e87abfb81ce2460 (patch)
treed96aa76e24b4b090383623134b35eaf6a10f3431 /MLKReadEvalPrintLoop.m
parent5cd4de577c08637cb5d78d1c3376b1ff80e74065 (diff)
parent054dc70426505f72a1e9856c9e48c0ae3349d68d (diff)
Merge branch 'master' of http://matthias.benkard.de/code/mulklisp
Diffstat (limited to 'MLKReadEvalPrintLoop.m')
-rw-r--r--MLKReadEvalPrintLoop.m15
1 files changed, 14 insertions, 1 deletions
diff --git a/MLKReadEvalPrintLoop.m b/MLKReadEvalPrintLoop.m
index 2ddc5d7..fc0d8ef 100644
--- a/MLKReadEvalPrintLoop.m
+++ b/MLKReadEvalPrintLoop.m
@@ -31,7 +31,12 @@
#import <Foundation/NSNull.h>
#import <Foundation/NSString.h>
-#import <histedit.h>
+#ifdef GNUSTEP
+#import <Foundation/NSDebug.h>
+#endif
+
+#include <histedit.h>
+#include <string.h>
static int _argc;
@@ -132,7 +137,13 @@ static const char *prompt (EditLine *e) {
if (strcmp (line, ":q\n") == 0 || strncmp (line, ":q ", 3) == 0)
break;
+#if 1
NS_DURING
+#else
+ GSDebugAllocationActive (YES);
+ [NSObject enableDoubleReleaseCheck:YES];
+ NSZombieEnabled = YES;
+#endif
{
int i;
@@ -150,6 +161,7 @@ static const char *prompt (EditLine *e) {
printf ("%s\n", [MLKPrintToString (denullify (result)) UTF8String]);
}
}
+#if 1
NS_HANDLER
{
printf ("Caught an unhandled exception.\nName: %s\nReason: %s\n",
@@ -157,6 +169,7 @@ static const char *prompt (EditLine *e) {
[[localException reason] UTF8String]);
}
NS_ENDHANDLER;
+#endif
LRELEASE (pool);
}