1 /* Copyright (C) 1996-1999, 2000, 2001 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3 Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
5 This program is free software; you can redistribute it and/or modify it
6 under the terms of the GNU Library General Public License as published
7 by the Free Software Foundation; either version 2, or (at your option)
10 This program 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 Library General Public License for more details.
15 You should have received a copy of the GNU Library General Public
16 License along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
23 /* Declarations of locale dependent catalog lookup functions.
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
36 # if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
37 # define PARAMS(args) args
39 # define PARAMS(args) ()
43 #ifndef internal_function
44 # define internal_function
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)
53 /* Separator in PATH like lists of pathnames. */
54 #if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
55 /* Win32, OS/2, DOS */
56 # define PATH_SEPARATOR ';'
59 # define PATH_SEPARATOR ':'
62 /* Encoding of locale name parts. */
63 #define CEN_REVISION 1
66 #define XPG_NORM_CODESET 8
67 #define XPG_CODESET 16
69 #define CEN_AUDIENCE 64
70 #define XPG_MODIFIER 128
72 #define CEN_SPECIFIC (CEN_REVISION|CEN_SPONSOR|CEN_SPECIAL|CEN_AUDIENCE)
73 #define XPG_SPECIFIC (XPG_CODESET|XPG_NORM_CODESET|XPG_MODIFIER)
76 struct loaded_l10nfile
83 struct loaded_l10nfile *next;
84 struct loaded_l10nfile *successor[1];
88 /* Normalize codeset name. There is no standard for the codeset
89 names. Normalization allows the user to use any of the common
90 names. The return value is dynamically allocated and has to be
91 freed by the caller. */
92 extern const char *_nl_normalize_codeset PARAMS ((const char *codeset,
95 extern struct loaded_l10nfile *
96 _nl_make_l10nflist PARAMS ((struct loaded_l10nfile **l10nfile_list,
97 const char *dirlist, size_t dirlist_len, int mask,
98 const char *language, const char *territory,
100 const char *normalized_codeset,
101 const char *modifier, const char *special,
102 const char *sponsor, const char *revision,
103 const char *filename, int do_allocate));
106 extern const char *_nl_expand_alias PARAMS ((const char *name));
108 /* normalized_codeset is dynamically allocated and has to be freed by
110 extern int _nl_explode_name PARAMS ((char *name, const char **language,
111 const char **modifier,
112 const char **territory,
113 const char **codeset,
114 const char **normalized_codeset,
115 const char **special,
116 const char **sponsor,
117 const char **revision));
119 extern char *_nl_find_language PARAMS ((const char *name));
121 #endif /* loadinfo.h */