X-Git-Url: https://git.deb.at/w?a=blobdiff_plain;f=intl%2Floadinfo.h;h=65e5ebd1f80a47e3e0b7c4e7908e12ac4732373e;hb=69a912c0db0ac135fff332db4f0b05ad9ed2eec6;hp=a7a19703103efe2f331f61f65a0b684339f10032;hpb=ee5170ade20748797fdde09e370fbb07e585fc9a;p=pkg%2Fabook.git diff --git a/intl/loadinfo.h b/intl/loadinfo.h index a7a1970..65e5ebd 100644 --- a/intl/loadinfo.h +++ b/intl/loadinfo.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-1999, 2000-2003, 2005-2006 Free Software Foundation, Inc. +/* Copyright (C) 1996-1999, 2000-2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. @@ -14,7 +14,7 @@ You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _LOADINFO_H @@ -36,10 +36,6 @@ # define internal_function #endif -#ifndef LIBINTL_DLL_EXPORTED -# define LIBINTL_DLL_EXPORTED -#endif - /* Tell the compiler when a conditional or integer expression is almost always true or almost always false. */ #ifndef HAVE_BUILTIN_EXPECT @@ -47,7 +43,7 @@ #endif /* Separator in PATH like lists of pathnames. */ -#if ((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) || defined __EMX__ || defined __DJGPP__ +#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__ /* Win32, OS/2, DOS */ # define PATH_SEPARATOR ';' #else @@ -56,10 +52,17 @@ #endif /* Encoding of locale name parts. */ -#define XPG_NORM_CODESET 1 -#define XPG_CODESET 2 -#define XPG_TERRITORY 4 -#define XPG_MODIFIER 8 +#define CEN_REVISION 1 +#define CEN_SPONSOR 2 +#define CEN_SPECIAL 4 +#define XPG_NORM_CODESET 8 +#define XPG_CODESET 16 +#define TERRITORY 32 +#define CEN_AUDIENCE 64 +#define XPG_MODIFIER 128 + +#define CEN_SPECIFIC (CEN_REVISION|CEN_SPONSOR|CEN_SPECIAL|CEN_AUDIENCE) +#define XPG_SPECIFIC (XPG_CODESET|XPG_NORM_CODESET|XPG_MODIFIER) struct loaded_l10nfile @@ -86,9 +89,9 @@ extern const char *_nl_normalize_codeset (const char *codeset, 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 - are the pieces of the locale name, as produced by _nl_explode_name(). - FILENAME is the filename suffix. + 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 @@ -100,33 +103,43 @@ _nl_make_l10nflist (struct loaded_l10nfile **l10nfile_list, const char *dirlist, size_t dirlist_len, int mask, const char *language, const char *territory, const char *codeset, const char *normalized_codeset, - const char *modifier, + const char *modifier, const char *special, + 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. */ -/* Part of the libintl ABI only for the sake of the gettext.m4 macro. */ -extern LIBINTL_DLL_EXPORTED const char *_nl_expand_alias (const char *name); +extern const char *_nl_expand_alias (const char *name); /* Split a locale name NAME into its pieces: language, modifier, - territory, codeset. + 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 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. + *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 for *MODIFIER, - XPG_TERRITORY for *TERRITORY, + XPG_MODIFIER, CEN_AUDIENCE for *MODIFIER, + TERRITORY for *TERRITORY, XPG_CODESET for *CODESET, - XPG_NORM_CODESET for *NORMALIZED_CODESET. + XPG_NORM_CODESET for *NORMALIZED_CODESET, + CEN_SPECIAL for *SPECIAL, + CEN_SPONSOR for *SPONSOR, + CEN_REVISION for *REVISION. */ extern int _nl_explode_name (char *name, const char **language, const char **modifier, const char **territory, const char **codeset, - const char **normalized_codeset); + const char **normalized_codeset, + const char **special, 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 (const char *name); #endif /* loadinfo.h */