Bug 637555 - Remove nsIMacLocale. r=smontagu
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Wed, 11 May 2011 14:25:09 +0900
changeset 69317 a45b5cf1d6250162d15f1c02d8f1c538b881e02a
parent 69316 bedef853b523b40975415657715140a292a00eac
child 69318 47f42f84ba96b284e5ea4e9b4a1c6b4c07cb7dff
push idunknown
push userunknown
push dateunknown
reviewerssmontagu
bugs637555
milestone6.0a1
Bug 637555 - Remove nsIMacLocale. r=smontagu
intl/build/nsI18nModule.cpp
intl/locale/public/Makefile.in
intl/locale/public/nsIMacLocale.h
intl/locale/src/mac/Makefile.in
intl/locale/src/mac/nsDateTimeFormatMac.cpp
intl/locale/src/mac/nsMacCharset.cpp
intl/locale/src/mac/nsMacLocale.cpp
intl/locale/src/mac/nsMacLocale.h
intl/locale/src/nsLocaleConstructors.h
intl/locale/src/nsLocaleService.cpp
--- a/intl/build/nsI18nModule.cpp
+++ b/intl/build/nsI18nModule.cpp
@@ -96,17 +96,16 @@ NS_DEFINE_NAMED_CID(NS_COLLATION_CID);
 NS_DEFINE_NAMED_CID(NS_DATETIMEFORMAT_CID);
 #endif
 #ifdef USE_UNIX_LOCALE
 NS_DEFINE_NAMED_CID(NS_POSIXLOCALE_CID);
 NS_DEFINE_NAMED_CID(NS_COLLATION_CID);
 NS_DEFINE_NAMED_CID(NS_DATETIMEFORMAT_CID);
 #endif
 #ifdef USE_MAC_LOCALE
-NS_DEFINE_NAMED_CID(NS_MACLOCALE_CID);
 NS_DEFINE_NAMED_CID(NS_COLLATION_CID);
 NS_DEFINE_NAMED_CID(NS_DATETIMEFORMAT_CID);
 #endif
 #ifdef XP_OS2
 NS_DEFINE_NAMED_CID(NS_OS2LOCALE_CID);
 NS_DEFINE_NAMED_CID(NS_COLLATION_CID);
 NS_DEFINE_NAMED_CID(NS_DATETIMEFORMAT_CID);
 #endif
@@ -133,17 +132,16 @@ static const mozilla::Module::CIDEntry k
     { &kNS_DATETIMEFORMAT_CID, false, NULL, nsDateTimeFormatWinConstructor },
 #endif
 #ifdef USE_UNIX_LOCALE
     { &kNS_POSIXLOCALE_CID, false, NULL, nsPosixLocaleConstructor },
     { &kNS_COLLATION_CID, false, NULL, nsCollationUnixConstructor },
     { &kNS_DATETIMEFORMAT_CID, false, NULL, nsDateTimeFormatUnixConstructor },
 #endif
 #ifdef USE_MAC_LOCALE
-    { &kNS_MACLOCALE_CID, false, NULL, nsMacLocaleConstructor },
     { &kNS_COLLATION_CID, false, NULL, nsCollationMacUCConstructor },
     { &kNS_DATETIMEFORMAT_CID, false, NULL, nsDateTimeFormatMacConstructor },
 #endif
 #ifdef XP_OS2
     { &kNS_OS2LOCALE_CID, false, NULL, nsOS2LocaleConstructor },
     { &kNS_COLLATION_CID, false, NULL, nsCollationOS2Constructor },
     { &kNS_DATETIMEFORMAT_CID, false, NULL, nsDateTimeFormatOS2Constructor },
 #endif
@@ -172,17 +170,16 @@ static const mozilla::Module::ContractID
     { NS_DATETIMEFORMAT_CONTRACTID, &kNS_DATETIMEFORMAT_CID },
 #endif
 #ifdef USE_UNIX_LOCALE
     { NS_POSIXLOCALE_CONTRACTID, &kNS_POSIXLOCALE_CID },
     { NS_COLLATION_CONTRACTID, &kNS_COLLATION_CID },
     { NS_DATETIMEFORMAT_CONTRACTID, &kNS_DATETIMEFORMAT_CID },
 #endif
 #ifdef USE_MAC_LOCALE
