@@ -96,11 +96,11 @@ static OFApplication *app = nil; static void atexitHandler(void) { - id delegate = [app delegate]; + id delegate = app.delegate; if ([delegate respondsToSelector: @selector(applicationWillTerminate)]) [delegate applicationWillTerminate]; [delegate release]; @@ -145,11 +145,11 @@ __wgetmainargs(&wargc, &wargv, &wenvp, _CRT_glob, &si); [app of_setArgumentCount: wargc andWideArgumentValues: wargv]; #endif - [app setDelegate: delegate]; + app.delegate = delegate; [app of_run]; [delegate release]; @@ -169,21 +169,21 @@ return app; } + (OFString *)programName { - return [app programName]; + return app.programName; } + (OFArray *)arguments { - return [app arguments]; + return app.arguments; } + (OFDictionary *)environment { - return [app environment]; + return app.environment; } + (void)terminate { [self terminateWithStatus: EXIT_SUCCESS]; @@ -261,11 +261,11 @@ continue; } key = [tmp substringWithRange: of_range(0, pos)]; value = [tmp substringWithRange: - of_range(pos + 1, [tmp length] - pos - 1)]; + of_range(pos + 1, tmp.length - pos - 1)]; [_environment setObject: value forKey: key]; objc_autoreleasePoolPop(pool); @@ -575,18 +575,18 @@ [runLoop run]; } - (void)terminate { - [[self class] terminate]; + [self.class terminate]; OF_UNREACHABLE } - (void)terminateWithStatus: (int)status { - [[self class] terminateWithStatus: status]; + [self.class terminateWithStatus: status]; OF_UNREACHABLE } #ifdef OF_HAVE_SANDBOX @@ -600,19 +600,19 @@ const char *promises; if (_activeSandbox != nil && sandbox != _activeSandbox) @throw [OFInvalidArgumentException exception]; - unveiledPaths = [sandbox unveiledPaths]; - unveiledPathsCount = [unveiledPaths count]; + unveiledPaths = sandbox.unveiledPaths; + unveiledPathsCount = unveiledPaths.count; for (size_t i = sandbox->_unveiledPathsIndex; i < unveiledPathsCount; i++) { of_sandbox_unveil_path_t unveiledPath = [unveiledPaths objectAtIndex: i]; - OFString *path = [unveiledPath firstObject]; - OFString *permissions = [unveiledPath secondObject]; + OFString *path = unveiledPath.firstObject; + OFString *permissions = unveiledPath.secondObject; if (path == nil || permissions == nil) @throw [OFInvalidArgumentException exception]; unveil([path cStringWithEncoding: encoding], @@ -619,11 +619,11 @@ [permissions cStringWithEncoding: encoding]); } sandbox->_unveiledPathsIndex = unveiledPathsCount; - promises = [[sandbox pledgeString] cStringWithEncoding: encoding]; + promises = [sandbox.pledgeString cStringWithEncoding: encoding]; if (pledge(promises, NULL) != 0) @throw [OFSandboxActivationFailedException exceptionWithSandbox: sandbox errNo: errno]; @@ -642,14 +642,14 @@ const char *promises; if (_activeExecSandbox != nil && sandbox != _activeExecSandbox) @throw [OFInvalidArgumentException exception]; - if ([[sandbox unveiledPaths] count] != 0) + if (sandbox.unveiledPaths.count != 0) @throw [OFInvalidArgumentException exception]; - promises = [[sandbox pledgeString] + promises = [sandbox.pledgeString cStringWithEncoding: [OFLocale encoding]]; if (pledge(NULL, promises) != 0) @throw [OFSandboxActivationFailedException exceptionWithSandbox: sandbox