summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <matthias@benkard.de>2008-08-09 10:21:17 +0200
committerMatthias Andreas Benkard <matthias@benkard.de>2008-08-09 10:21:17 +0200
commit28f00343ce1fa21f4559bac70e58b723e2d59a6b (patch)
tree3690aeef6e75f893eec8cd4da31d41edf95c27ee
parentae62369312153b5e0f11eb8284a057f70b1647e7 (diff)
Add REPL command :q.
-rw-r--r--MLKReadEvalPrintLoop.m3
1 files changed, 3 insertions, 0 deletions
diff --git a/MLKReadEvalPrintLoop.m b/MLKReadEvalPrintLoop.m
index f83ff10..2ddc5d7 100644
--- a/MLKReadEvalPrintLoop.m
+++ b/MLKReadEvalPrintLoop.m
@@ -129,6 +129,9 @@ static const char *prompt (EditLine *e) {
history (commands, &event, H_ENTER, line);
+ if (strcmp (line, ":q\n") == 0 || strncmp (line, ":q ", 3) == 0)
+ break;
+
NS_DURING
{
int i;