From 28f00343ce1fa21f4559bac70e58b723e2d59a6b Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Sat, 9 Aug 2008 10:21:17 +0200 Subject: Add REPL command :q. --- MLKReadEvalPrintLoop.m | 3 +++ 1 file changed, 3 insertions(+) (limited to 'MLKReadEvalPrintLoop.m') 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; -- cgit v1.2.3