Disabled debug printf, changed query setlocale() to pass NULL instead of an empty string.

This commit is contained in:
nhotta%netscape.com 2000-04-13 20:08:57 +00:00
parent 24641e5743
commit c75bc89454
2 changed files with 3 additions and 3 deletions

View File

@ -32,7 +32,7 @@
#include "nsIPosixLocale.h"
#include "nsCOMPtr.h"
#include "nsFileSpec.h" /* for nsAutoString */
#define DEBUG_UNIX_COLLATION
//#define DEBUG_UNIX_COLLATION
static NS_DEFINE_IID(kICollationIID, NS_ICOLLATION_IID);
static NS_DEFINE_CID(kPosixLocaleFactoryCID, NS_POSIXLOCALEFACTORY_CID);
@ -45,7 +45,7 @@ NS_IMPL_ISUPPORTS(nsCollationUnix, kICollationIID);
inline void nsCollationUnix::DoSetLocale()
{
char *locale = setlocale(LC_COLLATE, "");
char *locale = setlocale(LC_COLLATE, NULL);
mSavedLocale.SetString(locale ? locale : "");
if (!mSavedLocale.EqualsIgnoreCase(mLocale)) {
char newLocale[128];

View File

@ -212,7 +212,7 @@ nsresult nsDateTimeFormatUnix::FormatTMTime(nsILocale* locale,
}
// generate data/time string
char *old_locale = setlocale(LC_TIME, "");
char *old_locale = setlocale(LC_TIME, NULL);
(void) setlocale(LC_TIME, mPlatformLocale);
if (PL_strlen(fmtD) && PL_strlen(fmtT)) {
PL_strncat(fmtD, " ", NSDATETIME_FORMAT_BUFFER_LEN);