23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#import "OFDate.h"
#import "OFApplication.h"
#import "OFReadFailedException.h"
#import "OFWriteFailedException.h"
#import "autorelease.h"
OFStdIOStream *of_stdin = nil;
OFStdIOStream *of_stdout = nil;
OFStdIOStream *of_stderr = nil;
@interface OFStdIOStream (OF_PRIVATE_CATEGORY)
- (instancetype)OF_initWithFileDescriptor: (int)fd;
|
>
|
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
#import "OFDate.h"
#import "OFApplication.h"
#import "OFReadFailedException.h"
#import "OFWriteFailedException.h"
#import "autorelease.h"
#import "macros.h"
OFStdIOStream *of_stdin = nil;
OFStdIOStream *of_stdout = nil;
OFStdIOStream *of_stderr = nil;
@interface OFStdIOStream (OF_PRIVATE_CATEGORY)
- (instancetype)OF_initWithFileDescriptor: (int)fd;
|
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
of_stdin = [[OFStdIOStream alloc] OF_initWithFileDescriptor: 0];
of_stdout = [[OFStdIOStream alloc] OF_initWithFileDescriptor: 1];
of_stderr = [[OFStdIOStream alloc] OF_initWithFileDescriptor: 2];
}
- init
{
@try {
[self doesNotRecognizeSelector: _cmd];
} @catch (id e) {
[self release];
@throw e;
}
abort();
}
- (instancetype)OF_initWithFileDescriptor: (int)fd
{
self = [super init];
_fd = fd;
|
<
<
<
<
<
<
|
<
|
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
of_stdin = [[OFStdIOStream alloc] OF_initWithFileDescriptor: 0];
of_stdout = [[OFStdIOStream alloc] OF_initWithFileDescriptor: 1];
of_stderr = [[OFStdIOStream alloc] OF_initWithFileDescriptor: 2];
}
- init
{
OF_INVALID_INIT_METHOD
}
- (instancetype)OF_initWithFileDescriptor: (int)fd
{
self = [super init];
_fd = fd;
|