89
86
files of the same kind, sorted in decreasing order of ->filename.
90
87
DIRLIST and DIRLIST_LEN are an argz list of directories in which to
91
88
look, containing at least one directory (i.e. DIRLIST_LEN > 0).
92
MASK, LANGUAGE, TERRITORY, CODESET, NORMALIZED_CODESET, MODIFIER,
93
SPECIAL, SPONSOR, REVISION are the pieces of the locale name, as
94
produced by _nl_explode_name(). FILENAME is the filename suffix.
89
MASK, LANGUAGE, TERRITORY, CODESET, NORMALIZED_CODESET, MODIFIER
90
are the pieces of the locale name, as produced by _nl_explode_name().
91
FILENAME is the filename suffix.
95
92
The return value is the lookup result, either found in *L10NFILE_LIST,
96
93
or - if DO_ALLOCATE is nonzero - freshly allocated, or possibly NULL.
97
94
If the return value is non-NULL, it is added to *L10NFILE_LIST, and
103
100
const char *dirlist, size_t dirlist_len, int mask,
104
101
const char *language, const char *territory,
105
102
const char *codeset, const char *normalized_codeset,
106
const char *modifier, const char *special,
107
const char *sponsor, const char *revision,
103
const char *modifier,
108
104
const char *filename, int do_allocate);
110
106
/* Lookup the real locale name for a locale alias NAME, or NULL if
111
107
NAME is not a locale alias (but possibly a real locale name).
112
108
The return value is statically allocated and must not be freed. */
113
extern const char *_nl_expand_alias (const char *name);
109
/* Part of the libintl ABI only for the sake of the gettext.m4 macro. */
110
extern LIBINTL_DLL_EXPORTED const char *_nl_expand_alias (const char *name);
115
112
/* Split a locale name NAME into its pieces: language, modifier,
116
territory, codeset, special, sponsor, revision.
117
114
NAME gets destructively modified: NUL bytes are inserted here and
118
115
there. *LANGUAGE gets assigned NAME. Each of *MODIFIER, *TERRITORY,
119
*CODESET, *SPECIAL, *SPONSOR, *REVISION gets assigned either a
120
pointer into the old NAME string, or NULL. *NORMALIZED_CODESET
121
gets assigned the expanded *CODESET, if it is different from *CODESET;
122
this one is dynamically allocated and has to be freed by the caller.
116
*CODESET gets assigned either a pointer into the old NAME string, or
117
NULL. *NORMALIZED_CODESET gets assigned the expanded *CODESET, if it
118
is different from *CODESET; this one is dynamically allocated and has
119
to be freed by the caller.
123
120
The return value is a bitmask, where each bit corresponds to one
125
XPG_MODIFIER, CEN_AUDIENCE for *MODIFIER,
126
TERRITORY for *TERRITORY,
122
XPG_MODIFIER for *MODIFIER,
123
XPG_TERRITORY for *TERRITORY,
127
124
XPG_CODESET for *CODESET,
128
XPG_NORM_CODESET for *NORMALIZED_CODESET,
129
CEN_SPECIAL for *SPECIAL,
130
CEN_SPONSOR for *SPONSOR,
131
CEN_REVISION for *REVISION.
125
XPG_NORM_CODESET for *NORMALIZED_CODESET.
133
127
extern int _nl_explode_name (char *name, const char **language,
134
128
const char **modifier, const char **territory,
135
129
const char **codeset,
136
const char **normalized_codeset,
137
const char **special, const char **sponsor,
138
const char **revision);
140
/* Split a locale name NAME into a leading language part and all the
141
rest. Return a pointer to the first character after the language,
142
i.e. to the first byte of the rest. */
143
extern char *_nl_find_language (const char *name);
130
const char **normalized_codeset);
145
132
#endif /* loadinfo.h */