Differences From Artifact [03cde41f41]:
- File
src/OFProcess.m
— part of check-in
[2a27cf3000]
at
2016-01-03 00:41:26
on branch trunk
— Update copyright
While at it, also update the mail address. (user: js, size: 14251) [annotate] [blame] [check-ins using]
To Artifact [e8f32c52e1]:
- File
src/OFProcess.m
— part of check-in
[0c7c53dd58]
at
2016-05-28 13:18:54
on branch trunk
— OFProcess: Improve environment handling on Win32
This makes sure to return NULL if the passed environment is nil and
makes sure that the environment is always terminated with 4 zero bytes,
even if the environment is empty. (user: js, size: 14325) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
403 404 405 406 407 408 409 | envp[i] = NULL; return envp; } #else - (of_char16_t*)OF_environmentForDictionary: (OFDictionary*)environment { | | | > > > > > < | | | 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 | envp[i] = NULL; return envp; } #else - (of_char16_t*)OF_environmentForDictionary: (OFDictionary*)environment { OFDataArray *env; OFEnumerator *keyEnumerator, *objectEnumerator; OFString *key, *object; const of_char16_t equal = '='; const of_char16_t zero[2] = { 0, 0 }; if (environment == nil) return NULL; env = [OFDataArray dataArrayWithItemSize: sizeof(of_char16_t)]; keyEnumerator = [environment keyEnumerator]; objectEnumerator = [environment objectEnumerator]; while ((key = [keyEnumerator nextObject]) != nil && (object = [objectEnumerator nextObject]) != nil) { [env addItems: [key UTF16String] count: [key UTF16StringLength]]; [env addItems: &equal count: 1]; [env addItems: [object UTF16String] count: [object UTF16StringLength]]; [env addItems: &zero count: 1]; } [env addItems: zero count: 2]; return [env items]; } #endif - (bool)lowlevelIsAtEndOfStream { |
︙ | ︙ |