ObjFW  Diff

Differences From Artifact [1a4d3713d8]:

To Artifact [c3e00228c4]:


33
34
35
36
37
38
39

40
41
42
43
44
45
46
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47







+







#endif
#import "OFLocale.h"
#import "OFNotificationCenter.h"
#import "OFPair.h"
#import "OFRunLoop+Private.h"
#import "OFRunLoop.h"
#import "OFSandbox.h"
#import "OFStdIOStream.h"
#import "OFString.h"
#import "OFSystemInfo.h"
#import "OFThread+Private.h"
#import "OFThread.h"

#import "OFActivateSandboxFailedException.h"
#import "OFInvalidArgumentException.h"
256
257
258
259
260
261
262
263
264
265


266
267
268
269
270
271
272
257
258
259
260
261
262
263



264
265
266
267
268
269
270
271
272







-
-
-
+
+







				if ([tmp hasPrefix: @"="]) {
					objc_autoreleasePoolPop(pool);
					continue;
				}

				pos = [tmp rangeOfString: @"="].location;
				if (pos == OFNotFound) {
					fprintf(stderr,
					    "Warning: Invalid environment "
					    "variable: %s\n", tmp.UTF8String);
					OFLog(@"Warning: Invalid environment "
					    "variable: %@", tmp);
					continue;
				}

				key = [tmp substringToIndex: pos];
				value = [tmp substringFromIndex: pos + 1];
				[_environment setObject: value forKey: key];

298
299
300
301
302
303
304
305
306
307


308
309
310
311
312
313
314
298
299
300
301
302
303
304



305
306
307
308
309
310
311
312
313







-
-
-
+
+







				if ([tmp hasPrefix: @"="]) {
					objc_autoreleasePoolPop(pool);
					continue;
				}

				pos = [tmp rangeOfString: @"="].location;
				if (pos == OFNotFound) {
					fprintf(stderr,
					    "Warning: Invalid environment "
					    "variable: %s\n", tmp.UTF8String);
					OFLog(@"Warning: Invalid environment "
					    "variable: %@", tmp);
					continue;
				}

				key = [tmp substringToIndex: pos];
				value = [tmp substringFromIndex: pos + 1];
				[_environment setObject: value forKey: key];

392
393
394
395
396
397
398
399
400


401
402
403
404
405
406
407
391
392
393
394
395
396
397


398
399
400
401
402
403
404
405
406







-
-
+
+








			for (; *env != NULL; env++) {
				void *pool = objc_autoreleasePoolPush();
				OFString *key, *value;
				char *sep;

				if ((sep = strchr(*env, '=')) == NULL) {
					fprintf(stderr, "Warning: Invalid "
					    "environment variable: %s\n", *env);
					OFLog(@"Warning: Invalid environment "
					    "variable: %s", *env);
					continue;
				}

				key = [OFString
				    stringWithCString: *env
					     encoding: encoding
					       length: sep - *env];