Overview
Comment: | Separate std{out,err} on MorphOS + libnix |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
0dabf9dc62984102b0a9a13c2d1d3ea3 |
User & Date: | js on 2017-05-28 18:57:48 |
Other Links: | manifest | tags |
Context
2017-05-28
| ||
21:29 | OFFile: Use AmigaDOS API on MorphOS + libnix check-in: 7a0f290eae user: js tags: trunk | |
18:57 | Separate std{out,err} on MorphOS + libnix check-in: 0dabf9dc62 user: js tags: trunk | |
17:56 | OFThread: Use Delay() on MorphOS + libnix check-in: aa6143bdf1 user: js tags: trunk | |
Changes
Modified src/OFStdIOStream+Private.h from [c0cf9d2b80] to [68f2152466].
︙ | |||
15 16 17 18 19 20 21 22 23 24 25 | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | + + + + + + | */ #import "OFStdIOStream.h" OF_ASSUME_NONNULL_BEGIN @interface OFStdIOStream () #if !defined(OF_MORPHOS) || defined(OF_IXEMUL) - (instancetype)of_initWithFileDescriptor: (int)fd OF_METHOD_FAMILY(init); #else - (instancetype)of_initWithFileDescriptor: (long)handle closable: (bool)closable OF_METHOD_FAMILY(init); #endif @end OF_ASSUME_NONNULL_END |
Modified src/OFStdIOStream.h from [76c0240823] to [6bad6405ef].
︙ | |||
27 28 29 30 31 32 33 | 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | + + + - + + + | * instances of this class and need no initialization. */ #ifdef OF_STDIO_STREAM_WIN32_CONSOLE_H OF_SUBCLASSING_RESTRICTED #endif @interface OFStdIOStream: OFStream { #if !defined(OF_MORPHOS) || defined(OF_IXEMUL) int _fd; #else |
︙ |
Modified src/OFStdIOStream.m from [37f14b4e93] to [1049054022].
︙ | |||
45 46 47 48 49 50 51 | 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | - + + + + + + + + + | # include <proto/dos.h> # undef BOOL # define INVALID_FD 0 # define getpid() ((int)SysBase->ThisTask) # define read(fd, buf, len) Read(fd, buf, len) # define write(fd, buf, len) Write(fd, buf, len) |
︙ | |||
99 100 101 102 103 104 105 | 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 | + + + + + + + + + + + + + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | + (void)load { # if !defined(OF_MORPHOS) || defined(OF_IXEMUL) of_stdin = [[OFStdIOStream alloc] of_initWithFileDescriptor: 0]; of_stdout = [[OFStdIOStream alloc] of_initWithFileDescriptor: 1]; of_stderr = [[OFStdIOStream alloc] of_initWithFileDescriptor: 2]; # else BPTR input = Input(), output = Output(); BPTR error = ((struct Process *)SysBase->ThisTask)->pr_CES; bool inputClosable = false, outputClosable = false, errorClosable = false; if (input == INVALID_FD) { input = Open("*", MODE_OLDFILE); inputClosable = true; } if (output == INVALID_FD) { output = Open("*", MODE_OLDFILE); outputClosable = true; } if (error == INVALID_FD) { error = Open("*", MODE_OLDFILE); errorClosable = true; } |
︙ | |||
198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 | 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 | + + + + + | { return _fd; } #endif - (void)close { #if !defined(OF_MORPHOS) || defined(OF_IXEMUL) if (_fd != INVALID_FD) close(_fd); #else if (_closable && _fd != INVALID_FD) Close(_fd); #endif _fd = INVALID_FD; [super close]; } - autorelease |
︙ | |||
225 226 227 228 229 230 231 | 284 285 286 287 288 289 290 291 292 293 294 295 296 297 | - - - - - | } - (unsigned int)retainCount { return OF_RETAIN_COUNT_MAX; } |
︙ |