-    { NS_MACLOCALE_CONTRACTID, &kNS_MACLOCALE_CID },
     { NS_COLLATION_CONTRACTID, &kNS_COLLATION_CID },
     { NS_DATETIMEFORMAT_CONTRACTID, &kNS_DATETIMEFORMAT_CID },
 #endif
 #ifdef XP_OS2
     { NS_OS2LOCALE_CONTRACTID, &kNS_OS2LOCALE_CID },
     { NS_COLLATION_CONTRACTID, &kNS_COLLATION_CID },
     { NS_DATETIMEFORMAT_CONTRACTID, &kNS_DATETIMEFORMAT_CID },
 #endif
--- a/intl/locale/public/Makefile.in
+++ b/intl/locale/public/Makefile.in
@@ -44,17 +44,16 @@ include $(DEPTH)/config/autoconf.mk
 
 MODULE		= locale
 
 EXPORTS		= \
 		nsCollationCID.h \
 		nsDateTimeFormatCID.h \
 		nsIDateTimeFormat.h \
 		nsILanguageAtomService.h \
-		nsIMacLocale.h \
 		nsIPosixLocale.h \
 		nsIOS2Locale.h \
 		nsWin32Locale.h \
 		nsICharsetAlias.h \
 		nsIPlatformCharset.h \
 		nsLocaleCID.h \
 		$(NULL)
 
deleted file mode 100644
--- a/intl/locale/public/nsIMacLocale.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-#ifndef nsIMacLocale_h__
-#define nsIMacLocale_h__
-
-
-#include "nsISupports.h"
-#include "nscore.h"
-#include "nsString.h"
-#include <Carbon/Carbon.h>
-
-// {E58B24B2-FD1A-11d2-9E8E-0060089FE59B}
-#define NS_IMACLOCALE_IID                \
-{  0xe58b24b2, 0xfd1a, 0x11d2,           \
-{  0x9e, 0x8e, 0x0, 0x60, 0x8, 0x9f, 0xe5, 0x9b }}  
-
-
-class nsIMacLocale : public nsISupports {
-
-public:
-  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IMACLOCALE_IID)
-
-  NS_IMETHOD GetPlatformLocale(const nsAString& locale, short* scriptCode, 
-                               short* langCode, short* regionCode) = 0;
-  NS_IMETHOD GetXPLocale(short scriptCode, short langCode, short regionCode,
-                         nsAString& locale) = 0;
-};
-
-NS_DEFINE_STATIC_IID_ACCESSOR(nsIMacLocale, NS_IMACLOCALE_IID)
-
-#endif
--- a/intl/locale/src/mac/Makefile.in
+++ b/intl/locale/src/mac/Makefile.in
@@ -46,15 +46,14 @@ MODULE		= locale
 LIBRARY_NAME	= platlocale_s
 FORCE_STATIC_LIB	= 1
 LIBXUL_LIBRARY  = 1
 
 
 CPPSRCS		= \
 		nsCollationMacUC.cpp \
 		nsDateTimeFormatMac.cpp \
-		nsMacLocale.cpp \
 		nsMacCharset.cpp \
 		$(NULL)
 
 include $(topsrcdir)/config/rules.mk
 
 INCLUDES	+= -I$(srcdir)/..
--- a/intl/locale/src/mac/nsDateTimeFormatMac.cpp
+++ b/intl/locale/src/mac/nsDateTimeFormatMac.cpp
@@ -31,23 +31,23 @@
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
+#include <CoreFoundation/CoreFoundation.h>
 #include "nsIServiceManager.h"
 #include "nsDateTimeFormatMac.h"
 #include <CoreFoundation/CFDateFormatter.h>
 #include "nsIComponentManager.h"
 #include "nsLocaleCID.h"
 #include "nsILocaleService.h"
-#include "nsIMacLocale.h"
 #include "nsCRT.h"
 #include "plstr.h"
 #include "prmem.h"
 #include "nsUnicharUtils.h"
 #include "nsTArray.h"
 
 
 NS_IMPL_THREADSAFE_ISUPPORTS1(nsDateTimeFormatMac, nsIDateTimeFormat)
--- a/intl/locale/src/mac/nsMacCharset.cpp
+++ b/intl/locale/src/mac/nsMacCharset.cpp
@@ -35,17 +35,16 @@
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include <Carbon/Carbon.h>
 #include "nsIPlatformCharset.h"
 #include "pratom.h"
 #include "nsCOMPtr.h"
 #include "nsIServiceManager.h"
-#include "nsIMacLocale.h"
 #include "nsLocaleCID.h"
 #include "nsReadableUtils.h"
 #include "nsPlatformCharset.h"
 #include "nsEncoderDecoderUtils.h"
 
 NS_IMPL_ISUPPORTS1(nsPlatformCharset, nsIPlatformCharset)
 
 nsPlatformCharset::nsPlatformCharset()
