summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MLKInterpreter.m1
-rw-r--r--MLKStream.h4
-rw-r--r--MLKStream.m7
3 files changed, 8 insertions, 4 deletions
diff --git a/MLKInterpreter.m b/MLKInterpreter.m
index a2aa81e..b0c38ef 100644
--- a/MLKInterpreter.m
+++ b/MLKInterpreter.m
@@ -38,6 +38,7 @@
#import "util.h"
#import <Foundation/NSArray.h>
+#import <Foundation/NSAutoreleasePool.h>
#import <Foundation/NSException.h>
#import <Foundation/NSNull.h>
#import <Foundation/NSString.h>
diff --git a/MLKStream.h b/MLKStream.h
index 7d579ae..3e4f597 100644
--- a/MLKStream.h
+++ b/MLKStream.h
@@ -17,9 +17,9 @@
*/
#import "MLKLispValue.h"
-#import <Foundation/Foundation.h>
-@class NSInputStream, NSOutputStream;
+#import <Foundation/NSStream.h>
+#import <Foundation/NSString.h>
@interface MLKStream : MLKLispValue
diff --git a/MLKStream.m b/MLKStream.m
index e0090d0..6448bdc 100644
--- a/MLKStream.m
+++ b/MLKStream.m
@@ -22,6 +22,9 @@
#import <Foundation/NSException.h>
+#include <unistd.h>
+#include <stdlib.h>
+
@implementation MLKStream
-(MLKStream *) init;
@@ -66,7 +69,7 @@
-(unichar) readChar
{
uint8_t *buffer;
- int i;
+ size_t i;
unichar retval;
if (_charCached)
@@ -92,7 +95,7 @@
//NSLog (@"%@", _input);
- buffer = realloc (buffer, i+1);
+ buffer = (uint8_t *) realloc (buffer, i+1);
bytes_read = [_input read:(buffer+i) maxLength:1];
//NSLog (@"%d bytes read", bytes_read);