Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

loadinfo.h

00001 /* Copyright (C) 1996-1999, 2000, 2001 Free Software Foundation, Inc.
00002    This file is part of the GNU C Library.
00003    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
00004 
00005    This program is free software; you can redistribute it and/or modify it
00006    under the terms of the GNU Library General Public License as published
00007    by the Free Software Foundation; either version 2, or (at your option)
00008    any later version.
00009 
00010    This program is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Library General Public License for more details.
00014 
00015    You should have received a copy of the GNU Library General Public
00016    License along with this program; if not, write to the Free Software
00017    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
00018    USA.  */
00019 
00020 #ifndef _LOADINFO_H
00021 #define _LOADINFO_H     1
00022 
00023 /* Declarations of locale dependent catalog lookup functions.
00024    Implemented in
00025 
00026      localealias.c    Possibly replace a locale name by another.
00027      explodename.c    Split a locale name into its various fields.
00028      l10nflist.c      Generate a list of filenames of possible message catalogs.
00029      finddomain.c     Find and open the relevant message catalogs.
00030 
00031    The main function _nl_find_domain() in finddomain.c is declared
00032    in gettextP.h.
00033  */
00034 
00035 #ifndef PARAMS
00036 # if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
00037 #  define PARAMS(args) args
00038 # else
00039 #  define PARAMS(args) ()
00040 # endif
00041 #endif
00042 
00043 #ifndef internal_function
00044 # define internal_function
00045 #endif
00046 
00047 /* Tell the compiler when a conditional or integer expression is
00048    almost always true or almost always false.  */
00049 #ifndef HAVE_BUILTIN_EXPECT
00050 # define __builtin_expect(expr, val) (expr)
00051 #endif
00052 
00053 /* Separator in PATH like lists of pathnames.  */
00054 #if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
00055   /* Win32, OS/2, DOS */
00056 # define PATH_SEPARATOR ';'
00057 #else
00058   /* Unix */
00059 # define PATH_SEPARATOR ':'
00060 #endif
00061 
00062 /* Encoding of locale name parts.  */
00063 #define CEN_REVISION            1
00064 #define CEN_SPONSOR             2
00065 #define CEN_SPECIAL             4
00066 #define XPG_NORM_CODESET        8
00067 #define XPG_CODESET             16
00068 #define TERRITORY               32
00069 #define CEN_AUDIENCE            64
00070 #define XPG_MODIFIER            128
00071 
00072 #define CEN_SPECIFIC    (CEN_REVISION|CEN_SPONSOR|CEN_SPECIAL|CEN_AUDIENCE)
00073 #define XPG_SPECIFIC    (XPG_CODESET|XPG_NORM_CODESET|XPG_MODIFIER)
00074 
00075 
00076 struct loaded_l10nfile
00077 {
00078   const char *filename;
00079   int decided;
00080 
00081   const void *data;
00082 
00083   struct loaded_l10nfile *next;
00084   struct loaded_l10nfile *successor[1];
00085 };
00086 
00087 
00088 /* Normalize codeset name.  There is no standard for the codeset
00089    names.  Normalization allows the user to use any of the common
00090    names.  The return value is dynamically allocated and has to be
00091    freed by the caller.  */
00092 extern const char *_nl_normalize_codeset PARAMS ((const char *codeset,
00093                                                   size_t name_len));
00094 
00095 extern struct loaded_l10nfile *
00096 _nl_make_l10nflist PARAMS ((struct loaded_l10nfile **l10nfile_list,
00097                             const char *dirlist, size_t dirlist_len, int mask,
00098                             const char *language, const char *territory,
00099                             const char *codeset,
00100                             const char *normalized_codeset,
00101                             const char *modifier, const char *special,
00102                             const char *sponsor, const char *revision,
00103                             const char *filename, int do_allocate));
00104 
00105 
00106 extern const char *_nl_expand_alias PARAMS ((const char *name));
00107 
00108 /* normalized_codeset is dynamically allocated and has to be freed by
00109    the caller.  */
00110 extern int _nl_explode_name PARAMS ((char *name, const char **language,
00111                                      const char **modifier,
00112                                      const char **territory,
00113                                      const char **codeset,
00114                                      const char **normalized_codeset,
00115                                      const char **special,
00116                                      const char **sponsor,
00117                                      const char **revision));
00118 
00119 extern char *_nl_find_language PARAMS ((const char *name));
00120 
00121 #endif  /* loadinfo.h */

Generated on Sun Feb 16 23:39:49 2003 for FreeLCD by doxygen1.2.18