Blame intl/loadinfo.h

Packit Service a721b1
/* Copyright (C) 1996-1999, 2000-2003, 2005-2006 Free Software Foundation, Inc.
Packit Service a721b1
   This file is part of the GNU C Library.
Packit Service a721b1
   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
Packit Service a721b1
Packit Service a721b1
   This program is free software; you can redistribute it and/or modify it
Packit Service a721b1
   under the terms of the GNU Library General Public License as published
Packit Service a721b1
   by the Free Software Foundation; either version 2, or (at your option)
Packit Service a721b1
   any later version.
Packit Service a721b1
Packit Service a721b1
   This program is distributed in the hope that it will be useful,
Packit Service a721b1
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service a721b1
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit Service a721b1
   Library General Public License for more details.
Packit Service a721b1
Packit Service a721b1
   You should have received a copy of the GNU Library General Public
Packit Service a721b1
   License along with this program; if not, write to the Free Software
Packit Service a721b1
   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
Packit Service a721b1
   USA.  */
Packit Service a721b1
Packit Service a721b1
#ifndef _LOADINFO_H
Packit Service a721b1
#define _LOADINFO_H	1
Packit Service a721b1
Packit Service a721b1
/* Declarations of locale dependent catalog lookup functions.
Packit Service a721b1
   Implemented in
Packit Service a721b1
Packit Service a721b1
     localealias.c    Possibly replace a locale name by another.
Packit Service a721b1
     explodename.c    Split a locale name into its various fields.
Packit Service a721b1
     l10nflist.c      Generate a list of filenames of possible message catalogs.
Packit Service a721b1
     finddomain.c     Find and open the relevant message catalogs.
Packit Service a721b1
Packit Service a721b1
   The main function _nl_find_domain() in finddomain.c is declared
Packit Service a721b1
   in gettextP.h.
Packit Service a721b1
 */
Packit Service a721b1
Packit Service a721b1
#ifndef internal_function
Packit Service a721b1
# define internal_function
Packit Service a721b1
#endif
Packit Service a721b1
Packit Service a721b1
#ifndef LIBINTL_DLL_EXPORTED
Packit Service a721b1
# define LIBINTL_DLL_EXPORTED
Packit Service a721b1
#endif
Packit Service a721b1
Packit Service a721b1
/* Tell the compiler when a conditional or integer expression is
Packit Service a721b1
   almost always true or almost always false.  */
Packit Service a721b1
#ifndef HAVE_BUILTIN_EXPECT
Packit Service a721b1
# define __builtin_expect(expr, val) (expr)
Packit Service a721b1
#endif
Packit Service a721b1
Packit Service a721b1
/* Separator in PATH like lists of pathnames.  */
Packit Service a721b1
#if ((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) || defined __EMX__ || defined __DJGPP__
Packit Service a721b1
  /* Win32, OS/2, DOS */
Packit Service a721b1
# define PATH_SEPARATOR ';'
Packit Service a721b1
#else
Packit Service a721b1
  /* Unix */
Packit Service a721b1
# define PATH_SEPARATOR ':'
Packit Service a721b1
#endif
Packit Service a721b1
Packit Service a721b1
/* Encoding of locale name parts.  */
Packit Service a721b1
#define XPG_NORM_CODESET	1
Packit Service a721b1
#define XPG_CODESET		2
Packit Service a721b1
#define XPG_TERRITORY		4
Packit Service a721b1
#define XPG_MODIFIER		8
Packit Service a721b1
Packit Service a721b1
Packit Service a721b1
struct loaded_l10nfile
Packit Service a721b1
{
Packit Service a721b1
  const char *filename;
Packit Service a721b1
  int decided;
Packit Service a721b1
Packit Service a721b1
  const void *data;
Packit Service a721b1
Packit Service a721b1
  struct loaded_l10nfile *next;
Packit Service a721b1
  struct loaded_l10nfile *successor[1];
Packit Service a721b1
};
Packit Service a721b1
Packit Service a721b1
Packit Service a721b1
/* Normalize codeset name.  There is no standard for the codeset
Packit Service a721b1
   names.  Normalization allows the user to use any of the common
Packit Service a721b1
   names.  The return value is dynamically allocated and has to be
Packit Service a721b1
   freed by the caller.  */
