Overview
Comment: | OFProcess: Implement environment passing on Win32. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
f51bceaa354fa7b4e4f8dbb7d05f6b5f |
User & Date: | js on 2013-01-07 14:49:52 |
Other Links: | manifest | tags |
Context
2013-01-07
| ||
22:07 | OFString: Zero-terminate UTF-16 strings. check-in: 9d3cd5e5fe user: js tags: trunk | |
14:49 | OFProcess: Implement environment passing on Win32. check-in: f51bceaa35 user: js tags: trunk | |
13:36 | Fix compilation on Win32. check-in: 2965720dbc user: js tags: trunk | |
Changes
Modified src/OFProcess.h from [580e231512] to [e1c603419d].
︙ | |||
160 161 162 163 164 165 166 | 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 | - + | * @return An initialized OFProcess. */ - initWithProgram: (OFString*)program programName: (OFString*)programName arguments: (OFArray*)arguments environment: (OFDictionary*)environment; |
Modified src/OFProcess.m from [2f6a6d8482] to [805ee3827f].
︙ | |||
28 29 30 31 32 33 34 35 36 37 38 39 40 41 | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | + | # include <crt_externs.h> #endif #import "OFProcess.h" #import "OFString.h" #import "OFArray.h" #import "OFDictionary.h" #import "OFDataArray.h" #import "OFInitializationFailedException.h" #import "OFReadFailedException.h" #import "OFWriteFailedException.h" #ifdef _WIN32 # include <windows.h> |
︙ | |||
135 136 137 138 139 140 141 | 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 | - - + + + + + + + + + | for (i = 0; i < count; i++) argv[i + 1] = (char*)[objects[i] cStringUsingEncoding: OF_STRING_ENCODING_NATIVE]; argv[i + 1] = NULL; |
︙ | |||
235 236 237 238 239 240 241 | 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 | + - + | } argumentsCString = strdup([argumentsString cStringUsingEncoding: OF_STRING_ENCODING_NATIVE]); @try { if (!CreateProcess([program cStringUsingEncoding: OF_STRING_ENCODING_NATIVE], argumentsCString, NULL, NULL, TRUE, 0, [self OF_environmentForDictionary: |
︙ | |||
258 259 260 261 262 263 264 | 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 | - + + + + + | [self release]; @throw e; } return self; } |
︙ | |||
296 297 298 299 300 301 302 | 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 | - - + + + - + + + + + + + + + + + + + + + + + + + | memcpy(envp[i] + keyLen + 1, [object cStringUsingEncoding: OF_STRING_ENCODING_NATIVE], objectLen); envp[i][keyLen + objectLen + 1] = '\0'; } envp[i] = NULL; |
︙ |