From 3b94099c717020be8c29588551f61bc67e610d9d Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Thu, 3 Jul 2008 20:23:22 +0200 Subject: Implement COND, LET*, and LIST*. --- MLKReadEvalPrintLoop.m | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'MLKReadEvalPrintLoop.m') diff --git a/MLKReadEvalPrintLoop.m b/MLKReadEvalPrintLoop.m index e9e90db..8c06496 100644 --- a/MLKReadEvalPrintLoop.m +++ b/MLKReadEvalPrintLoop.m @@ -67,6 +67,10 @@ static const char *prompt (EditLine *e) { History *commands; HistEvent event; + NSInputStream *input; + MLKStream *stream; + BOOL success; + editline = el_init (_argv[0], stdin, stdout, stderr); el_set (editline, EL_PROMPT, &prompt); el_set (editline, EL_EDITOR, "emacs"); @@ -75,6 +79,17 @@ static const char *prompt (EditLine *e) { history (commands, &event, H_SETSIZE, 1000); el_set (editline, EL_HIST, history, commands); + printf ("Loading init.lisp.\n"); + input = [NSInputStream inputStreamWithFileAtPath:@"init.lisp"]; + stream = AUTORELEASE ([[MLKStream alloc] initWithInputStream:input]); + + [input open]; + [MLKInterpreter load:stream verbose:YES print:YES]; + success = [MLKInterpreter load:stream verbose:YES print:YES]; + [input close]; + + printf ("Done.\n\n"); + printf ("This is Toilet Lisp, version 0.0.1.\n"); printf ("Please make yourself at home.\n"); -- cgit v1.2.3