︙ | | | ︙ | |
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
|
FreeEnvironmentStringsA(env0);
}
#elif defined(OF_AMIGAOS)
void *pool = objc_autoreleasePoolPush();
OFFileManager *fileManager = [OFFileManager defaultManager];
OFArray *envContents =
[fileManager contentsOfDirectoryAtPath: @"ENV:"];
const of_string_encoding_t encoding = [OFLocale encoding];
struct Process *proc;
struct LocalVar *firstLocalVar;
for (OFString *name in envContents) {
void *pool2 = objc_autoreleasePoolPush();
OFString *path, *value;
OFFile *file;
|
|
|
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
|
FreeEnvironmentStringsA(env0);
}
#elif defined(OF_AMIGAOS)
void *pool = objc_autoreleasePoolPush();
OFFileManager *fileManager = [OFFileManager defaultManager];
OFArray *envContents =
[fileManager contentsOfDirectoryAtPath: @"ENV:"];
OFStringEncoding encoding = [OFLocale encoding];
struct Process *proc;
struct LocalVar *firstLocalVar;
for (OFString *name in envContents) {
void *pool2 = objc_autoreleasePoolPush();
OFString *path, *value;
OFFile *file;
|
︙ | | | ︙ | |
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
|
# ifndef OF_MACOS
char **env = environ;
# else
char **env = *_NSGetEnviron();
# endif
if (env != NULL) {
const of_string_encoding_t encoding =
[OFLocale encoding];
for (; *env != NULL; env++) {
void *pool = objc_autoreleasePoolPush();
OFString *key, *value;
char *sep;
if ((sep = strchr(*env, '=')) == NULL) {
|
<
|
|
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
|
# ifndef OF_MACOS
char **env = environ;
# else
char **env = *_NSGetEnviron();
# endif
if (env != NULL) {
OFStringEncoding encoding = [OFLocale encoding];
for (; *env != NULL; env++) {
void *pool = objc_autoreleasePoolPush();
OFString *key, *value;
char *sep;
if ((sep = strchr(*env, '=')) == NULL) {
|
︙ | | | ︙ | |
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
|
[super dealloc];
}
- (void)of_setArgumentCount: (int *)argc andArgumentValues: (char ***)argv
{
void *pool = objc_autoreleasePoolPush();
OFMutableArray *arguments;
of_string_encoding_t encoding;
_argc = argc;
_argv = argv;
encoding = [OFLocale encoding];
#ifndef OF_NINTENDO_DS
|
|
|
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
|
[super dealloc];
}
- (void)of_setArgumentCount: (int *)argc andArgumentValues: (char ***)argv
{
void *pool = objc_autoreleasePoolPush();
OFMutableArray *arguments;
OFStringEncoding encoding;
_argc = argc;
_argv = argv;
encoding = [OFLocale encoding];
#ifndef OF_NINTENDO_DS
|
︙ | | | ︙ | |
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
|
}
#ifdef OF_HAVE_SANDBOX
- (void)of_activateSandbox: (OFSandbox *)sandbox
{
# ifdef OF_HAVE_PLEDGE
void *pool = objc_autoreleasePoolPush();
of_string_encoding_t encoding = [OFLocale encoding];
OFArray OF_GENERIC(of_sandbox_unveil_path_t) *unveiledPaths;
size_t unveiledPathsCount;
const char *promises;
if (_activeSandbox != nil && sandbox != _activeSandbox)
@throw [OFInvalidArgumentException exception];
|
|
|
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
|
}
#ifdef OF_HAVE_SANDBOX
- (void)of_activateSandbox: (OFSandbox *)sandbox
{
# ifdef OF_HAVE_PLEDGE
void *pool = objc_autoreleasePoolPush();
OFStringEncoding encoding = [OFLocale encoding];
OFArray OF_GENERIC(of_sandbox_unveil_path_t) *unveiledPaths;
size_t unveiledPathsCount;
const char *promises;
if (_activeSandbox != nil && sandbox != _activeSandbox)
@throw [OFInvalidArgumentException exception];
|
︙ | | | ︙ | |