Mercurial > hg > octave-kai > gnulib-hg
annotate lib/localename.h @ 17249:e542fd46ad6f
maint: update all copyright year number ranges
Run "make update-copyright". Compare to commit 1602f0a from last year.
Signed-off-by: Eric Blake <eblake@redhat.com>
author | Eric Blake <eblake@redhat.com> |
---|---|
date | Tue, 01 Jan 2013 00:50:58 +0000 |
parents | 8250f2777afc |
children |
rev | line source |
---|---|
8923 | 1 /* Determine name of the currently selected locale. |
17249
e542fd46ad6f
maint: update all copyright year number ranges
Eric Blake <eblake@redhat.com>
parents:
16201
diff
changeset
|
2 Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc. |
8923 | 3 |
14858
dd10bbc31f53
Copyright: Use LGPL 2.1 instead of LGPL 2.0.
Bruno Haible <bruno@clisp.org>
parents:
14079
diff
changeset
|
4 This program is free software: you can redistribute it and/or modify |
dd10bbc31f53
Copyright: Use LGPL 2.1 instead of LGPL 2.0.
Bruno Haible <bruno@clisp.org>
parents:
14079
diff
changeset
|
5 it under the terms of the GNU Lesser General Public License as published by |
dd10bbc31f53
Copyright: Use LGPL 2.1 instead of LGPL 2.0.
Bruno Haible <bruno@clisp.org>
parents:
14079
diff
changeset
|
6 the Free Software Foundation; either version 2.1 of the License, or |
dd10bbc31f53
Copyright: Use LGPL 2.1 instead of LGPL 2.0.
Bruno Haible <bruno@clisp.org>
parents:
14079
diff
changeset
|
7 (at your option) any later version. |
8923 | 8 |
9 This program is distributed in the hope that it will be useful, | |
10 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14858
dd10bbc31f53
Copyright: Use LGPL 2.1 instead of LGPL 2.0.
Bruno Haible <bruno@clisp.org>
parents:
14079
diff
changeset
|
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
dd10bbc31f53
Copyright: Use LGPL 2.1 instead of LGPL 2.0.
Bruno Haible <bruno@clisp.org>
parents:
14079
diff
changeset
|
12 GNU Lesser General Public License for more details. |
8923 | 13 |
14858
dd10bbc31f53
Copyright: Use LGPL 2.1 instead of LGPL 2.0.
Bruno Haible <bruno@clisp.org>
parents:
14079
diff
changeset
|
14 You should have received a copy of the GNU Lesser General Public License |
dd10bbc31f53
Copyright: Use LGPL 2.1 instead of LGPL 2.0.
Bruno Haible <bruno@clisp.org>
parents:
14079
diff
changeset
|
15 along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
8923 | 16 |
17 #ifndef _GL_LOCALENAME_H | |
18 #define _GL_LOCALENAME_H | |
19 | |
20 #ifdef __cplusplus | |
21 extern "C" { | |
22 #endif | |
23 | |
24 | |
25 /* Determine the current locale's name. | |
12484
57f8b4d23a18
localename: Make aware of thread locale.
Bruno Haible <bruno@clisp.org>
parents:
12472
diff
changeset
|
26 It considers both the POSIX notion of locale name (see functions |
57f8b4d23a18
localename: Make aware of thread locale.
Bruno Haible <bruno@clisp.org>
parents:
12472
diff
changeset
|
27 gl_locale_name_thread and gl_locale_name_posix) and the system notion |
57f8b4d23a18
localename: Make aware of thread locale.
Bruno Haible <bruno@clisp.org>
parents:
12472
diff
changeset
|
28 of locale name (see function gl_locale_name_default). |
8923 | 29 CATEGORY is a locale category abbreviation, as defined in <locale.h>, |
30 but not LC_ALL. E.g. LC_MESSAGES. | |
31 CATEGORYNAME is the name of CATEGORY as a string, e.g. "LC_MESSAGES". | |
32 Return the locale category's name, canonicalized into XPG syntax | |
33 language[_territory][.codeset][@modifier] | |
34 The codeset part in the result is not reliable; the locale_charset() | |
35 should be used for codeset information instead. | |
36 The result must not be freed; it is statically allocated. */ | |
37 extern const char * gl_locale_name (int category, const char *categoryname); | |
38 | |
12484
57f8b4d23a18
localename: Make aware of thread locale.
Bruno Haible <bruno@clisp.org>
parents:
12472
diff
changeset
|
39 /* Determine the current per-thread locale's name, as specified by uselocale() |
57f8b4d23a18
localename: Make aware of thread locale.
Bruno Haible <bruno@clisp.org>
parents:
12472
diff
changeset
|
40 calls. |
57f8b4d23a18
localename: Make aware of thread locale.
Bruno Haible <bruno@clisp.org>
parents:
12472
diff
changeset
|
41 CATEGORY is a locale category abbreviation, as defined in <locale.h>, |
57f8b4d23a18
localename: Make aware of thread locale.
Bruno Haible <bruno@clisp.org>
parents:
12472
diff
changeset
|
42 but not LC_ALL. E.g. LC_MESSAGES. |
57f8b4d23a18
localename: Make aware of thread locale.
Bruno Haible <bruno@clisp.org>
parents:
12472
diff
changeset
|
43 CATEGORYNAME is the name of CATEGORY as a string, e.g. "LC_MESSAGES". |
57f8b4d23a18
localename: Make aware of thread locale.
Bruno Haible <bruno@clisp.org>
parents:
12472
diff
changeset
|
44 Return the locale category's name, canonicalized into XPG syntax |
57f8b4d23a18
localename: Make aware of thread locale.
Bruno Haible <bruno@clisp.org>
parents:
12472
diff
changeset
|
45 language[_territory][.codeset][@modifier] |
57f8b4d23a18
localename: Make aware of thread locale.
Bruno Haible <bruno@clisp.org>
parents:
12472
diff
changeset
|
46 or NULL if no locale has been specified for the current thread. |
57f8b4d23a18
localename: Make aware of thread locale.
Bruno Haible <bruno@clisp.org>
parents:
12472
diff
changeset
|
47 The codeset part in the result is not reliable; the locale_charset() |
57f8b4d23a18
localename: Make aware of thread locale.
Bruno Haible <bruno@clisp.org>
parents:
12472
diff
changeset
|
48 should be used for codeset information instead. |
57f8b4d23a18
localename: Make aware of thread locale.
Bruno Haible <bruno@clisp.org>
parents:
12472
diff
changeset
|
49 The result must not be freed; it is statically allocated. */ |
57f8b4d23a18
localename: Make aware of thread locale.
Bruno Haible <bruno@clisp.org>
parents:
12472
diff
changeset
|
50 extern const char * gl_locale_name_thread (int category, const char *categoryname); |
57f8b4d23a18
localename: Make aware of thread locale.
Bruno Haible <bruno@clisp.org>
parents:
12472
diff
changeset
|
51 |
57f8b4d23a18
localename: Make aware of thread locale.
Bruno Haible <bruno@clisp.org>
parents:
12472
diff
changeset
|
52 /* Determine the thread-independent current locale's name, as specified by |
57f8b4d23a18
localename: Make aware of thread locale.
Bruno Haible <bruno@clisp.org>
parents:
12472
diff
changeset
|
53 setlocale() calls or by environment variables. |
8923 | 54 CATEGORY is a locale category abbreviation, as defined in <locale.h>, |
55 but not LC_ALL. E.g. LC_MESSAGES. | |
56 CATEGORYNAME is the name of CATEGORY as a string, e.g. "LC_MESSAGES". | |
57 Return the locale category's name, canonicalized into XPG syntax | |
58 language[_territory][.codeset][@modifier] | |
59 or NULL if no locale has been specified to setlocale() or by environment | |
60 variables. | |
61 The codeset part in the result is not reliable; the locale_charset() | |
62 should be used for codeset information instead. | |
63 The result must not be freed; it is statically allocated. */ | |
64 extern const char * gl_locale_name_posix (int category, const char *categoryname); | |
65 | |
12471
0e92bf4fb236
localename: Improvements for MacOS X and Cygwin.
Bruno Haible <bruno@clisp.org>
parents:
8923
diff
changeset
|
66 /* Determine the default locale's name, as specified by environment |
0e92bf4fb236
localename: Improvements for MacOS X and Cygwin.
Bruno Haible <bruno@clisp.org>
parents:
8923
diff
changeset
|
67 variables. |
12472 | 68 Return the locale category's name, or NULL if no locale has been specified |
69 by environment variables. | |
12471
0e92bf4fb236
localename: Improvements for MacOS X and Cygwin.
Bruno Haible <bruno@clisp.org>
parents:
8923
diff
changeset
|
70 The result must not be freed; it is statically allocated. */ |
0e92bf4fb236
localename: Improvements for MacOS X and Cygwin.
Bruno Haible <bruno@clisp.org>
parents:
8923
diff
changeset
|
71 extern const char * gl_locale_name_environ (int category, const char *categoryname); |
0e92bf4fb236
localename: Improvements for MacOS X and Cygwin.
Bruno Haible <bruno@clisp.org>
parents:
8923
diff
changeset
|
72 |
8923 | 73 /* Determine the default locale's name. This is the current locale's name, |
12484
57f8b4d23a18
localename: Make aware of thread locale.
Bruno Haible <bruno@clisp.org>
parents:
12472
diff
changeset
|
74 if not specified by uselocale() calls, by setlocale() calls, or by |
57f8b4d23a18
localename: Make aware of thread locale.
Bruno Haible <bruno@clisp.org>
parents:
12472
diff
changeset
|
75 environment variables. This locale name is usually determined by systems |
57f8b4d23a18
localename: Make aware of thread locale.
Bruno Haible <bruno@clisp.org>
parents:
12472
diff
changeset
|
76 settings that the user can manipulate through a GUI. |
8923 | 77 |
78 Quoting POSIX:2001: | |
79 "All implementations shall define a locale as the default locale, | |
80 to be invoked when no environment variables are set, or set to the | |
81 empty string. This default locale can be the C locale or any other | |
82 implementation-defined locale. Some implementations may provide | |
83 facilities for local installation administrators to set the default | |
84 locale, customizing it for each location. IEEE Std 1003.1-2001 does | |
85 not require such a facility." | |
86 | |
87 The result must not be freed; it is statically allocated. */ | |
88 extern const char * gl_locale_name_default (void); | |
89 | |
90 | |
91 #ifdef __cplusplus | |
92 } | |
93 #endif | |
94 | |
95 #endif /* _GL_LOCALENAME_H */ |