Packit Service a721b1
extern const char *_nl_normalize_codeset (const char *codeset,
Packit Service a721b1
					  size_t name_len);
Packit Service a721b1
Packit Service a721b1
/* Lookup a locale dependent file.
Packit Service a721b1
   *L10NFILE_LIST denotes a pool of lookup results of locale dependent
Packit Service a721b1
   files of the same kind, sorted in decreasing order of ->filename.
Packit Service a721b1
   DIRLIST and DIRLIST_LEN are an argz list of directories in which to
Packit Service a721b1
   look, containing at least one directory (i.e. DIRLIST_LEN > 0).
Packit Service a721b1
   MASK, LANGUAGE, TERRITORY, CODESET, NORMALIZED_CODESET, MODIFIER
Packit Service a721b1
   are the pieces of the locale name, as produced by _nl_explode_name().
Packit Service a721b1
   FILENAME is the filename suffix.
Packit Service a721b1
   The return value is the lookup result, either found in *L10NFILE_LIST,
Packit Service a721b1
   or - if DO_ALLOCATE is nonzero - freshly allocated, or possibly NULL.
Packit Service a721b1
   If the return value is non-NULL, it is added to *L10NFILE_LIST, and
Packit Service a721b1
   its ->next field denotes the chaining inside *L10NFILE_LIST, and
Packit Service a721b1
   furthermore its ->successor[] field contains a list of other lookup
Packit Service a721b1
   results from which this lookup result inherits.  */
Packit Service a721b1
extern struct loaded_l10nfile *
Packit Service a721b1
_nl_make_l10nflist (struct loaded_l10nfile **l10nfile_list,
Packit Service a721b1
		    const char *dirlist, size_t dirlist_len, int mask,
Packit Service a721b1
		    const char *language, const char *territory,
Packit Service a721b1
		    const char *codeset, const char *normalized_codeset,
Packit Service a721b1
		    const char *modifier,
Packit Service a721b1
		    const char *filename, int do_allocate);
Packit Service a721b1
Packit Service a721b1
/* Lookup the real locale name for a locale alias NAME, or NULL if
Packit Service a721b1
   NAME is not a locale alias (but possibly a real locale name).
Packit Service a721b1
   The return value is statically allocated and must not be freed.  */
Packit Service a721b1
/* Part of the libintl ABI only for the sake of the gettext.m4 macro.  */
Packit Service a721b1
extern LIBINTL_DLL_EXPORTED const char *_nl_expand_alias (const char *name);
Packit Service a721b1
Packit Service a721b1
/* Split a locale name NAME into its pieces: language, modifier,
Packit Service a721b1
   territory, codeset.
Packit Service a721b1
   NAME gets destructively modified: NUL bytes are inserted here and
Packit Service a721b1
   there.  *LANGUAGE gets assigned NAME.  Each of *MODIFIER, *TERRITORY,
Packit Service a721b1
   *CODESET gets assigned either a pointer into the old NAME string, or
Packit Service a721b1
   NULL.  *NORMALIZED_CODESET gets assigned the expanded *CODESET, if it
Packit Service a721b1
   is different from *CODESET; this one is dynamically allocated and has
Packit Service a721b1
   to be freed by the caller.
Packit Service a721b1
   The return value is a bitmask, where each bit corresponds to one
Packit Service a721b1
   filled-in value:
Packit Service a721b1
     XPG_MODIFIER                for *MODIFIER,
Packit Service a721b1
     XPG_TERRITORY               for *TERRITORY,
Packit Service a721b1
     XPG_CODESET                 for *CODESET,
Packit Service a721b1
     XPG_NORM_CODESET            for *NORMALIZED_CODESET.
Packit Service a721b1
 */
Packit Service a721b1
extern int _nl_explode_name (char *name, const char **language,
Packit Service a721b1
			     const char **modifier, const char **territory,
Packit Service a721b1
			     const char **codeset,
Packit Service a721b1
			     const char **normalized_codeset);
Packit Service a721b1
Packit Service a721b1
#endif	/* loadinfo.h */