OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [binutils-2.18.50/] [intl/] [localename.c] - Diff between revs 156 and 816

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 156 Rev 816
/* Determine the current selected locale.
/* Determine the current selected locale.
   Copyright (C) 1995-1999, 2000-2002 Free Software Foundation, Inc.
   Copyright (C) 1995-1999, 2000-2002 Free Software Foundation, Inc.
 
 
   This program is free software; you can redistribute it and/or modify it
   This program is free software; you can redistribute it and/or modify it
   under the terms of the GNU Library General Public License as published
   under the terms of the GNU Library General Public License as published
   by the Free Software Foundation; either version 2, or (at your option)
   by the Free Software Foundation; either version 2, or (at your option)
   any later version.
   any later version.
 
 
   This program is distributed in the hope that it will be useful,
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Library General Public License for more details.
   Library General Public License for more details.
 
 
   You should have received a copy of the GNU Library General Public
   You should have received a copy of the GNU Library General Public
   License along with this program; if not, write to the Free Software
   License along with this program; if not, write to the Free Software
   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301,
   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301,
   USA.  */
   USA.  */
 
 
/* Written by Ulrich Drepper <drepper@gnu.org>, 1995.  */
/* Written by Ulrich Drepper <drepper@gnu.org>, 1995.  */
/* Win32 code written by Tor Lillqvist <tml@iki.fi>.  */
/* Win32 code written by Tor Lillqvist <tml@iki.fi>.  */
 
 
#ifdef HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
# include <config.h>
# include <config.h>
#endif
#endif
 
 
#include <stdlib.h>
#include <stdlib.h>
#include <locale.h>
#include <locale.h>
 
 
#if defined _WIN32 || defined __WIN32__
#if defined _WIN32 || defined __WIN32__
# undef WIN32   /* avoid warning on mingw32 */
# undef WIN32   /* avoid warning on mingw32 */
# define WIN32
# define WIN32
#endif
#endif
 
 
#ifdef WIN32
#ifdef WIN32
# define WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
# include <windows.h>
/* Mingw headers don't have latest language and sublanguage codes.  */
/* Mingw headers don't have latest language and sublanguage codes.  */
# ifndef LANG_AFRIKAANS
# ifndef LANG_AFRIKAANS
# define LANG_AFRIKAANS 0x36
# define LANG_AFRIKAANS 0x36
# endif
# endif
# ifndef LANG_ALBANIAN
# ifndef LANG_ALBANIAN
# define LANG_ALBANIAN 0x1c
# define LANG_ALBANIAN 0x1c
# endif
# endif
# ifndef LANG_ARABIC
# ifndef LANG_ARABIC
# define LANG_ARABIC 0x01
# define LANG_ARABIC 0x01
# endif
# endif
# ifndef LANG_ARMENIAN
# ifndef LANG_ARMENIAN
# define LANG_ARMENIAN 0x2b
# define LANG_ARMENIAN 0x2b
# endif
# endif
# ifndef LANG_ASSAMESE
# ifndef LANG_ASSAMESE
# define LANG_ASSAMESE 0x4d
# define LANG_ASSAMESE 0x4d
# endif
# endif
# ifndef LANG_AZERI
# ifndef LANG_AZERI
# define LANG_AZERI 0x2c
# define LANG_AZERI 0x2c
# endif
# endif
# ifndef LANG_BASQUE
# ifndef LANG_BASQUE
# define LANG_BASQUE 0x2d
# define LANG_BASQUE 0x2d
# endif
# endif
# ifndef LANG_BELARUSIAN
# ifndef LANG_BELARUSIAN
# define LANG_BELARUSIAN 0x23
# define LANG_BELARUSIAN 0x23
# endif
# endif
# ifndef LANG_BENGALI
# ifndef LANG_BENGALI
# define LANG_BENGALI 0x45
# define LANG_BENGALI 0x45
# endif
# endif
# ifndef LANG_CATALAN
# ifndef LANG_CATALAN
# define LANG_CATALAN 0x03
# define LANG_CATALAN 0x03
# endif
# endif
# ifndef LANG_DIVEHI
# ifndef LANG_DIVEHI
# define LANG_DIVEHI 0x65
# define LANG_DIVEHI 0x65
# endif
# endif
# ifndef LANG_ESTONIAN
# ifndef LANG_ESTONIAN
# define LANG_ESTONIAN 0x25
# define LANG_ESTONIAN 0x25
# endif
# endif
# ifndef LANG_FAEROESE
# ifndef LANG_FAEROESE
# define LANG_FAEROESE 0x38
# define LANG_FAEROESE 0x38
# endif
# endif
# ifndef LANG_FARSI
# ifndef LANG_FARSI
# define LANG_FARSI 0x29
# define LANG_FARSI 0x29
# endif
# endif
# ifndef LANG_GALICIAN
# ifndef LANG_GALICIAN
# define LANG_GALICIAN 0x56
# define LANG_GALICIAN 0x56
# endif
# endif
# ifndef LANG_GEORGIAN
# ifndef LANG_GEORGIAN
# define LANG_GEORGIAN 0x37
# define LANG_GEORGIAN 0x37
# endif
# endif
# ifndef LANG_GUJARATI
# ifndef LANG_GUJARATI
# define LANG_GUJARATI 0x47
# define LANG_GUJARATI 0x47
# endif
# endif
# ifndef LANG_HEBREW
# ifndef LANG_HEBREW
# define LANG_HEBREW 0x0d
# define LANG_HEBREW 0x0d
# endif
# endif
# ifndef LANG_HINDI
# ifndef LANG_HINDI
# define LANG_HINDI 0x39
# define LANG_HINDI 0x39
# endif
# endif
# ifndef LANG_INDONESIAN
# ifndef LANG_INDONESIAN
# define LANG_INDONESIAN 0x21
# define LANG_INDONESIAN 0x21
# endif
# endif
# ifndef LANG_KANNADA
# ifndef LANG_KANNADA
# define LANG_KANNADA 0x4b
# define LANG_KANNADA 0x4b
# endif
# endif
# ifndef LANG_KASHMIRI
# ifndef LANG_KASHMIRI
# define LANG_KASHMIRI 0x60
# define LANG_KASHMIRI 0x60
# endif
# endif
# ifndef LANG_KAZAK
# ifndef LANG_KAZAK
# define LANG_KAZAK 0x3f
# define LANG_KAZAK 0x3f
# endif
# endif
# ifndef LANG_KONKANI
# ifndef LANG_KONKANI
# define LANG_KONKANI 0x57
# define LANG_KONKANI 0x57
# endif
# endif
# ifndef LANG_KYRGYZ
# ifndef LANG_KYRGYZ
# define LANG_KYRGYZ 0x40
# define LANG_KYRGYZ 0x40
# endif
# endif
# ifndef LANG_LATVIAN
# ifndef LANG_LATVIAN
# define LANG_LATVIAN 0x26
# define LANG_LATVIAN 0x26
# endif
# endif
# ifndef LANG_LITHUANIAN
# ifndef LANG_LITHUANIAN
# define LANG_LITHUANIAN 0x27
# define LANG_LITHUANIAN 0x27
# endif
# endif
# ifndef LANG_MACEDONIAN
# ifndef LANG_MACEDONIAN
# define LANG_MACEDONIAN 0x2f
# define LANG_MACEDONIAN 0x2f
# endif
# endif
# ifndef LANG_MALAY
# ifndef LANG_MALAY
# define LANG_MALAY 0x3e
# define LANG_MALAY 0x3e
# endif
# endif
# ifndef LANG_MALAYALAM
# ifndef LANG_MALAYALAM
# define LANG_MALAYALAM 0x4c
# define LANG_MALAYALAM 0x4c
# endif
# endif
# ifndef LANG_MANIPURI
# ifndef LANG_MANIPURI
# define LANG_MANIPURI 0x58
# define LANG_MANIPURI 0x58
# endif
# endif
# ifndef LANG_MARATHI
# ifndef LANG_MARATHI
# define LANG_MARATHI 0x4e
# define LANG_MARATHI 0x4e
# endif
# endif
# ifndef LANG_MONGOLIAN
# ifndef LANG_MONGOLIAN
# define LANG_MONGOLIAN 0x50
# define LANG_MONGOLIAN 0x50
# endif
# endif
# ifndef LANG_NEPALI
# ifndef LANG_NEPALI
# define LANG_NEPALI 0x61
# define LANG_NEPALI 0x61
# endif
# endif
# ifndef LANG_ORIYA
# ifndef LANG_ORIYA
# define LANG_ORIYA 0x48
# define LANG_ORIYA 0x48
# endif
# endif
# ifndef LANG_PUNJABI
# ifndef LANG_PUNJABI
# define LANG_PUNJABI 0x46
# define LANG_PUNJABI 0x46
# endif
# endif
# ifndef LANG_SANSKRIT
# ifndef LANG_SANSKRIT
# define LANG_SANSKRIT 0x4f
# define LANG_SANSKRIT 0x4f
# endif
# endif
# ifndef LANG_SERBIAN
# ifndef LANG_SERBIAN
# define LANG_SERBIAN 0x1a
# define LANG_SERBIAN 0x1a
# endif
# endif
# ifndef LANG_SINDHI
# ifndef LANG_SINDHI
# define LANG_SINDHI 0x59
# define LANG_SINDHI 0x59
# endif
# endif
# ifndef LANG_SLOVAK
# ifndef LANG_SLOVAK
# define LANG_SLOVAK 0x1b
# define LANG_SLOVAK 0x1b
# endif
# endif
# ifndef LANG_SORBIAN
# ifndef LANG_SORBIAN
# define LANG_SORBIAN 0x2e
# define LANG_SORBIAN 0x2e
# endif
# endif
# ifndef LANG_SWAHILI
# ifndef LANG_SWAHILI
# define LANG_SWAHILI 0x41
# define LANG_SWAHILI 0x41
# endif
# endif
# ifndef LANG_SYRIAC
# ifndef LANG_SYRIAC
# define LANG_SYRIAC 0x5a
# define LANG_SYRIAC 0x5a
# endif
# endif
# ifndef LANG_TAMIL
# ifndef LANG_TAMIL
# define LANG_TAMIL 0x49
# define LANG_TAMIL 0x49
# endif
# endif
# ifndef LANG_TATAR
# ifndef LANG_TATAR
# define LANG_TATAR 0x44
# define LANG_TATAR 0x44
# endif
# endif
# ifndef LANG_TELUGU
# ifndef LANG_TELUGU
# define LANG_TELUGU 0x4a
# define LANG_TELUGU 0x4a
# endif
# endif
# ifndef LANG_THAI
# ifndef LANG_THAI
# define LANG_THAI 0x1e
# define LANG_THAI 0x1e
# endif
# endif
# ifndef LANG_UKRAINIAN
# ifndef LANG_UKRAINIAN
# define LANG_UKRAINIAN 0x22
# define LANG_UKRAINIAN 0x22
# endif
# endif
# ifndef LANG_URDU
# ifndef LANG_URDU
# define LANG_URDU 0x20
# define LANG_URDU 0x20
# endif
# endif
# ifndef LANG_UZBEK
# ifndef LANG_UZBEK
# define LANG_UZBEK 0x43
# define LANG_UZBEK 0x43
# endif
# endif
# ifndef LANG_VIETNAMESE
# ifndef LANG_VIETNAMESE
# define LANG_VIETNAMESE 0x2a
# define LANG_VIETNAMESE 0x2a
# endif
# endif
# ifndef SUBLANG_ARABIC_SAUDI_ARABIA
# ifndef SUBLANG_ARABIC_SAUDI_ARABIA
# define SUBLANG_ARABIC_SAUDI_ARABIA 0x01
# define SUBLANG_ARABIC_SAUDI_ARABIA 0x01
# endif
# endif
# ifndef SUBLANG_ARABIC_IRAQ
# ifndef SUBLANG_ARABIC_IRAQ
# define SUBLANG_ARABIC_IRAQ 0x02
# define SUBLANG_ARABIC_IRAQ 0x02
# endif
# endif
# ifndef SUBLANG_ARABIC_EGYPT
# ifndef SUBLANG_ARABIC_EGYPT
# define SUBLANG_ARABIC_EGYPT 0x03
# define SUBLANG_ARABIC_EGYPT 0x03
# endif
# endif
# ifndef SUBLANG_ARABIC_LIBYA
# ifndef SUBLANG_ARABIC_LIBYA
# define SUBLANG_ARABIC_LIBYA 0x04
# define SUBLANG_ARABIC_LIBYA 0x04
# endif
# endif
# ifndef SUBLANG_ARABIC_ALGERIA
# ifndef SUBLANG_ARABIC_ALGERIA
# define SUBLANG_ARABIC_ALGERIA 0x05
# define SUBLANG_ARABIC_ALGERIA 0x05
# endif
# endif
# ifndef SUBLANG_ARABIC_MOROCCO
# ifndef SUBLANG_ARABIC_MOROCCO
# define SUBLANG_ARABIC_MOROCCO 0x06
# define SUBLANG_ARABIC_MOROCCO 0x06
# endif
# endif
# ifndef SUBLANG_ARABIC_TUNISIA
# ifndef SUBLANG_ARABIC_TUNISIA
# define SUBLANG_ARABIC_TUNISIA 0x07
# define SUBLANG_ARABIC_TUNISIA 0x07
# endif
# endif
# ifndef SUBLANG_ARABIC_OMAN
# ifndef SUBLANG_ARABIC_OMAN
# define SUBLANG_ARABIC_OMAN 0x08
# define SUBLANG_ARABIC_OMAN 0x08
# endif
# endif
# ifndef SUBLANG_ARABIC_YEMEN
# ifndef SUBLANG_ARABIC_YEMEN
# define SUBLANG_ARABIC_YEMEN 0x09
# define SUBLANG_ARABIC_YEMEN 0x09
# endif
# endif
# ifndef SUBLANG_ARABIC_SYRIA
# ifndef SUBLANG_ARABIC_SYRIA
# define SUBLANG_ARABIC_SYRIA 0x0a
# define SUBLANG_ARABIC_SYRIA 0x0a
# endif
# endif
# ifndef SUBLANG_ARABIC_JORDAN
# ifndef SUBLANG_ARABIC_JORDAN
# define SUBLANG_ARABIC_JORDAN 0x0b
# define SUBLANG_ARABIC_JORDAN 0x0b
# endif
# endif
# ifndef SUBLANG_ARABIC_LEBANON
# ifndef SUBLANG_ARABIC_LEBANON
# define SUBLANG_ARABIC_LEBANON 0x0c
# define SUBLANG_ARABIC_LEBANON 0x0c
# endif
# endif
# ifndef SUBLANG_ARABIC_KUWAIT
# ifndef SUBLANG_ARABIC_KUWAIT
# define SUBLANG_ARABIC_KUWAIT 0x0d
# define SUBLANG_ARABIC_KUWAIT 0x0d
# endif
# endif
# ifndef SUBLANG_ARABIC_UAE
# ifndef SUBLANG_ARABIC_UAE
# define SUBLANG_ARABIC_UAE 0x0e
# define SUBLANG_ARABIC_UAE 0x0e
# endif
# endif
# ifndef SUBLANG_ARABIC_BAHRAIN
# ifndef SUBLANG_ARABIC_BAHRAIN
# define SUBLANG_ARABIC_BAHRAIN 0x0f
# define SUBLANG_ARABIC_BAHRAIN 0x0f
# endif
# endif
# ifndef SUBLANG_ARABIC_QATAR
# ifndef SUBLANG_ARABIC_QATAR
# define SUBLANG_ARABIC_QATAR 0x10
# define SUBLANG_ARABIC_QATAR 0x10
# endif
# endif
# ifndef SUBLANG_AZERI_LATIN
# ifndef SUBLANG_AZERI_LATIN
# define SUBLANG_AZERI_LATIN 0x01
# define SUBLANG_AZERI_LATIN 0x01
# endif
# endif
# ifndef SUBLANG_AZERI_CYRILLIC
# ifndef SUBLANG_AZERI_CYRILLIC
# define SUBLANG_AZERI_CYRILLIC 0x02
# define SUBLANG_AZERI_CYRILLIC 0x02
# endif
# endif
# ifndef SUBLANG_CHINESE_MACAU
# ifndef SUBLANG_CHINESE_MACAU
# define SUBLANG_CHINESE_MACAU 0x05
# define SUBLANG_CHINESE_MACAU 0x05
# endif
# endif
# ifndef SUBLANG_ENGLISH_SOUTH_AFRICA
# ifndef SUBLANG_ENGLISH_SOUTH_AFRICA
# define SUBLANG_ENGLISH_SOUTH_AFRICA 0x07
# define SUBLANG_ENGLISH_SOUTH_AFRICA 0x07
# endif
# endif
# ifndef SUBLANG_ENGLISH_JAMAICA
# ifndef SUBLANG_ENGLISH_JAMAICA
# define SUBLANG_ENGLISH_JAMAICA 0x08
# define SUBLANG_ENGLISH_JAMAICA 0x08
# endif
# endif
# ifndef SUBLANG_ENGLISH_CARIBBEAN
# ifndef SUBLANG_ENGLISH_CARIBBEAN
# define SUBLANG_ENGLISH_CARIBBEAN 0x09
# define SUBLANG_ENGLISH_CARIBBEAN 0x09
# endif
# endif
# ifndef SUBLANG_ENGLISH_BELIZE
# ifndef SUBLANG_ENGLISH_BELIZE
# define SUBLANG_ENGLISH_BELIZE 0x0a
# define SUBLANG_ENGLISH_BELIZE 0x0a
# endif
# endif
# ifndef SUBLANG_ENGLISH_TRINIDAD
# ifndef SUBLANG_ENGLISH_TRINIDAD
# define SUBLANG_ENGLISH_TRINIDAD 0x0b
# define SUBLANG_ENGLISH_TRINIDAD 0x0b
# endif
# endif
# ifndef SUBLANG_ENGLISH_ZIMBABWE
# ifndef SUBLANG_ENGLISH_ZIMBABWE
# define SUBLANG_ENGLISH_ZIMBABWE 0x0c
# define SUBLANG_ENGLISH_ZIMBABWE 0x0c
# endif
# endif
# ifndef SUBLANG_ENGLISH_PHILIPPINES
# ifndef SUBLANG_ENGLISH_PHILIPPINES
# define SUBLANG_ENGLISH_PHILIPPINES 0x0d
# define SUBLANG_ENGLISH_PHILIPPINES 0x0d
# endif
# endif
# ifndef SUBLANG_FRENCH_LUXEMBOURG
# ifndef SUBLANG_FRENCH_LUXEMBOURG
# define SUBLANG_FRENCH_LUXEMBOURG 0x05
# define SUBLANG_FRENCH_LUXEMBOURG 0x05
# endif
# endif
# ifndef SUBLANG_FRENCH_MONACO
# ifndef SUBLANG_FRENCH_MONACO
# define SUBLANG_FRENCH_MONACO 0x06
# define SUBLANG_FRENCH_MONACO 0x06
# endif
# endif
# ifndef SUBLANG_GERMAN_LUXEMBOURG
# ifndef SUBLANG_GERMAN_LUXEMBOURG
# define SUBLANG_GERMAN_LUXEMBOURG 0x04
# define SUBLANG_GERMAN_LUXEMBOURG 0x04
# endif
# endif
# ifndef SUBLANG_GERMAN_LIECHTENSTEIN
# ifndef SUBLANG_GERMAN_LIECHTENSTEIN
# define SUBLANG_GERMAN_LIECHTENSTEIN 0x05
# define SUBLANG_GERMAN_LIECHTENSTEIN 0x05
# endif
# endif
# ifndef SUBLANG_KASHMIRI_INDIA
# ifndef SUBLANG_KASHMIRI_INDIA
# define SUBLANG_KASHMIRI_INDIA 0x02
# define SUBLANG_KASHMIRI_INDIA 0x02
# endif
# endif
# ifndef SUBLANG_MALAY_MALAYSIA
# ifndef SUBLANG_MALAY_MALAYSIA
# define SUBLANG_MALAY_MALAYSIA 0x01
# define SUBLANG_MALAY_MALAYSIA 0x01
# endif
# endif
# ifndef SUBLANG_MALAY_BRUNEI_DARUSSALAM
# ifndef SUBLANG_MALAY_BRUNEI_DARUSSALAM
# define SUBLANG_MALAY_BRUNEI_DARUSSALAM 0x02
# define SUBLANG_MALAY_BRUNEI_DARUSSALAM 0x02
# endif
# endif
# ifndef SUBLANG_NEPALI_INDIA
# ifndef SUBLANG_NEPALI_INDIA
# define SUBLANG_NEPALI_INDIA 0x02
# define SUBLANG_NEPALI_INDIA 0x02
# endif
# endif
# ifndef SUBLANG_SERBIAN_LATIN
# ifndef SUBLANG_SERBIAN_LATIN
# define SUBLANG_SERBIAN_LATIN 0x02
# define SUBLANG_SERBIAN_LATIN 0x02
# endif
# endif
# ifndef SUBLANG_SERBIAN_CYRILLIC
# ifndef SUBLANG_SERBIAN_CYRILLIC
# define SUBLANG_SERBIAN_CYRILLIC 0x03
# define SUBLANG_SERBIAN_CYRILLIC 0x03
# endif
# endif
# ifndef SUBLANG_SPANISH_GUATEMALA
# ifndef SUBLANG_SPANISH_GUATEMALA
# define SUBLANG_SPANISH_GUATEMALA 0x04
# define SUBLANG_SPANISH_GUATEMALA 0x04
# endif
# endif
# ifndef SUBLANG_SPANISH_COSTA_RICA
# ifndef SUBLANG_SPANISH_COSTA_RICA
# define SUBLANG_SPANISH_COSTA_RICA 0x05
# define SUBLANG_SPANISH_COSTA_RICA 0x05
# endif
# endif
# ifndef SUBLANG_SPANISH_PANAMA
# ifndef SUBLANG_SPANISH_PANAMA
# define SUBLANG_SPANISH_PANAMA 0x06
# define SUBLANG_SPANISH_PANAMA 0x06
# endif
# endif
# ifndef SUBLANG_SPANISH_DOMINICAN_REPUBLIC
# ifndef SUBLANG_SPANISH_DOMINICAN_REPUBLIC
# define SUBLANG_SPANISH_DOMINICAN_REPUBLIC 0x07
# define SUBLANG_SPANISH_DOMINICAN_REPUBLIC 0x07
# endif
# endif
# ifndef SUBLANG_SPANISH_VENEZUELA
# ifndef SUBLANG_SPANISH_VENEZUELA
# define SUBLANG_SPANISH_VENEZUELA 0x08
# define SUBLANG_SPANISH_VENEZUELA 0x08
# endif
# endif
# ifndef SUBLANG_SPANISH_COLOMBIA
# ifndef SUBLANG_SPANISH_COLOMBIA
# define SUBLANG_SPANISH_COLOMBIA 0x09
# define SUBLANG_SPANISH_COLOMBIA 0x09
# endif
# endif
# ifndef SUBLANG_SPANISH_PERU
# ifndef SUBLANG_SPANISH_PERU
# define SUBLANG_SPANISH_PERU 0x0a
# define SUBLANG_SPANISH_PERU 0x0a
# endif
# endif
# ifndef SUBLANG_SPANISH_ARGENTINA
# ifndef SUBLANG_SPANISH_ARGENTINA
# define SUBLANG_SPANISH_ARGENTINA 0x0b
# define SUBLANG_SPANISH_ARGENTINA 0x0b
# endif
# endif
# ifndef SUBLANG_SPANISH_ECUADOR
# ifndef SUBLANG_SPANISH_ECUADOR
# define SUBLANG_SPANISH_ECUADOR 0x0c
# define SUBLANG_SPANISH_ECUADOR 0x0c
# endif
# endif
# ifndef SUBLANG_SPANISH_CHILE
# ifndef SUBLANG_SPANISH_CHILE
# define SUBLANG_SPANISH_CHILE 0x0d
# define SUBLANG_SPANISH_CHILE 0x0d
# endif
# endif
# ifndef SUBLANG_SPANISH_URUGUAY
# ifndef SUBLANG_SPANISH_URUGUAY
# define SUBLANG_SPANISH_URUGUAY 0x0e
# define SUBLANG_SPANISH_URUGUAY 0x0e
# endif
# endif
# ifndef SUBLANG_SPANISH_PARAGUAY
# ifndef SUBLANG_SPANISH_PARAGUAY
# define SUBLANG_SPANISH_PARAGUAY 0x0f
# define SUBLANG_SPANISH_PARAGUAY 0x0f
# endif
# endif
# ifndef SUBLANG_SPANISH_BOLIVIA
# ifndef SUBLANG_SPANISH_BOLIVIA
# define SUBLANG_SPANISH_BOLIVIA 0x10
# define SUBLANG_SPANISH_BOLIVIA 0x10
# endif
# endif
# ifndef SUBLANG_SPANISH_EL_SALVADOR
# ifndef SUBLANG_SPANISH_EL_SALVADOR
# define SUBLANG_SPANISH_EL_SALVADOR 0x11
# define SUBLANG_SPANISH_EL_SALVADOR 0x11
# endif
# endif
# ifndef SUBLANG_SPANISH_HONDURAS
# ifndef SUBLANG_SPANISH_HONDURAS
# define SUBLANG_SPANISH_HONDURAS 0x12
# define SUBLANG_SPANISH_HONDURAS 0x12
# endif
# endif
# ifndef SUBLANG_SPANISH_NICARAGUA
# ifndef SUBLANG_SPANISH_NICARAGUA
# define SUBLANG_SPANISH_NICARAGUA 0x13
# define SUBLANG_SPANISH_NICARAGUA 0x13
# endif
# endif
# ifndef SUBLANG_SPANISH_PUERTO_RICO
# ifndef SUBLANG_SPANISH_PUERTO_RICO
# define SUBLANG_SPANISH_PUERTO_RICO 0x14
# define SUBLANG_SPANISH_PUERTO_RICO 0x14
# endif
# endif
# ifndef SUBLANG_SWEDISH_FINLAND
# ifndef SUBLANG_SWEDISH_FINLAND
# define SUBLANG_SWEDISH_FINLAND 0x02
# define SUBLANG_SWEDISH_FINLAND 0x02
# endif
# endif
# ifndef SUBLANG_URDU_PAKISTAN
# ifndef SUBLANG_URDU_PAKISTAN
# define SUBLANG_URDU_PAKISTAN 0x01
# define SUBLANG_URDU_PAKISTAN 0x01
# endif
# endif
# ifndef SUBLANG_URDU_INDIA
# ifndef SUBLANG_URDU_INDIA
# define SUBLANG_URDU_INDIA 0x02
# define SUBLANG_URDU_INDIA 0x02
# endif
# endif
# ifndef SUBLANG_UZBEK_LATIN
# ifndef SUBLANG_UZBEK_LATIN
# define SUBLANG_UZBEK_LATIN 0x01
# define SUBLANG_UZBEK_LATIN 0x01
# endif
# endif
# ifndef SUBLANG_UZBEK_CYRILLIC
# ifndef SUBLANG_UZBEK_CYRILLIC
# define SUBLANG_UZBEK_CYRILLIC 0x02
# define SUBLANG_UZBEK_CYRILLIC 0x02
# endif
# endif
#endif
#endif
 
 
/* XPG3 defines the result of 'setlocale (category, NULL)' as:
/* XPG3 defines the result of 'setlocale (category, NULL)' as:
   "Directs 'setlocale()' to query 'category' and return the current
   "Directs 'setlocale()' to query 'category' and return the current
    setting of 'local'."
    setting of 'local'."
   However it does not specify the exact format.  Neither do SUSV2 and
   However it does not specify the exact format.  Neither do SUSV2 and
   ISO C 99.  So we can use this feature only on selected systems (e.g.
   ISO C 99.  So we can use this feature only on selected systems (e.g.
   those using GNU C Library).  */
   those using GNU C Library).  */
