From 3a5710bf7cb85da4ba6a327d6149db46e6bed82e Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Thu, 28 Aug 2008 16:26:07 +0200 Subject: Eliminate MLKStream, introduce MLKBinaryStream and MLKCharacterStream. --- MLKReadEvalPrintLoop.m | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'MLKReadEvalPrintLoop.m') diff --git a/MLKReadEvalPrintLoop.m b/MLKReadEvalPrintLoop.m index de2f4f1..0e213b0 100644 --- a/MLKReadEvalPrintLoop.m +++ b/MLKReadEvalPrintLoop.m @@ -16,12 +16,14 @@ * along with this program. If not, see . */ +#import "MLKBinaryStreamCharacterStream.h" #import "MLKDynamicContext.h" #import "MLKInterpreter.h" #import "MLKLexicalEnvironment.h" #import "MLKPackage.h" #import "MLKReadEvalPrintLoop.h" #import "MLKReader.h" +#import "MLKStreamStream.h" #import "NSObject-MLKPrinting.h" #import "runtime-compatibility.h" #import "util.h" @@ -77,7 +79,8 @@ static const char *prompt (EditLine *e) { HistEvent event; NSInputStream *input; - MLKStream *stream; + MLKBinaryStream *filestream; + MLKCharacterStream *stream; BOOL success; NSAutoreleasePool *pool; @@ -103,7 +106,10 @@ static const char *prompt (EditLine *e) { { #endif input = [NSInputStream inputStreamWithFileAtPath:@"init.lisp"]; - stream = LAUTORELEASE ([[MLKStream alloc] initWithInputStream:input]); + filestream = LAUTORELEASE ([[MLKStreamStream alloc] + initWithInputStream:input]); + stream = LAUTORELEASE ([[MLKBinaryStreamCharacterStream alloc] + initWithBinaryStream:filestream]); [input open]; [MLKInterpreter load:stream verbose:YES print:YES]; -- cgit v1.2.3