~ubuntu-branches/ubuntu/maverick/texinfo/maverick

« back to all changes in this revision

Viewing changes to intl/loadinfo.h

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Preining
  • Date: 2005-10-28 15:10:30 UTC
  • mto: (2.1.1 dapper) (3.1.4 hardy)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20051028151030-9nsf2s2k2z3fktjt
Tags: upstream-4.8
ImportĀ upstreamĀ versionĀ 4.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (C) 1996-1999, 2000, 2001 Free Software Foundation, Inc.
 
1
/* Copyright (C) 1996-1999, 2000-2003 Free Software Foundation, Inc.
2
2
   This file is part of the GNU C Library.
3
3
   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
4
4
 
32
32
   in gettextP.h.
33
33
 */
34
34
 
35
 
#ifndef PARAMS
36
 
# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
37
 
#  define PARAMS(args) args
38
 
# else
39
 
#  define PARAMS(args) ()
40
 
# endif
41
 
#endif
42
 
 
43
35
#ifndef internal_function
44
36
# define internal_function
45
37
#endif
89
81
   names.  Normalization allows the user to use any of the common
90
82
   names.  The return value is dynamically allocated and has to be
91
83
   freed by the caller.  */
92
 
extern const char *_nl_normalize_codeset PARAMS ((const char *codeset,
93
 
                                                  size_t name_len));
 
84
extern const char *_nl_normalize_codeset (const char *codeset,
 
85
                                          size_t name_len);
94
86
 
 
87
/* Lookup a locale dependent file.
 
88
   *L10NFILE_LIST denotes a pool of lookup results of locale dependent
 
89
   files of the same kind, sorted in decreasing order of ->filename.
 
90
   DIRLIST and DIRLIST_LEN are an argz list of directories in which to
 
91
   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.
 
95
   The return value is the lookup result, either found in *L10NFILE_LIST,
 
96
   or - if DO_ALLOCATE is nonzero - freshly allocated, or possibly NULL.
 
97
   If the return value is non-NULL, it is added to *L10NFILE_LIST, and
 
98
   its ->next field denotes the chaining inside *L10NFILE_LIST, and
 
99
   furthermore its ->successor[] field contains a list of other lookup
 
100
   results from which this lookup result inherits.  */
95
101
extern struct loaded_l10nfile *
96
 
_nl_make_l10nflist PARAMS ((struct loaded_l10nfile **l10nfile_list,
97
 
                            const char *dirlist, size_t dirlist_len, int mask,
98
 
                            const char *language, const char *territory,
99
 
                            const char *codeset,
100
 
                            const char *normalized_codeset,
101
 
                            const char *modifier, const char *special,
102
 
                            const char *sponsor, const char *revision,
103
 
                            const char *filename, int do_allocate));
104
 
 
105
 
 
106
 
extern const char *_nl_expand_alias PARAMS ((const char *name));
107
 
 
108
 
/* normalized_codeset is dynamically allocated and has to be freed by
109
 
   the caller.  */
110
 
extern int _nl_explode_name PARAMS ((char *name, const char **language,
111
 
                                     const char **modifier,
112
 
                                     const char **territory,
113
 
                                     const char **codeset,
114
 
                                     const char **normalized_codeset,
115
 
                                     const char **special,
116
 
                                     const char **sponsor,
117
 
                                     const char **revision));
118
 
 
119
 
extern char *_nl_find_language PARAMS ((const char *name));
 
102
_nl_make_l10nflist (struct loaded_l10nfile **l10nfile_list,
 
103
                    const char *dirlist, size_t dirlist_len, int mask,
 
104
                    const char *language, const char *territory,
 
105
                    const char *codeset, const char *normalized_codeset,
 
106
                    const char *modifier, const char *special,
 
107
                    const char *sponsor, const char *revision,
 
108
                    const char *filename, int do_allocate);
 
109
 
 
110
/* Lookup the real locale name for a locale alias NAME, or NULL if
 
111
   NAME is not a locale alias (but possibly a real locale name).
 
112
   The return value is statically allocated and must not be freed.  */
 
113
extern const char *_nl_expand_alias (const char *name);
 
114
 
 
115
/* Split a locale name NAME into its pieces: language, modifier,
 
116
   territory, codeset, special, sponsor, revision.
 
117
   NAME gets destructively modified: NUL bytes are inserted here and
 
118
   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.
 
123
   The return value is a bitmask, where each bit corresponds to one
 
124
   filled-in value:
 
125
     XPG_MODIFIER, CEN_AUDIENCE  for *MODIFIER,
 
126
     TERRITORY                   for *TERRITORY,
 
127
     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.
 
132
 */
 
133
extern int _nl_explode_name (char *name, const char **language,
 
134
                             const char **modifier, const char **territory,
 
135
                             const char **codeset,
 
136
                             const char **normalized_codeset,
 
137
                             const char **special, const char **sponsor,
 
138
                             const char **revision);
 
139
 
 
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);
120
144
 
121
145
#endif  /* loadinfo.h */