3 /* Copyright (C) 1996-1999, 2000, 2001 Free Software Foundation, Inc.
4 This file is part of the GNU C Library.
5 Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
7 This program is free software; you can redistribute it and/or modify it
8 under the terms of the GNU Library General Public License as published
9 by the Free Software Foundation; either version 2, or (at your option)
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Library General Public License for more details.
17 You should have received a copy of the GNU Library General Public
18 License along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
25 /* Declarations of locale dependent catalog lookup functions.
28 localealias.c Possibly replace a locale name by another.
29 explodename.c Split a locale name into its various fields.
30 l10nflist.c Generate a list of filenames of possible message catalogs.
31 finddomain.c Find and open the relevant message catalogs.
33 The main function _nl_find_domain() in finddomain.c is declared
38 # if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
39 # define PARAMS(args) args
41 # define PARAMS(args) ()
45 #ifndef internal_function
46 # define internal_function
49 /* Tell the compiler when a conditional or integer expression is
50 almost always true or almost always false. */
51 #ifndef HAVE_BUILTIN_EXPECT
52 # define __builtin_expect(expr, val) (expr)
55 /* Separator in PATH like lists of pathnames. */
56 #if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
57 /* Win32, OS/2, DOS */
58 # define PATH_SEPARATOR ';'
61 # define PATH_SEPARATOR ':'
64 /* Encoding of locale name parts. */
65 #define CEN_REVISION 1
68 #define XPG_NORM_CODESET 8
69 #define XPG_CODESET 16
71 #define CEN_AUDIENCE 64
72 #define XPG_MODIFIER 128
74 #define CEN_SPECIFIC (CEN_REVISION|CEN_SPONSOR|CEN_SPECIAL|CEN_AUDIENCE)
75 #define XPG_SPECIFIC (XPG_CODESET|XPG_NORM_CODESET|XPG_MODIFIER)
78 struct loaded_l10nfile
85 struct loaded_l10nfile
*next
;
86 struct loaded_l10nfile
*successor
[1];
90 /* Normalize codeset name. There is no standard for the codeset
91 names. Normalization allows the user to use any of the common
92 names. The return value is dynamically allocated and has to be
93 freed by the caller. */
94 extern const char *_nl_normalize_codeset
PARAMS ((const char *codeset
,
97 extern struct loaded_l10nfile
*
98 _nl_make_l10nflist
PARAMS ((struct loaded_l10nfile
**l10nfile_list
,
99 const char *dirlist
, size_t dirlist_len
, int mask
,
100 const char *language
, const char *territory
,
102 const char *normalized_codeset
,
103 const char *modifier
, const char *special
,
104 const char *sponsor
, const char *revision
,
105 const char *filename
, int do_allocate
));
108 extern const char *_nl_expand_alias
PARAMS ((const char *name
));
110 /* normalized_codeset is dynamically allocated and has to be freed by
112 extern int _nl_explode_name
PARAMS ((char *name
, const char **language
,
113 const char **modifier
,
114 const char **territory
,
115 const char **codeset
,
116 const char **normalized_codeset
,
117 const char **special
,
118 const char **sponsor
,
119 const char **revision
));
121 extern char *_nl_find_language
PARAMS ((const char *name
));
123 #endif /* loadinfo.h */