#if defined _LIBC || (defined __GNU_LIBRARY__ && __GNU_LIBRARY__ >= 2)
#if defined _LIBC || (defined __GNU_LIBRARY__ && __GNU_LIBRARY__ >= 2)
# define HAVE_LOCALE_NULL
# define HAVE_LOCALE_NULL
#endif
#endif
 
 
/* Determine the current locale's name, and canonicalize it into XPG syntax
/* Determine the current locale's name, and canonicalize it into XPG syntax
     language[_territory[.codeset]][@modifier]
     language[_territory[.codeset]][@modifier]
   The codeset part in the result is not reliable; the locale_charset()
   The codeset part in the result is not reliable; the locale_charset()
   should be used for codeset information instead.
   should be used for codeset information instead.
   The result must not be freed; it is statically allocated.  */
   The result must not be freed; it is statically allocated.  */
 
 
const char *
const char *
_nl_locale_name (category, categoryname)
_nl_locale_name (category, categoryname)
     int category;
     int category;
     const char *categoryname;
     const char *categoryname;
{
{
  const char *retval;
  const char *retval;
 
 
#ifndef WIN32
#ifndef WIN32
 
 
  /* Use the POSIX methods of looking to 'LC_ALL', 'LC_xxx', and 'LANG'.
  /* Use the POSIX methods of looking to 'LC_ALL', 'LC_xxx', and 'LANG'.
     On some systems this can be done by the 'setlocale' function itself.  */
     On some systems this can be done by the 'setlocale' function itself.  */
# if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL
# if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL
  retval = setlocale (category, NULL);
  retval = setlocale (category, NULL);
# else
# else
  /* Setting of LC_ALL overwrites all other.  */
  /* Setting of LC_ALL overwrites all other.  */
  retval = getenv ("LC_ALL");
  retval = getenv ("LC_ALL");
  if (retval == NULL || retval[0] == '\0')
  if (retval == NULL || retval[0] == '\0')
    {
    {
      /* Next comes the name of the desired category.  */
      /* Next comes the name of the desired category.  */
      retval = getenv (categoryname);
      retval = getenv (categoryname);
      if (retval == NULL || retval[0] == '\0')
      if (retval == NULL || retval[0] == '\0')
        {
        {
          /* Last possibility is the LANG environment variable.  */
          /* Last possibility is the LANG environment variable.  */
          retval = getenv ("LANG");
          retval = getenv ("LANG");
          if (retval == NULL || retval[0] == '\0')
          if (retval == NULL || retval[0] == '\0')
            /* We use C as the default domain.  POSIX says this is
            /* We use C as the default domain.  POSIX says this is
               implementation defined.  */
               implementation defined.  */
            retval = "C";
            retval = "C";
        }
        }
    }
    }
# endif
# endif
 
 
  return retval;
  return retval;
 
 
#else /* WIN32 */
#else /* WIN32 */
 
 
  /* Return an XPG style locale name language[_territory][@modifier].
  /* Return an XPG style locale name language[_territory][@modifier].
     Don't even bother determining the codeset; it's not useful in this
     Don't even bother determining the codeset; it's not useful in this
     context, because message catalogs are not specific to a single
     context, because message catalogs are not specific to a single
     codeset.  */
     codeset.  */
 
 
  LCID lcid;
  LCID lcid;
  LANGID langid;
  LANGID langid;
  int primary, sub;
  int primary, sub;
 
 
  /* Let the user override the system settings through environment
  /* Let the user override the system settings through environment
     variables, as on POSIX systems.  */
     variables, as on POSIX systems.  */
  retval = getenv ("LC_ALL");
  retval = getenv ("LC_ALL");
  if (retval != NULL && retval[0] != '\0')
  if (retval != NULL && retval[0] != '\0')
    return retval;
    return retval;
  retval = getenv (categoryname);
  retval = getenv (categoryname);
  if (retval != NULL && retval[0] != '\0')
  if (retval != NULL && retval[0] != '\0')
    return retval;
    return retval;
  retval = getenv ("LANG");
  retval = getenv ("LANG");
  if (retval != NULL && retval[0] != '\0')
  if (retval != NULL && retval[0] != '\0')
    return retval;
    return retval;
 
 
  /* Use native Win32 API locale ID.  */
  /* Use native Win32 API locale ID.  */
  lcid = GetThreadLocale ();
  lcid = GetThreadLocale ();
 
 
  /* Strip off the sorting rules, keep only the language part.  */
  /* Strip off the sorting rules, keep only the language part.  */
  langid = LANGIDFROMLCID (lcid);
  langid = LANGIDFROMLCID (lcid);
 
 
  /* Split into language and territory part.  */
  /* Split into language and territory part.  */
  primary = PRIMARYLANGID (langid);
  primary = PRIMARYLANGID (langid);
  sub = SUBLANGID (langid);
  sub = SUBLANGID (langid);
 
 
  /* Dispatch on language.
  /* Dispatch on language.
     See also http://www.unicode.org/unicode/onlinedat/languages.html .
     See also http://www.unicode.org/unicode/onlinedat/languages.html .
     For details about languages, see http://www.ethnologue.com/ .  */
     For details about languages, see http://www.ethnologue.com/ .  */
  switch (primary)
  switch (primary)
    {
    {
    case LANG_AFRIKAANS: return "af_ZA";
    case LANG_AFRIKAANS: return "af_ZA";
    case LANG_ALBANIAN: return "sq_AL";
    case LANG_ALBANIAN: return "sq_AL";
    case 0x5e: /* AMHARIC */ return "am_ET";
    case 0x5e: /* AMHARIC */ return "am_ET";
    case LANG_ARABIC:
    case LANG_ARABIC:
      switch (sub)
      switch (sub)
        {
        {
        case SUBLANG_ARABIC_SAUDI_ARABIA: return "ar_SA";
        case SUBLANG_ARABIC_SAUDI_ARABIA: return "ar_SA";
        case SUBLANG_ARABIC_IRAQ: return "ar_IQ";
        case SUBLANG_ARABIC_IRAQ: return "ar_IQ";
        case SUBLANG_ARABIC_EGYPT: return "ar_EG";
        case SUBLANG_ARABIC_EGYPT: return "ar_EG";
        case SUBLANG_ARABIC_LIBYA: return "ar_LY";
        case SUBLANG_ARABIC_LIBYA: return "ar_LY";
        case SUBLANG_ARABIC_ALGERIA: return "ar_DZ";
        case SUBLANG_ARABIC_ALGERIA: return "ar_DZ";
        case SUBLANG_ARABIC_MOROCCO: return "ar_MA";
        case SUBLANG_ARABIC_MOROCCO: return "ar_MA";
        case SUBLANG_ARABIC_TUNISIA: return "ar_TN";
        case SUBLANG_ARABIC_TUNISIA: return "ar_TN";
        case SUBLANG_ARABIC_OMAN: return "ar_OM";
        case SUBLANG_ARABIC_OMAN: return "ar_OM";
        case SUBLANG_ARABIC_YEMEN: return "ar_YE";
        case SUBLANG_ARABIC_YEMEN: return "ar_YE";
        case SUBLANG_ARABIC_SYRIA: return "ar_SY";
        case SUBLANG_ARABIC_SYRIA: return "ar_SY";
        case SUBLANG_ARABIC_JORDAN: return "ar_JO";
        case SUBLANG_ARABIC_JORDAN: return "ar_JO";
        case SUBLANG_ARABIC_LEBANON: return "ar_LB";
        case SUBLANG_ARABIC_LEBANON: return "ar_LB";
        case SUBLANG_ARABIC_KUWAIT: return "ar_KW";
        case SUBLANG_ARABIC_KUWAIT: return "ar_KW";
        case SUBLANG_ARABIC_UAE: return "ar_AE";
        case SUBLANG_ARABIC_UAE: return "ar_AE";
        case SUBLANG_ARABIC_BAHRAIN: return "ar_BH";
        case SUBLANG_ARABIC_BAHRAIN: return "ar_BH";
        case SUBLANG_ARABIC_QATAR: return "ar_QA";
        case SUBLANG_ARABIC_QATAR: return "ar_QA";
        }
        }
      return "ar";
      return "ar";
    case LANG_ARMENIAN: return "hy_AM";
    case LANG_ARMENIAN: return "hy_AM";
    case LANG_ASSAMESE: return "as_IN";
    case LANG_ASSAMESE: return "as_IN";
    case LANG_AZERI:
    case LANG_AZERI:
      switch (sub)
      switch (sub)
        {
        {
        /* FIXME: Adjust this when Azerbaijani locales appear on Unix.  */
        /* FIXME: Adjust this when Azerbaijani locales appear on Unix.  */
        case SUBLANG_AZERI_LATIN: return "az_AZ@latin";
        case SUBLANG_AZERI_LATIN: return "az_AZ@latin";
        case SUBLANG_AZERI_CYRILLIC: return "az_AZ@cyrillic";
        case SUBLANG_AZERI_CYRILLIC: return "az_AZ@cyrillic";
        }
        }
      return "az";
      return "az";
    case LANG_BASQUE:
    case LANG_BASQUE:
      return "eu"; /* Ambiguous: could be "eu_ES" or "eu_FR".  */
      return "eu"; /* Ambiguous: could be "eu_ES" or "eu_FR".  */
    case LANG_BELARUSIAN: return "be_BY";
    case LANG_BELARUSIAN: return "be_BY";
    case LANG_BENGALI: return "bn_IN";
    case LANG_BENGALI: return "bn_IN";
    case LANG_BULGARIAN: return "bg_BG";
    case LANG_BULGARIAN: return "bg_BG";
    case 0x55: /* BURMESE */ return "my_MM";
    case 0x55: /* BURMESE */ return "my_MM";
    case 0x53: /* CAMBODIAN */ return "km_KH";
    case 0x53: /* CAMBODIAN */ return "km_KH";
    case LANG_CATALAN: return "ca_ES";
    case LANG_CATALAN: return "ca_ES";
    case 0x5c: /* CHEROKEE */ return "chr_US";
    case 0x5c: /* CHEROKEE */ return "chr_US";
    case LANG_CHINESE:
    case LANG_CHINESE:
      switch (sub)
      switch (sub)
        {
        {
        case SUBLANG_CHINESE_TRADITIONAL: return "zh_TW";
        case SUBLANG_CHINESE_TRADITIONAL: return "zh_TW";
        case SUBLANG_CHINESE_SIMPLIFIED: return "zh_CN";
        case SUBLANG_CHINESE_SIMPLIFIED: return "zh_CN";
        case SUBLANG_CHINESE_HONGKONG: return "zh_HK";
        case SUBLANG_CHINESE_HONGKONG: return "zh_HK";
        case SUBLANG_CHINESE_SINGAPORE: return "zh_SG";
        case SUBLANG_CHINESE_SINGAPORE: return "zh_SG";
        case SUBLANG_CHINESE_MACAU: return "zh_MO";
        case SUBLANG_CHINESE_MACAU: return "zh_MO";
        }
        }
      return "zh";
      return "zh";
    case LANG_CROATIAN:         /* LANG_CROATIAN == LANG_SERBIAN
    case LANG_CROATIAN:         /* LANG_CROATIAN == LANG_SERBIAN
                                 * What used to be called Serbo-Croatian
                                 * What used to be called Serbo-Croatian
                                 * should really now be two separate
                                 * should really now be two separate
                                 * languages because of political reasons.
                                 * languages because of political reasons.
                                 * (Says tml, who knows nothing about Serbian
                                 * (Says tml, who knows nothing about Serbian
                                 * or Croatian.)
                                 * or Croatian.)
                                 * (I can feel those flames coming already.)
                                 * (I can feel those flames coming already.)
                                 */
                                 */
      switch (sub)
      switch (sub)
        {
        {
        case SUBLANG_DEFAULT: return "hr_HR";
        case SUBLANG_DEFAULT: return "hr_HR";
        case SUBLANG_SERBIAN_LATIN: return "sr_YU";
        case SUBLANG_SERBIAN_LATIN: return "sr_YU";
        case SUBLANG_SERBIAN_CYRILLIC: return "sr_YU@cyrillic";
        case SUBLANG_SERBIAN_CYRILLIC: return "sr_YU@cyrillic";
        }
        }
      return "hr";
      return "hr";
    case LANG_CZECH: return "cs_CZ";
    case LANG_CZECH: return "cs_CZ";
    case LANG_DANISH: return "da_DK";
    case LANG_DANISH: return "da_DK";
    case LANG_DIVEHI: return "div_MV";
    case LANG_DIVEHI: return "div_MV";
    case LANG_DUTCH:
    case LANG_DUTCH:
      switch (sub)
      switch (sub)
        {
        {
        case SUBLANG_DUTCH: return "nl_NL";
        case SUBLANG_DUTCH: return "nl_NL";
        case SUBLANG_DUTCH_BELGIAN: /* FLEMISH, VLAAMS */ return "nl_BE";
        case SUBLANG_DUTCH_BELGIAN: /* FLEMISH, VLAAMS */ return "nl_BE";
        }
        }
      return "nl";
      return "nl";
    case 0x66: /* EDO */ return "bin_NG";
    case 0x66: /* EDO */ return "bin_NG";
    case LANG_ENGLISH:
    case LANG_ENGLISH:
      switch (sub)
      switch (sub)
        {
        {
        /* SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. Heh. I thought
        /* SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. Heh. I thought
         * English was the language spoken in England.
         * English was the language spoken in England.
         * Oh well.
         * Oh well.
         */
         */
        case SUBLANG_ENGLISH_US: return "en_US";
        case SUBLANG_ENGLISH_US: return "en_US";
        case SUBLANG_ENGLISH_UK: return "en_GB";
        case SUBLANG_ENGLISH_UK: return "en_GB";
        case SUBLANG_ENGLISH_AUS: return "en_AU";
        case SUBLANG_ENGLISH_AUS: return "en_AU";
        case SUBLANG_ENGLISH_CAN: return "en_CA";
        case SUBLANG_ENGLISH_CAN: return "en_CA";
        case SUBLANG_ENGLISH_NZ: return "en_NZ";
        case SUBLANG_ENGLISH_NZ: return "en_NZ";
        case SUBLANG_ENGLISH_EIRE: return "en_IE";
        case SUBLANG_ENGLISH_EIRE: return "en_IE";
        case SUBLANG_ENGLISH_SOUTH_AFRICA: return "en_ZA";
        case SUBLANG_ENGLISH_SOUTH_AFRICA: return "en_ZA";
        case SUBLANG_ENGLISH_JAMAICA: return "en_JM";
        case SUBLANG_ENGLISH_JAMAICA: return "en_JM";
        case SUBLANG_ENGLISH_CARIBBEAN: return "en_GD"; /* Grenada? */
        case SUBLANG_ENGLISH_CARIBBEAN: return "en_GD"; /* Grenada? */
        case SUBLANG_ENGLISH_BELIZE: return "en_BZ";
        case SUBLANG_ENGLISH_BELIZE: return "en_BZ";
        case SUBLANG_ENGLISH_TRINIDAD: return "en_TT";
        case SUBLANG_ENGLISH_TRINIDAD: return "en_TT";
        case SUBLANG_ENGLISH_ZIMBABWE: return "en_ZW";
        case SUBLANG_ENGLISH_ZIMBABWE: return "en_ZW";
        case SUBLANG_ENGLISH_PHILIPPINES: return "en_PH";
        case SUBLANG_ENGLISH_PHILIPPINES: return "en_PH";
        }
        }
      return "en";
      return "en";
    case LANG_ESTONIAN: return "et_EE";
    case LANG_ESTONIAN: return "et_EE";
    case LANG_FAEROESE: return "fo_FO";
    case LANG_FAEROESE: return "fo_FO";
    case LANG_FARSI: return "fa_IR";
    case LANG_FARSI: return "fa_IR";
    case LANG_FINNISH: return "fi_FI";
    case LANG_FINNISH: return "fi_FI";
    case LANG_FRENCH:
    case LANG_FRENCH:
      switch (sub)
      switch (sub)
        {
        {
        case SUBLANG_FRENCH: return "fr_FR";
        case SUBLANG_FRENCH: return "fr_FR";
        case SUBLANG_FRENCH_BELGIAN: /* WALLOON */ return "fr_BE";
        case SUBLANG_FRENCH_BELGIAN: /* WALLOON */ return "fr_BE";
        case SUBLANG_FRENCH_CANADIAN: return "fr_CA";
        case SUBLANG_FRENCH_CANADIAN: return "fr_CA";
        case SUBLANG_FRENCH_SWISS: return "fr_CH";
        case SUBLANG_FRENCH_SWISS: return "fr_CH";
        case SUBLANG_FRENCH_LUXEMBOURG: return "fr_LU";
        case SUBLANG_FRENCH_LUXEMBOURG: return "fr_LU";
        case SUBLANG_FRENCH_MONACO: return "fr_MC";
        case SUBLANG_FRENCH_MONACO: return "fr_MC";
        }
        }
      return "fr";
      return "fr";
    case 0x62: /* FRISIAN */ return "fy_NL";
    case 0x62: /* FRISIAN */ return "fy_NL";
    case 0x67: /* FULFULDE */ return "ful_NG";
    case 0x67: /* FULFULDE */ return "ful_NG";
    case 0x3c: /* GAELIC */
    case 0x3c: /* GAELIC */
      switch (sub)
      switch (sub)
        {
        {
        case 0x01: /* SCOTTISH */ return "gd_GB";
        case 0x01: /* SCOTTISH */ return "gd_GB";
        case 0x02: /* IRISH */ return "ga_IE";
        case 0x02: /* IRISH */ return "ga_IE";
        }
        }
      return "C";
      return "C";
    case LANG_GALICIAN: return "gl_ES";
    case LANG_GALICIAN: return "gl_ES";
    case LANG_GEORGIAN: return "ka_GE";
    case LANG_GEORGIAN: return "ka_GE";
    case LANG_GERMAN:
    case LANG_GERMAN:
      switch (sub)
      switch (sub)
        {
        {
        case SUBLANG_GERMAN: return "de_DE";
        case SUBLANG_GERMAN: return "de_DE";
        case SUBLANG_GERMAN_SWISS: return "de_CH";
        case SUBLANG_GERMAN_SWISS: return "de_CH";
        case SUBLANG_GERMAN_AUSTRIAN: return "de_AT";
        case SUBLANG_GERMAN_AUSTRIAN: return "de_AT";
        case SUBLANG_GERMAN_LUXEMBOURG: return "de_LU";
        case SUBLANG_GERMAN_LUXEMBOURG: return "de_LU";
        case SUBLANG_GERMAN_LIECHTENSTEIN: return "de_LI";
        case SUBLANG_GERMAN_LIECHTENSTEIN: return "de_LI";
        }
        }
      return "de";
      return "de";
    case LANG_GREEK: return "el_GR";
    case LANG_GREEK: return "el_GR";
    case 0x74: /* GUARANI */ return "gn_PY";
    case 0x74: /* GUARANI */ return "gn_PY";
    case LANG_GUJARATI: return "gu_IN";
    case LANG_GUJARATI: return "gu_IN";
    case 0x68: /* HAUSA */ return "ha_NG";
    case 0x68: /* HAUSA */ return "ha_NG";
    case 0x75: /* HAWAIIAN */
    case 0x75: /* HAWAIIAN */
      /* FIXME: Do they mean Hawaiian ("haw_US", 1000 speakers)
      /* FIXME: Do they mean Hawaiian ("haw_US", 1000 speakers)
         or Hawaii Creole English ("cpe_US", 600000 speakers)?  */
         or Hawaii Creole English ("cpe_US", 600000 speakers)?  */
      return "cpe_US";
      return "cpe_US";
    case LANG_HEBREW: return "he_IL";
    case LANG_HEBREW: return "he_IL";
    case LANG_HINDI: return "hi_IN";
    case LANG_HINDI: return "hi_IN";
    case LANG_HUNGARIAN: return "hu_HU";
    case LANG_HUNGARIAN: return "hu_HU";
    case 0x69: /* IBIBIO */ return "nic_NG";
    case 0x69: /* IBIBIO */ return "nic_NG";
    case LANG_ICELANDIC: return "is_IS";
    case LANG_ICELANDIC: return "is_IS";
    case 0x70: /* IGBO */ return "ibo_NG";
    case 0x70: /* IGBO */ return "ibo_NG";
    case LANG_INDONESIAN: return "id_ID";
    case LANG_INDONESIAN: return "id_ID";
    case 0x5d: /* INUKTITUT */ return "iu_CA";
    case 0x5d: /* INUKTITUT */ return "iu_CA";
    case LANG_ITALIAN:
    case LANG_ITALIAN:
      switch (sub)
      switch (sub)
        {
        {
        case SUBLANG_ITALIAN: return "it_IT";
        case SUBLANG_ITALIAN: return "it_IT";
        case SUBLANG_ITALIAN_SWISS: return "it_CH";
        case SUBLANG_ITALIAN_SWISS: return "it_CH";
        }
        }
      return "it";
      return "it";
    case LANG_JAPANESE: return "ja_JP";
    case LANG_JAPANESE: return "ja_JP";
    case LANG_KANNADA: return "kn_IN";
    case LANG_KANNADA: return "kn_IN";
    case 0x71: /* KANURI */ return "kau_NG";
    case 0x71: /* KANURI */ return "kau_NG";
    case LANG_KASHMIRI:
    case LANG_KASHMIRI:
      switch (sub)
      switch (sub)
        {
        {
        case SUBLANG_DEFAULT: return "ks_PK";
        case SUBLANG_DEFAULT: return "ks_PK";
        case SUBLANG_KASHMIRI_INDIA: return "ks_IN";
        case SUBLANG_KASHMIRI_INDIA: return "ks_IN";
        }
        }
      return "ks";
      return "ks";
    case LANG_KAZAK: return "kk_KZ";
    case LANG_KAZAK: return "kk_KZ";
    case LANG_KONKANI:
    case LANG_KONKANI:
      /* FIXME: Adjust this when such locales appear on Unix.  */
      /* FIXME: Adjust this when such locales appear on Unix.  */
      return "kok_IN";
      return "kok_IN";
    case LANG_KOREAN: return "ko_KR";
    case LANG_KOREAN: return "ko_KR";
    case LANG_KYRGYZ: return "ky_KG";
    case LANG_KYRGYZ: return "ky_KG";
    case 0x54: /* LAO */ return "lo_LA";
    case 0x54: /* LAO */ return "lo_LA";
    case 0x76: /* LATIN */ return "la_VA";
    case 0x76: /* LATIN */ return "la_VA";
    case LANG_LATVIAN: return "lv_LV";
    case LANG_LATVIAN: return "lv_LV";
    case LANG_LITHUANIAN: return "lt_LT";
    case LANG_LITHUANIAN: return "lt_LT";
    case LANG_MACEDONIAN: return "mk_MK";
    case LANG_MACEDONIAN: return "mk_MK";
    case LANG_MALAY:
    case LANG_MALAY:
      switch (sub)
      switch (sub)
        {
        {
        case SUBLANG_MALAY_MALAYSIA: return "ms_MY";
        case SUBLANG_MALAY_MALAYSIA: return "ms_MY";
        case SUBLANG_MALAY_BRUNEI_DARUSSALAM: return "ms_BN";
        case SUBLANG_MALAY_BRUNEI_DARUSSALAM: return "ms_BN";
        }
        }
      return "ms";
      return "ms";
    case LANG_MALAYALAM: return "ml_IN";
    case LANG_MALAYALAM: return "ml_IN";
    case 0x3a: /* MALTESE */ return "mt_MT";
    case 0x3a: /* MALTESE */ return "mt_MT";
    case LANG_MANIPURI:
    case LANG_MANIPURI:
      /* FIXME: Adjust this when such locales appear on Unix.  */
      /* FIXME: Adjust this when such locales appear on Unix.  */
      return "mni_IN";
      return "mni_IN";
    case LANG_MARATHI: return "mr_IN";
    case LANG_MARATHI: return "mr_IN";
    case LANG_MONGOLIAN:
    case LANG_MONGOLIAN:
      return "mn"; /* Ambiguous: could be "mn_CN" or "mn_MN".  */
      return "mn"; /* Ambiguous: could be "mn_CN" or "mn_MN".  */
    case LANG_NEPALI:
    case LANG_NEPALI:
      switch (sub)
      switch (sub)
        {
        {
        case SUBLANG_DEFAULT: return "ne_NP";
        case SUBLANG_DEFAULT: return "ne_NP";
        case SUBLANG_NEPALI_INDIA: return "ne_IN";
        case SUBLANG_NEPALI_INDIA: return "ne_IN";
        }
        }
      return "ne";
      return "ne";
    case LANG_NORWEGIAN:
    case LANG_NORWEGIAN:
      switch (sub)
      switch (sub)
        {
        {
        case SUBLANG_NORWEGIAN_BOKMAL: return "no_NO";
        case SUBLANG_NORWEGIAN_BOKMAL: return "no_NO";
        case SUBLANG_NORWEGIAN_NYNORSK: return "nn_NO";
        case SUBLANG_NORWEGIAN_NYNORSK: return "nn_NO";
        }
        }
      return "no";
      return "no";
    case LANG_ORIYA: return "or_IN";
    case LANG_ORIYA: return "or_IN";
    case 0x72: /* OROMO */ return "om_ET";
    case 0x72: /* OROMO */ return "om_ET";
    case 0x79: /* PAPIAMENTU */ return "pap_AN";
    case 0x79: /* PAPIAMENTU */ return "pap_AN";
    case 0x63: /* PASHTO */
    case 0x63: /* PASHTO */
      return "ps"; /* Ambiguous: could be "ps_PK" or "ps_AF".  */
      return "ps"; /* Ambiguous: could be "ps_PK" or "ps_AF".  */
    case LANG_POLISH: return "pl_PL";
    case LANG_POLISH: return "pl_PL";
    case LANG_PORTUGUESE:
    case LANG_PORTUGUESE:
      switch (sub)
      switch (sub)
        {
        {
        case SUBLANG_PORTUGUESE: return "pt_PT";
        case SUBLANG_PORTUGUESE: return "pt_PT";
        /* Hmm. SUBLANG_PORTUGUESE_BRAZILIAN == SUBLANG_DEFAULT.
        /* Hmm. SUBLANG_PORTUGUESE_BRAZILIAN == SUBLANG_DEFAULT.
           Same phenomenon as SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. */
           Same phenomenon as SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. */
        case SUBLANG_PORTUGUESE_BRAZILIAN: return "pt_BR";
        case SUBLANG_PORTUGUESE_BRAZILIAN: return "pt_BR";
        }
        }
      return "pt";
      return "pt";
    case LANG_PUNJABI: return "pa_IN";
    case LANG_PUNJABI: return "pa_IN";
    case 0x17: /* RHAETO-ROMANCE */ return "rm_CH";
    case 0x17: /* RHAETO-ROMANCE */ return "rm_CH";
    case LANG_ROMANIAN: return "ro_RO";
    case LANG_ROMANIAN: return "ro_RO";
    case LANG_RUSSIAN:
    case LANG_RUSSIAN:
      return "ru"; /* Ambiguous: could be "ru_RU" or "ru_UA".  */
      return "ru"; /* Ambiguous: could be "ru_RU" or "ru_UA".  */
    case 0x3b: /* SAMI */ return "se_NO";
    case 0x3b: /* SAMI */ return "se_NO";
    case LANG_SANSKRIT: return "sa_IN";
    case LANG_SANSKRIT: return "sa_IN";
    case LANG_SINDHI: return "sd";
    case LANG_SINDHI: return "sd";
    case 0x5b: /* SINHALESE */ return "si_LK";
    case 0x5b: /* SINHALESE */ return "si_LK";
    case LANG_SLOVAK: return "sk_SK";
    case LANG_SLOVAK: return "sk_SK";
    case LANG_SLOVENIAN: return "sl_SI";
    case LANG_SLOVENIAN: return "sl_SI";
    case 0x77: /* SOMALI */ return "so_SO";
    case 0x77: /* SOMALI */ return "so_SO";
    case LANG_SORBIAN:
    case LANG_SORBIAN:
      /* FIXME: Adjust this when such locales appear on Unix.  */
      /* FIXME: Adjust this when such locales appear on Unix.  */
      return "wen_DE";
      return "wen_DE";
    case LANG_SPANISH:
    case LANG_SPANISH:
      switch (sub)
      switch (sub)
        {
        {
        case SUBLANG_SPANISH: return "es_ES";
        case SUBLANG_SPANISH: return "es_ES";
        case SUBLANG_SPANISH_MEXICAN: return "es_MX";
        case SUBLANG_SPANISH_MEXICAN: return "es_MX";
        case SUBLANG_SPANISH_MODERN:
        case SUBLANG_SPANISH_MODERN:
          return "es_ES@modern";        /* not seen on Unix */
          return "es_ES@modern";        /* not seen on Unix */
        case SUBLANG_SPANISH_GUATEMALA: return "es_GT";
        case SUBLANG_SPANISH_GUATEMALA: return "es_GT";
        case SUBLANG_SPANISH_COSTA_RICA: return "es_CR";
        case SUBLANG_SPANISH_COSTA_RICA: return "es_CR";
        case SUBLANG_SPANISH_PANAMA: return "es_PA";
        case SUBLANG_SPANISH_PANAMA: return "es_PA";
        case SUBLANG_SPANISH_DOMINICAN_REPUBLIC: return "es_DO";
        case SUBLANG_SPANISH_DOMINICAN_REPUBLIC: return "es_DO";
        case SUBLANG_SPANISH_VENEZUELA: return "es_VE";
        case SUBLANG_SPANISH_VENEZUELA: return "es_VE";
        case SUBLANG_SPANISH_COLOMBIA: return "es_CO";
        case SUBLANG_SPANISH_COLOMBIA: return "es_CO";
        case SUBLANG_SPANISH_PERU: return "es_PE";
        case SUBLANG_SPANISH_PERU: return "es_PE";
        case SUBLANG_SPANISH_ARGENTINA: return "es_AR";
        case SUBLANG_SPANISH_ARGENTINA: return "es_AR";
        case SUBLANG_SPANISH_ECUADOR: return "es_EC";
        case SUBLANG_SPANISH_ECUADOR: return "es_EC";
        case SUBLANG_SPANISH_CHILE: return "es_CL";
        case SUBLANG_SPANISH_CHILE: return "es_CL";
        case SUBLANG_SPANISH_URUGUAY: return "es_UY";
        case SUBLANG_SPANISH_URUGUAY: return "es_UY";
        case SUBLANG_SPANISH_PARAGUAY: return "es_PY";
        case SUBLANG_SPANISH_PARAGUAY: return "es_PY";
        case SUBLANG_SPANISH_BOLIVIA: return "es_BO";
        case SUBLANG_SPANISH_BOLIVIA: return "es_BO";
        case SUBLANG_SPANISH_EL_SALVADOR: return "es_SV";
        case SUBLANG_SPANISH_EL_SALVADOR: return "es_SV";
        case SUBLANG_SPANISH_HONDURAS: return "es_HN";
        case SUBLANG_SPANISH_HONDURAS: return "es_HN";
        case SUBLANG_SPANISH_NICARAGUA: return "es_NI";
        case SUBLANG_SPANISH_NICARAGUA: return "es_NI";
        case SUBLANG_SPANISH_PUERTO_RICO: return "es_PR";
        case SUBLANG_SPANISH_PUERTO_RICO: return "es_PR";
        }
        }
      return "es";
      return "es";
    case 0x30: /* SUTU */ return "bnt_TZ";
    case 0x30: /* SUTU */ return "bnt_TZ";
    case LANG_SWAHILI: return "sw_KE";
    case LANG_SWAHILI: return "sw_KE";
    case LANG_SWEDISH:
    case LANG_SWEDISH:
      switch (sub)
      switch (sub)
        {
        {
        case SUBLANG_DEFAULT: return "sv_SE";
        case SUBLANG_DEFAULT: return "sv_SE";
        case SUBLANG_SWEDISH_FINLAND: return "sv_FI";
        case SUBLANG_SWEDISH_FINLAND: return "sv_FI";
        }
        }
      return "sv";
      return "sv";
    case LANG_SYRIAC: return "syr_TR"; /* An extinct language.  */
    case LANG_SYRIAC: return "syr_TR"; /* An extinct language.  */
    case 0x64: /* TAGALOG */ return "tl_PH";
    case 0x64: /* TAGALOG */ return "tl_PH";
    case 0x28: /* TAJIK */ return "tg_TJ";
    case 0x28: /* TAJIK */ return "tg_TJ";
    case 0x5f: /* TAMAZIGHT */ return "ber_MA";
    case 0x5f: /* TAMAZIGHT */ return "ber_MA";
    case LANG_TAMIL:
    case LANG_TAMIL:
      return "ta"; /* Ambiguous: could be "ta_IN" or "ta_LK" or "ta_SG".  */
      return "ta"; /* Ambiguous: could be "ta_IN" or "ta_LK" or "ta_SG".  */
    case LANG_TATAR: return "tt_RU";
    case LANG_TATAR: return "tt_RU";
    case LANG_TELUGU: return "te_IN";
    case LANG_TELUGU: return "te_IN";
    case LANG_THAI: return "th_TH";
    case LANG_THAI: return "th_TH";
    case 0x51: /* TIBETAN */ return "bo_CN";
    case 0x51: /* TIBETAN */ return "bo_CN";
    case 0x73: /* TIGRINYA */ return "ti_ET";
    case 0x73: /* TIGRINYA */ return "ti_ET";
    case 0x31: /* TSONGA */ return "ts_ZA";
    case 0x31: /* TSONGA */ return "ts_ZA";
    case LANG_TURKISH: return "tr_TR";
    case LANG_TURKISH: return "tr_TR";
    case 0x42: /* TURKMEN */ return "tk_TM";
    case 0x42: /* TURKMEN */ return "tk_TM";
    case LANG_UKRAINIAN: return "uk_UA";
    case LANG_UKRAINIAN: return "uk_UA";
    case LANG_URDU:
    case LANG_URDU:
      switch (sub)
      switch (sub)
        {
        {
        case SUBLANG_URDU_PAKISTAN: return "ur_PK";
        case SUBLANG_URDU_PAKISTAN: return "ur_PK";
        case SUBLANG_URDU_INDIA: return "ur_IN";
        case SUBLANG_URDU_INDIA: return "ur_IN";
        }
        }
      return "ur";
      return "ur";
    case LANG_UZBEK:
    case LANG_UZBEK:
      switch (sub)
      switch (sub)
        {
        {
        /* FIXME: Adjust this when Uzbek locales appear on Unix.  */
        /* FIXME: Adjust this when Uzbek locales appear on Unix.  */
        case SUBLANG_UZBEK_LATIN: return "uz_UZ@latin";
        case SUBLANG_UZBEK_LATIN: return "uz_UZ@latin";
        case SUBLANG_UZBEK_CYRILLIC: return "uz_UZ@cyrillic";
        case SUBLANG_UZBEK_CYRILLIC: return "uz_UZ@cyrillic";
        }
        }
      return "uz";
      return "uz";
    case 0x33: /* VENDA */ return "ven_ZA";
    case 0x33: /* VENDA */ return "ven_ZA";
    case LANG_VIETNAMESE: return "vi_VN";
    case LANG_VIETNAMESE: return "vi_VN";
    case 0x52: /* WELSH */ return "cy_GB";
    case 0x52: /* WELSH */ return "cy_GB";
    case 0x34: /* XHOSA */ return "xh_ZA";
    case 0x34: /* XHOSA */ return "xh_ZA";
    case 0x78: /* YI */ return "sit_CN";
    case 0x78: /* YI */ return "sit_CN";
    case 0x3d: /* YIDDISH */ return "yi_IL";
    case 0x3d: /* YIDDISH */ return "yi_IL";
    case 0x6a: /* YORUBA */ return "yo_NG";
    case 0x6a: /* YORUBA */ return "yo_NG";
    case 0x35: /* ZULU */ return "zu_ZA";
    case 0x35: /* ZULU */ return "zu_ZA";
    default: return "C";
    default: return "C";
    }
    }
 
 
#endif
#endif
}
}
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.