diff options
author | Matthias Benkard <mulk@minimulk.mst-plus> | 2008-08-08 14:16:28 +0200 |
---|---|---|
committer | Matthias Benkard <mulk@minimulk.mst-plus> | 2008-08-08 14:16:28 +0200 |
commit | 8478027006b9694404450960ca39078842f0555d (patch) | |
tree | d6359661a6da8a48cc0ca89124f00a2488eab3fc | |
parent | 717ac56d3b5dcd87874819c39c51a871296d979c (diff) |
Minor cleanups.
-rw-r--r-- | MLKInterpreter.m | 1 | ||||
-rw-r--r-- | MLKStream.h | 4 | ||||
-rw-r--r-- | MLKStream.m | 7 |
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); |