* config.h.in (USE_MULTIARCH): Define.
[glibc.git] / intl / loadinfo.h
blob2c1b44cec49d1a9c748243db19fd1fb3172da701
1 /* Copyright (C) 1996-2000, 2002, 2003, 2004 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3 Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
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 #ifndef _LOADINFO_H
21 #define _LOADINFO_H 1
23 /* Declarations of locale dependent catalog lookup functions.
24 Implemented in
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.
31 The main function _nl_find_domain() in finddomain.c is declared
32 in gettextP.h.
35 #ifndef PARAMS
36 # if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
37 # define PARAMS(args) args
38 # else
39 # define PARAMS(args) ()
40 # endif
41 #endif
43 #ifndef internal_function
44 # define internal_function
45 #endif
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
53 /* Encoding of locale name parts. */
54 #define XPG_NORM_CODESET 1
55 #define XPG_CODESET 2
56 #define XPG_TERRITORY 4
57 #define XPG_MODIFIER 8
60 struct loaded_l10nfile
62 const char *filename;
63 int decided;
65 const void *data;
67 struct loaded_l10nfile *next;
68 struct loaded_l10nfile *successor[1];
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. */
76 extern const char *_nl_normalize_codeset PARAMS ((const char *codeset,
77 size_t name_len));
79 extern struct loaded_l10nfile *
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,
85 const char *modifier, const char *filename,
86 int do_allocate));
89 extern const char *_nl_expand_alias PARAMS ((const char *name));
91 /* normalized_codeset is dynamically allocated and has to be freed by
92 the caller. */
93 extern int _nl_explode_name PARAMS ((char *name, const char **language,
94 const char **modifier,
95 const char **territory,
96 const char **codeset,
97 const char **normalized_codeset));
99 #endif /* loadinfo.h */