aboutsummaryrefslogtreecommitdiffstats
path: root/intl/loadinfo.h
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2003-10-25 16:34:36 +0000
committerWerner Koch <[email protected]>2003-10-25 16:34:36 +0000
commitd30da9ebdc822dc1e7349715dedf3d0d1783cfb7 (patch)
tree7d316699432d2697a20655288f741d81a046da0a /intl/loadinfo.h
parentGettexized (diff)
downloadgnupg-d30da9ebdc822dc1e7349715dedf3d0d1783cfb7.tar.gz
gnupg-d30da9ebdc822dc1e7349715dedf3d0d1783cfb7.zip
Updated to 0.12.1
Diffstat (limited to 'intl/loadinfo.h')
-rw-r--r--intl/loadinfo.h57
1 files changed, 52 insertions, 5 deletions
diff --git a/intl/loadinfo.h b/intl/loadinfo.h
index b8612607b..1d3ba6162 100644
--- a/intl/loadinfo.h
+++ b/intl/loadinfo.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-1999, 2000, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1996-1999, 2000-2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <[email protected]>, 1996.
@@ -20,8 +20,20 @@
#ifndef _LOADINFO_H
#define _LOADINFO_H 1
+/* Declarations of locale dependent catalog lookup functions.
+ Implemented in
+
+ localealias.c Possibly replace a locale name by another.
+ explodename.c Split a locale name into its various fields.
+ l10nflist.c Generate a list of filenames of possible message catalogs.
+ finddomain.c Find and open the relevant message catalogs.
+
+ The main function _nl_find_domain() in finddomain.c is declared
+ in gettextP.h.
+ */
+
#ifndef PARAMS
-# if __STDC__
+# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
# define PARAMS(args) args
# else
# define PARAMS(args) ()
@@ -80,6 +92,20 @@ struct loaded_l10nfile
extern const char *_nl_normalize_codeset PARAMS ((const char *codeset,
size_t name_len));
+/* Lookup a locale dependent file.
+ *L10NFILE_LIST denotes a pool of lookup results of locale dependent
+ files of the same kind, sorted in decreasing order of ->filename.
+ DIRLIST and DIRLIST_LEN are an argz list of directories in which to
+ look, containing at least one directory (i.e. DIRLIST_LEN > 0).
+ MASK, LANGUAGE, TERRITORY, CODESET, NORMALIZED_CODESET, MODIFIER,
+ SPECIAL, SPONSOR, REVISION are the pieces of the locale name, as
+ produced by _nl_explode_name(). FILENAME is the filename suffix.
+ The return value is the lookup result, either found in *L10NFILE_LIST,
+ or - if DO_ALLOCATE is nonzero - freshly allocated, or possibly NULL.
+ If the return value is non-NULL, it is added to *L10NFILE_LIST, and
+ its ->next field denotes the chaining inside *L10NFILE_LIST, and
+ furthermore its ->successor[] field contains a list of other lookup
+ results from which this lookup result inherits. */
extern struct loaded_l10nfile *
_nl_make_l10nflist PARAMS ((struct loaded_l10nfile **l10nfile_list,
const char *dirlist, size_t dirlist_len, int mask,
@@ -90,11 +116,29 @@ _nl_make_l10nflist PARAMS ((struct loaded_l10nfile **l10nfile_list,
const char *sponsor, const char *revision,
const char *filename, int do_allocate));
-
+/* Lookup the real locale name for a locale alias NAME, or NULL if
+ NAME is not a locale alias (but possibly a real locale name).
+ The return value is statically allocated and must not be freed. */
extern const char *_nl_expand_alias PARAMS ((const char *name));
-/* normalized_codeset is dynamically allocated and has to be freed by
- the caller. */
+/* Split a locale name NAME into its pieces: language, modifier,
+ territory, codeset, special, sponsor, revision.
+ NAME gets destructively modified: NUL bytes are inserted here and
+ there. *LANGUAGE gets assigned NAME. Each of *MODIFIER, *TERRITORY,
+ *CODESET, *SPECIAL, *SPONSOR, *REVISION gets assigned either a
+ pointer into the old NAME string, or NULL. *NORMALIZED_CODESET
+ gets assigned the expanded *CODESET, if it is different from *CODESET;
+ this one is dynamically allocated and has to be freed by the caller.
+ The return value is a bitmask, where each bit corresponds to one
+ filled-in value:
+ XPG_MODIFIER, CEN_AUDIENCE for *MODIFIER,
+ TERRITORY for *TERRITORY,
+ XPG_CODESET for *CODESET,
+ XPG_NORM_CODESET for *NORMALIZED_CODESET,
+ CEN_SPECIAL for *SPECIAL,
+ CEN_SPONSOR for *SPONSOR,
+ CEN_REVISION for *REVISION.
+ */
extern int _nl_explode_name PARAMS ((char *name, const char **language,
const char **modifier,
const char **territory,
@@ -104,6 +148,9 @@ extern int _nl_explode_name PARAMS ((char *name, const char **language,
const char **sponsor,
const char **revision));
+/* Split a locale name NAME into a leading language part and all the
+ rest. Return a pointer to the first character after the language,
+ i.e. to the first byte of the rest. */
extern char *_nl_find_language PARAMS ((const char *name));
#endif /* loadinfo.h */