diff options
author | Johanna Ploog <j-p-e-g@users.sourceforge.net> | 2009-12-10 14:24:40 +0100 |
---|---|---|
committer | Johanna Ploog <j-p-e-g@users.sourceforge.net> | 2009-12-10 14:24:40 +0100 |
commit | f1ef80cc67b73ae63865564ece8032e9b2276234 (patch) | |
tree | abad1e086f495500e06f76b60e6268a1a7c8eb75 /crawl-ref/source/SDLMain.m | |
parent | 4b71037efe0a72b312c377bbc39f2ffd279edaab (diff) | |
download | crawl-ref-f1ef80cc67b73ae63865564ece8032e9b2276234.tar.gz crawl-ref-f1ef80cc67b73ae63865564ece8032e9b2276234.zip |
Tidy up bracket placement according to our coding conventions.
Diffstat (limited to 'crawl-ref/source/SDLMain.m')
-rw-r--r-- | crawl-ref/source/SDLMain.m | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/crawl-ref/source/SDLMain.m b/crawl-ref/source/SDLMain.m index 94f1ee450a..658c817619 100644 --- a/crawl-ref/source/SDLMain.m +++ b/crawl-ref/source/SDLMain.m @@ -26,8 +26,8 @@ /* Portions of CPS.h */ typedef struct CPSProcessSerNum { - UInt32 lo; - UInt32 hi; + UInt32 lo; + UInt32 hi; } CPSProcessSerNum; extern OSErr CPSGetCurrentProcess( CPSProcessSerNum *psn); @@ -87,15 +87,16 @@ static NSString *getApplicationName(void) if (shouldChdir) { char parentdir[MAXPATHLEN]; - CFURLRef url = CFBundleCopyBundleURL(CFBundleGetMainBundle()); - CFURLRef url2 = CFURLCreateCopyDeletingLastPathComponent(0, url); - if (CFURLGetFileSystemRepresentation(url2, true, (UInt8 *)parentdir, MAXPATHLEN)) { - assert ( chdir (parentdir) == 0 ); /* chdir to the binary app's parent */ - } - CFRelease(url); - CFRelease(url2); - } - + CFURLRef url = CFBundleCopyBundleURL(CFBundleGetMainBundle()); + CFURLRef url2 = CFURLCreateCopyDeletingLastPathComponent(0, url); + if (CFURLGetFileSystemRepresentation(url2, true, (UInt8 *)parentdir, + MAXPATHLEN)) + { + assert ( chdir (parentdir) == 0 ); /* chdir to the binary app's parent */ + } + CFRelease(url); + CFRelease(url2); + } } #if SDL_USE_NIB_FILE @@ -358,13 +359,16 @@ int main (int argc, char **argv) { /* Copy the arguments into a global variable */ /* This is passed if we are launched by double-clicking */ - if ( argc >= 2 && strncmp (argv[1], "-psn", 4) == 0 ) { + if ( argc >= 2 && strncmp (argv[1], "-psn", 4) == 0 ) + { gArgv = (char **) SDL_malloc(sizeof (char *) * 2); gArgv[0] = argv[0]; gArgv[1] = NULL; gArgc = 1; gFinderLaunch = YES; - } else { + } + else + { int i; gArgc = argc; gArgv = (char **) SDL_malloc(sizeof (char *) * (argc+1)); @@ -381,4 +385,3 @@ int main (int argc, char **argv) #endif return 0; } - |