deleted file mode 100644
--- a/intl/locale/src/mac/nsMacLocale.cpp
+++ /dev/null
@@ -1,326 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include <Carbon/Carbon.h>
-
-#include "nsISupports.h"
-#include "nscore.h"
-#include "nsString.h"
-#include "nsReadableUtils.h"
-#include "nsMacLocale.h"
-#include "nsLocaleCID.h"
-#include "prprf.h"
-#include "nsReadableUtils.h"
-#include "nsXPCOMStrings.h"
-
-struct iso_lang_map
-{
-  const char*  iso_code;
-  short        mac_lang_code;
-  short        mac_script_code;
-
-};
-typedef struct iso_lang_map iso_lang_map;
-
-const iso_lang_map lang_list[] = {
-  { "sq", langAlbanian, smRoman },
-  { "am", langAmharic, smEthiopic  },
-  { "ar", langArabic, smArabic },
-  { "hy", langArmenian, smArmenian},
-  { "as", langAssamese, smBengali },
-  { "ay", langAymara, smRoman},
-  { "eu", langBasque, smRoman},
-  { "bn", langBengali, smBengali },
-  { "dz", langDzongkha, smTibetan },
-  { "br", langBreton, smRoman },
-  { "bg", langBulgarian, smCyrillic },
-  { "my", langBurmese, smBurmese },
-  { "km", langKhmer, smKhmer },
-  { "ca", langCatalan, smRoman },
-  { "zh", langTradChinese, smTradChinese },
-  { "hr", langCroatian, smRoman },
-  { "cs", langCzech, smCentralEuroRoman },
-  { "da", langDanish, smRoman },
-  { "nl", langDutch, smRoman },
-  { "en", langEnglish, smRoman },
-  { "eo", langEsperanto, smRoman },
-  { "et", langEstonian, smCentralEuroRoman},
-  { "fo", langFaeroese, smRoman },
-  { "fa", langFarsi, smArabic },
-  { "fi", langFinnish, smRoman },
-  { "fr", langFrench, smRoman },
-  { "ka", langGeorgian, smGeorgian },
-  { "de", langGerman, smRoman },
-  { "el", langGreek, smGreek },
-  { "gn", langGuarani, smRoman },
-  { "gu", langGujarati, smGujarati },
-  { "he", langHebrew, smHebrew },
-  { "iw", langHebrew, smHebrew },
-  { "hu", langHungarian, smCentralEuroRoman }, 
-  { "is", langIcelandic, smRoman },
-  { "in", langIndonesian, smRoman },
-  { "id", langIndonesian,  smRoman },
-  { "iu", langInuktitut, smEthiopic },
-  { "ga", langIrish, smRoman }, 
-  { "hi", langHindi, smDevanagari },
-  { "it", langItalian, smRoman },
-  { "ja", langJapanese, smJapanese },
-  { "jw", langJavaneseRom, smRoman },
-  { "kn", langKannada, smKannada },
-  { "ks", langKashmiri, smArabic },
-  { "kk", langKazakh, smCyrillic },
-  { "ky", langKirghiz, smCyrillic },
-  { "ko", langKorean, smKorean },
-  { "ku", langKurdish, smArabic },
-  { "lo", langLao, smLao },
-  { "la", langLatin, smRoman },
-  { "lv", langLatvian, smCentralEuroRoman },
-  { "lt", langLithuanian, smCentralEuroRoman },
-  { "mk", langMacedonian, smCyrillic },
-  { "mg", langMalagasy, smRoman },
-  { "ml", langMalayalam, smMalayalam },
-  { "mt", langMaltese, smRoman },
-  { "mr", langMarathi, smDevanagari },
-  { "mo", langMoldavian, smCyrillic },
-  { "ne", langNepali, smDevanagari },
-  { "nb", langNorwegian, smRoman }, // Norwegian Bokmål
-  { "no", langNorwegian, smRoman },
-  { "nn", langNynorsk, smRoman },
-  { "or", langOriya, smOriya },
-  { "om", langOromo, smEthiopic },
-  { "ps", langPashto, smArabic },
-  { "pl", langPolish, smCentralEuroRoman },
-  { "pt", langPortuguese, smRoman },
-  { "pa", langPunjabi, smGurmukhi },
-  { "ro", langRomanian, smRoman },
-  { "ru", langRussian, smCyrillic },
-  { "sa", langSanskrit, smDevanagari },
-  { "sr", langSerbian, smCyrillic },
-  { "sd", langSindhi, smArabic },
-  { "si", langSinhalese, smSinhalese },
-  { "sk", langSlovak, smCentralEuroRoman },
-  { "sl", langSlovenian, smRoman },
-  { "so", langSomali, smRoman },
-  { "es", langSpanish, smRoman },
-  { "su", langSundaneseRom, smRoman },
-  { "sw", langSwahili, smRoman },
-  { "sv", langSwedish, smRoman }, 
-  { "tl", langTagalog, smRoman },
-  { "tg", langTajiki, smCyrillic },
-  { "ta", langTamil, smTamil },
-  { "tt", langTatar, smCyrillic },
-  { "te", langTelugu, smTelugu },
-  { "th", langThai, smThai },
-  { "bo", langTibetan, smTibetan },
-  { "ti", langTigrinya, smEthiopic },
-  { "tr", langTurkish, smRoman },
-  { "tk", langTurkmen, smCyrillic },
-  { "ug", langUighur, smCyrillic },
-  { "uk", langUkrainian, smCyrillic },
-  { "ur", langUrdu, smArabic },
-  { "uz", langUzbek, smCyrillic },
-  { "vi", langVietnamese, smVietnamese },
-  { "cy", langWelsh, smRoman },
-  { "ji", langYiddish, smHebrew },
-  { "yi", langYiddish, smHebrew },
-  { nsnull, 0, 0}
-};
-
-struct iso_country_map
-{
-  const char*  iso_code;
-  short        mac_region_code;
-};
-
-typedef struct iso_country_map iso_country_map;
-
-const iso_country_map country_list[] = {
-  { "US", verUS},
-  { "EG", verArabic},
-  { "DZ", verArabic},
-  { "AU", verAustralia},
-  { "BE", verFrBelgium },
-  { "CA", verEngCanada },
-  { "CN", verChina },
-  { "HR", verYugoCroatian },
-  { "CY", verCyprus },
-  { "DK", verDenmark },
-  { "EE", verEstonia },
-  { "FI", verFinland },
-  { "FR", verFrance },
-  { "DE", verGermany },
-  { "EL", verGreece },
-  { "HU", verHungary },
-  { "IS", verIceland },
-  { "IN", verIndiaHindi},
-  { "IR", verIran },
-  { "IQ", verArabic },
-  { "IE", verIreland },
-  { "IL", verIsrael },
-  { "IT", verItaly },
-  { "JP", verJapan },
-  { "KR", verKorea },
-  { "LV", verLatvia },
-  { "LY", verArabic },
-  { "LT", verLithuania },
-  { "LU", verFrBelgiumLux },
-  { "MT", verMalta },
-  { "MA", verArabic },
-  { "NL", verNetherlands },
-  { "NO", verNorway },
-  { "PK", verPakistan },
-  { "PL", verPoland },
-  { "PT", verPortugal },
-  { "RU", verRussia },
-  { "SA", verArabic },
-  { "ES", verSpain },
-  { "SE", verSweden },
-  { "CH", verFrSwiss },
-  { "TW", verTaiwan},
-  { "TH", verThailand },
-  { "TN", verArabic},
-  { "TR", verTurkey },
-  { "GB", verBritain },
-  { nsnull, 0 }
-};
-  
-
-/* nsMacLocale ISupports */
-NS_IMPL_ISUPPORTS1(nsMacLocale,nsIMacLocale)
-
-nsMacLocale::nsMacLocale(void)
-{
-}
-
-nsMacLocale::~nsMacLocale(void)
-{
-
-}
-
-NS_IMETHODIMP 
-nsMacLocale::GetPlatformLocale(const nsAString& locale, short* scriptCode, short* langCode, short* regionCode)
-{
-  char    locale_string[9] = {'\0','\0','\0','\0','\0','\0','\0','\0','\0'};
-  char*   language_code;
-  char*   country_code;
-  bool  validCountryFound;
-  int  i, j;
-
-  // parse the locale
-  const PRUnichar* data;
-  j = NS_StringGetData(locale, &data);
-  for (i = 0; i < 7 && i < j; i++) {
-    locale_string[i] = data[i] == '-' ? '\0' : data[i];
-  }
-
-  language_code = locale_string;
-  country_code = locale_string + strlen(locale_string) + 1;
-
-  // convert parsed locale to Mac OS locale
-  if (country_code[0]!=0) 
-  {
-    validCountryFound=false;
-    for(i=0;country_list[i].iso_code;i++) {
-      if (strcmp(country_list[i].iso_code,country_code)==0) {
-        *regionCode = country_list[i].mac_region_code;
-        validCountryFound=true;
-        break;
-      }
-    }
-    if (!validCountryFound) {
-      *scriptCode = smRoman;
-      *langCode = langEnglish;
-      *regionCode = verUS;
-      return NS_ERROR_FAILURE;
-    }
-  }
-    
-  for(i=0;lang_list[i].iso_code;i++) {
-    if (strcmp(lang_list[i].iso_code, language_code)==0) {
-      *scriptCode = lang_list[i].mac_script_code;
-      *langCode = lang_list[i].mac_lang_code;
-      return NS_OK;
-    }
-  }
-  *scriptCode = smRoman;
-  *langCode = langEnglish;
-  *regionCode = verUS;
-  return NS_ERROR_FAILURE;
-}
-  
-NS_IMETHODIMP
-nsMacLocale::GetXPLocale(short scriptCode, short langCode, short regionCode, nsAString& locale)
-{
-
-  int i;
-  bool validResultFound = false;
-
-  locale.Truncate();
-  
-  //
-  // parse language
-  //
-  for(i=0;lang_list[i].iso_code;i++) {
-    if (langCode==lang_list[i].mac_lang_code && scriptCode==lang_list[i].mac_script_code) {
-      CopyASCIItoUTF16(nsDependentCString(lang_list[i].iso_code), locale);
-      validResultFound = true;
-      break;
-    }
-  }
-  
-  if (!validResultFound) {
-    return NS_ERROR_FAILURE;
-  }
-  
-  //
-  // parse region
-  //
-  for(i=0;country_list[i].iso_code;i++) {
-    if (regionCode==country_list[i].mac_region_code) {
-      locale.Append(PRUnichar('-'));
-      AppendASCIItoUTF16(country_list[i].iso_code, locale);
-      validResultFound = true;
-      break;
-    }
-  }
-  
-  if (validResultFound) {
-    return NS_OK;
-  }
-  
-  return NS_ERROR_FAILURE;
-}
deleted file mode 100644
--- a/intl/locale/src/mac/nsMacLocale.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-#ifndef nsMacLocale_h__
-#define nsMacLocale_h__
-
-
-#include "nsISupports.h"
-#include "nscore.h"
-#include "nsString.h"
-#include "nsIMacLocale.h"
-
-
-
-class nsMacLocale : public nsIMacLocale {
-
-  NS_DECL_ISUPPORTS
-
-public:
-  
-  nsMacLocale();
-  virtual ~nsMacLocale();
-
-  NS_IMETHOD GetPlatformLocale(const nsAString& locale,short* scriptCode, short* langCode, short* regionCode);
-  NS_IMETHOD GetXPLocale(short scriptCode, short langCode, short regionCode, nsAString& locale);
-  
-};
-
-
-#endif
--- a/intl/locale/src/nsLocaleConstructors.h
+++ b/intl/locale/src/nsLocaleConstructors.h
@@ -67,17 +67,16 @@
 #include "nsOS2Locale.h"
 #include "nsCollationOS2.h"
 #include "nsDateTimeFormatOS2.h"
 #endif
 
 #ifdef USE_MAC_LOCALE
 #include "nsCollationMacUC.h"
 #include "nsDateTimeFormatMac.h"
