]>
Commit | Line | Data |
---|---|---|
d4697bc9 | 1 | /* Copyright (C) 1996-2014 Free Software Foundation, Inc. |
40a55d20 UD |
2 | This file is part of the GNU C Library. |
3 | Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. | |
4 | ||
5 | The GNU C Library is free software; you can redistribute it and/or | |
41bdb6e2 AJ |
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. | |
40a55d20 UD |
9 | |
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 | |
41bdb6e2 | 13 | Lesser General Public License for more details. |
40a55d20 | 14 | |
41bdb6e2 | 15 | You should have received a copy of the GNU Lesser General Public |
59ba27a6 PE |
16 | License along with the GNU C Library; if not, see |
17 | <http://www.gnu.org/licenses/>. */ | |
40a55d20 | 18 | |
6570e194 UD |
19 | #ifndef _LOADINFO_H |
20 | #define _LOADINFO_H 1 | |
21 | ||
0f131646 RM |
22 | /* Declarations of locale dependent catalog lookup functions. |
23 | Implemented in | |
24 | ||
25 | localealias.c Possibly replace a locale name by another. | |
26 | explodename.c Split a locale name into its various fields. | |
27 | l10nflist.c Generate a list of filenames of possible message catalogs. | |
28 | finddomain.c Find and open the relevant message catalogs. | |
29 | ||
30 | The main function _nl_find_domain() in finddomain.c is declared | |
31 | in gettextP.h. | |
32 | */ | |
33 | ||
92f3773b | 34 | #ifndef PARAMS |
0f131646 | 35 | # if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES |
92f3773b RM |
36 | # define PARAMS(args) args |
37 | # else | |
38 | # define PARAMS(args) () | |
39 | # endif | |
40 | #endif | |
41 | ||
9d9160ee AJ |
42 | #ifndef internal_function |
43 | # define internal_function | |
44 | #endif | |
45 | ||
7a12c6bb | 46 | /* Encoding of locale name parts. */ |
e155c801 UD |
47 | #define XPG_NORM_CODESET 1 |
48 | #define XPG_CODESET 2 | |
49 | #define XPG_TERRITORY 4 | |
50 | #define XPG_MODIFIER 8 | |
7a12c6bb RM |
51 | |
52 | ||
53 | struct loaded_l10nfile | |
54 | { | |
55 | const char *filename; | |
56 | int decided; | |
57 | ||
58 | const void *data; | |
59 | ||
60 | struct loaded_l10nfile *next; | |
61 | struct loaded_l10nfile *successor[1]; | |
62 | }; | |
63 | ||
64 | ||
727211c4 UD |
65 | /* Normalize codeset name. There is no standard for the codeset |
66 | names. Normalization allows the user to use any of the common | |
67 | names. The return value is dynamically allocated and has to be | |
68 | freed by the caller. */ | |
8cb569b7 | 69 | extern const char *_nl_normalize_codeset PARAMS ((const char *codeset, |
92f3773b | 70 | size_t name_len)); |
7a12c6bb RM |
71 | |
72 | extern struct loaded_l10nfile * | |
92f3773b RM |
73 | _nl_make_l10nflist PARAMS ((struct loaded_l10nfile **l10nfile_list, |
74 | const char *dirlist, size_t dirlist_len, int mask, | |
75 | const char *language, const char *territory, | |
76 | const char *codeset, | |
77 | const char *normalized_codeset, | |
e155c801 UD |
78 | const char *modifier, const char *filename, |
79 | int do_allocate)); | |
92f3773b RM |
80 | |
81 | ||
82 | extern const char *_nl_expand_alias PARAMS ((const char *name)); | |
83 | ||
727211c4 UD |
84 | /* normalized_codeset is dynamically allocated and has to be freed by |
85 | the caller. */ | |
92f3773b RM |
86 | extern int _nl_explode_name PARAMS ((char *name, const char **language, |
87 | const char **modifier, | |
88 | const char **territory, | |
89 | const char **codeset, | |
e155c801 | 90 | const char **normalized_codeset)); |
3081378b | 91 | |
6570e194 | 92 | #endif /* loadinfo.h */ |