Update.
[glibc.git] / locale / localename.c
blob045cc712d2c5fe43e145ad4b183bfbf695a96ff0
1 /* current locale setting names
2 Copyright (C) 2002 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, write to the Free
17 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
18 02111-1307 USA. */
20 #include "localeinfo.h"
22 /* Name of current locale for each individual category.
23 Each is malloc'd unless it is _nl_C_name. */
24 const char *_nl_current_names[] attribute_hidden =
26 #define DEFINE_CATEGORY(category, category_name, items, a) \
27 [category] = _nl_C_name,
28 #include "categories.def"
29 #undef DEFINE_CATEGORY
30 [LC_ALL] = _nl_C_name /* For LC_ALL. */
33 const char *
34 attribute_hidden
35 __current_locale_name (int category)
37 #if 0
38 return _NL_CURRENT_DATA (category)->name;
39 #else
40 return _nl_current_names[category];
41 #endif