Update def of GSSetLocale

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@15249 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 2002-12-05 04:24:43 +00:00
parent 311b522618
commit 52bf284361
5 changed files with 31 additions and 11 deletions

View file

@ -53,6 +53,9 @@
#include <Foundation/NSValue.h>
#include <Foundation/NSDebug.h>
#include <base/GSLocale.h>
#ifdef HAVE_LOCALE_H
#include <locale.h>
#endif
#include "GSPrivate.h"
@ -432,7 +435,10 @@ static BOOL setSharedDefaults = NO; /* Flag to prevent infinite recursion */
}
else if (added_locale == NO)
{
NSString *locale = GSSetLocale(nil);
NSString *locale;
#ifdef HAVE_LOCALE_H
locale = GSSetLocale(LC_MESSAGES, nil);
#endif
if (locale == nil)
continue;
/* See if we can get the dictionary from i18n functions.
@ -479,7 +485,6 @@ static BOOL setSharedDefaults = NO; /* Flag to prevent infinite recursion */
return AUTORELEASE(userLanguages);
}
userLanguages = RETAIN([NSMutableArray arrayWithCapacity: 5]);
locale = GSSetLocale(@"");
if (sharedDefaults == nil)
{
/* Create our own defaults to get "NSLanguages" since sharedDefaults