]> git.ipfire.org Git - thirdparty/glibc.git/blame - intl/loadinfo.h
dcigettext.c: Add missing bracket
[thirdparty/glibc.git] / intl / loadinfo.h
CommitLineData
ce7265c7 1/* Copyright (C) 1996-2000, 2002, 2003, 2004 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
AJ
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. */
40a55d20 19
6570e194
UD
20#ifndef _LOADINFO_H
21#define _LOADINFO_H 1
22
0f131646
RM
23/* Declarations of locale dependent catalog lookup functions.
24 Implemented in
25
26 localealias.c Possibly replace a locale name by another.
27 explodename.c Split a locale name into its various fields.
28 l10nflist.c Generate a list of filenames of possible message catalogs.
29 finddomain.c Find and open the relevant message catalogs.
30
31 The main function _nl_find_domain() in finddomain.c is declared
32 in gettextP.h.
33 */
34
92f3773b 35#ifndef PARAMS
0f131646 36# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
92f3773b
RM
37# define PARAMS(args) args
38# else
39# define PARAMS(args) ()
40# endif
41#endif
42
9d9160ee
AJ
43#ifndef internal_function
44# define internal_function
45#endif
46
17c389fc
UD
47/* Tell the compiler when a conditional or integer expression is
48 almost always true or almost always false. */
49#ifndef HAVE_BUILTIN_EXPECT
50# define __builtin_expect(expr, val) (expr)
51#endif
52
7a12c6bb 53/* Encoding of locale name parts. */
e155c801
UD
54#define XPG_NORM_CODESET 1
55#define XPG_CODESET 2
56#define XPG_TERRITORY 4
57#define XPG_MODIFIER 8
7a12c6bb
RM
58
59
60struct loaded_l10nfile
61{
62 const char *filename;
63 int decided;
64
65 const void *data;
66
67 struct loaded_l10nfile *next;
68 struct loaded_l10nfile *successor[1];
69};
70
71
727211c4
UD
72/* Normalize codeset name. There is no standard for the codeset
73 names. Normalization allows the user to use any of the common
74 names. The return value is dynamically allocated and has to be
75 freed by the caller. */
8cb569b7 76extern const char *_nl_normalize_codeset PARAMS ((const char *codeset,
92f3773b 77 size_t name_len));
7a12c6bb
RM
78
79extern struct loaded_l10nfile *
92f3773b
RM
80_nl_make_l10nflist PARAMS ((struct loaded_l10nfile **l10nfile_list,
81 const char *dirlist, size_t dirlist_len, int mask,
82 const char *language, const char *territory,
83 const char *codeset,
84 const char *normalized_codeset,
e155c801
UD
85 const char *modifier, const char *filename,
86 int do_allocate));
92f3773b
RM
87
88
89extern const char *_nl_expand_alias PARAMS ((const char *name));
90
727211c4
UD
91/* normalized_codeset is dynamically allocated and has to be freed by
92 the caller. */
92f3773b
RM
93extern int _nl_explode_name PARAMS ((char *name, const char **language,
94 const char **modifier,
95 const char **territory,
96 const char **codeset,
e155c801 97 const char **normalized_codeset));
3081378b 98
6570e194 99#endif /* loadinfo.h */