(svn r17713) -Cleanup: [OSX] Move variable definitions to first use and apply more coding style.

This commit is contained in:
michi_cc
2009-10-04 21:36:17 +00:00
parent 9e3be2ff33
commit c477544b92
2 changed files with 50 additions and 77 deletions

View File

@@ -97,9 +97,9 @@ void ShowOSErrorBox(const char *buf, bool system)
const char *GetCurrentLocale(const char *)
{
static char retbuf[32] = { '\0' };
NSUserDefaults *defs = [NSUserDefaults standardUserDefaults];
NSArray *languages = [defs objectForKey:@"AppleLanguages"];
NSString *preferredLang = [languages objectAtIndex:0];
NSUserDefaults *defs = [ NSUserDefaults standardUserDefaults ];
NSArray *languages = [ defs objectForKey:@"AppleLanguages" ];
NSString *preferredLang = [ languages objectAtIndex:0 ];
/* preferredLang is either 2 or 5 characters long ("xx" or "xx_YY"). */
/* Since Apple introduced encoding to CString in OSX 10.4 we have to make a few conditions