-#include "nsMacLocale.h"
 #endif
 
 #ifdef USE_UNIX_LOCALE
 #include "nsCollationUnix.h"
 #include "nsDateTimeFormatUnix.h"
 #include "nsPosixLocale.h"
 #endif
 
@@ -112,17 +111,16 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsDateTim
 
 #ifdef USE_UNIX_LOCALE
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsPosixLocale)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsCollationUnix)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsDateTimeFormatUnix)
 #endif  
 
 #ifdef USE_MAC_LOCALE
-NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacLocale)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsCollationMacUC)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsDateTimeFormatMac)
 #endif  
 
 #ifdef XP_OS2
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsOS2Locale)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsCollationOS2)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsDateTimeFormatOS2)
--- a/intl/locale/src/nsLocaleService.cpp
+++ b/intl/locale/src/nsLocaleService.cpp
@@ -56,17 +56,16 @@
 
 #if defined(XP_WIN)
 #  include "nsWin32Locale.h"
 #elif defined(XP_OS2)
 #  include "unidef.h"
 #  include "nsIOS2Locale.h"
 #elif defined(XP_MACOSX)
 #  include <Carbon/Carbon.h>
-#  include "nsIMacLocale.h"
 #elif defined(XP_UNIX)
 #  include <locale.h>
 #  include <stdlib.h>
 #  include "nsIPosixLocale.h"
 #endif
 
 //
 // implementation constants