about summary refs log tree commit diff
path: root/locale/findlocale.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2006-05-15 18:36:28 +0000
committerUlrich Drepper <drepper@redhat.com>2006-05-15 18:36:28 +0000
commit9446614c28b003812b59e99ff1f38aa526234c1c (patch)
treec7109087c02a598a6d4bb5cba4f77d6e62ce7d12 /locale/findlocale.c
parent88dbff8cf980b4b63bdbb0e987489bc20176f220 (diff)
downloadglibc-9446614c28b003812b59e99ff1f38aa526234c1c.tar.gz
glibc-9446614c28b003812b59e99ff1f38aa526234c1c.tar.xz
glibc-9446614c28b003812b59e99ff1f38aa526234c1c.zip
* locale/setlocale.c: Change _nl_category_names into a string.
	Add new _nl_category_name_idxs.  Change all users.
	* locale/localeinfo.h: Adjust declaration of _nl_category_names.
	Declare _nl_category_name_idxs.
	* locale/findlocale.c: Adjust for _nl_category_names change.
	* locale/loadlocale.c: Likewise.
	* locale/newlocale.c: Likewise.
	* intl/dcigettext.c: Likewise.
Diffstat (limited to 'locale/findlocale.c')
-rw-r--r--locale/findlocale.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/locale/findlocale.c b/locale/findlocale.c
index 04b197d266..ea24170df5 100644
--- a/locale/findlocale.c
+++ b/locale/findlocale.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2001, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2001, 2002, 2003, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
 
@@ -80,7 +80,8 @@ _nl_find_locale (const char *locale_path, size_t locale_path_len,
 	 variables.  */
       *name = getenv ("LC_ALL");
       if (*name == NULL || (*name)[0] == '\0')
-	*name = getenv (_nl_category_names[category]);
+	*name = getenv (_nl_category_names.str
+			+ _nl_category_name_idxs[category]);
       if (*name == NULL || (*name)[0] == '\0')
 	*name = getenv ("LANG");
     }
@@ -145,7 +146,8 @@ _nl_find_locale (const char *locale_path, size_t locale_path_len,
 				    locale_path, locale_path_len, mask,
 				    language, territory, codeset,
 				    normalized_codeset, modifier,
-				    _nl_category_names[category], 0);
+				    _nl_category_names.str
+				    + _nl_category_name_idxs[category], 0);
 
   if (locale_file == NULL)
     {
@@ -155,7 +157,8 @@ _nl_find_locale (const char *locale_path, size_t locale_path_len,
 					locale_path, locale_path_len, mask,
 					language, territory, codeset,
 					normalized_codeset, modifier,
-					_nl_category_names[category], 1);
+					_nl_category_names.str
+					+ _nl_category_name_idxs[category], 1);
       if (locale_file == NULL)
 	/* This means we are out of core.  */
 	return NULL;