26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
#import "macros.h"
#import "asprintf.h"
@implementation OFStream
- init
{
self = [super init];
if (isa == [OFStream class])
@throw [OFNotImplementedException newWithClass: isa
selector: _cmd];
cache = NULL;
wBuffer = NULL;
return self;
}
|
<
<
|
>
>
|
>
>
>
|
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
#import "macros.h"
#import "asprintf.h"
@implementation OFStream
- init
{
if (isa == [OFStream class]) {
Class c = isa;
[self release];
@throw [OFNotImplementedException newWithClass: c
selector: _cmd];
}
self = [super init];
cache = NULL;
wBuffer = NULL;
return self;
}
|
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
|
ret_len--;
@try {
ret = [OFString
stringWithCString: ret_c
encoding: encoding
length: ret_len];
} @catch (OFException *e) {
/*
* Append data to cache to
* prevent loss of data due to
* wrong encoding.
*/
cache = [self
resizeMemory: cache
|
|
|
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
|
ret_len--;
@try {
ret = [OFString
stringWithCString: ret_c
encoding: encoding
length: ret_len];
} @catch (id e) {
/*
* Append data to cache to
* prevent loss of data due to
* wrong encoding.
*/
cache = [self
resizeMemory: cache
|