loadinfo.h revision 5bc5a89c2a5c07b0237c13d37d869c986b5435fb
15bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
25bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o   This file is part of the GNU C Library.
35bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
45bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o
55bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o   This program is free software; you can redistribute it and/or modify
65bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o   it under the terms of the GNU General Public License as published by
75bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o   the Free Software Foundation; either version 2, or (at your option)
85bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o   any later version.
95bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o
105bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o   This program is distributed in the hope that it will be useful,
115bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o   but WITHOUT ANY WARRANTY; without even the implied warranty of
125bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
135bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o   GNU General Public License for more details.
145bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o
155bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o   You should have received a copy of the GNU General Public License
165bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o   along with this program; if not, write to the Free Software Foundation,
175bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
185bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o
195bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o#ifndef PARAMS
205bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o# if __STDC__
215bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o#  define PARAMS(args) args
225bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o# else
235bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o#  define PARAMS(args) ()
245bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o# endif
255bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o#endif
265bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o
275bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o/* Encoding of locale name parts.  */
285bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o#define CEN_REVISION		1
295bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o#define CEN_SPONSOR		2
305bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o#define CEN_SPECIAL		4
315bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o#define XPG_NORM_CODESET	8
325bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o#define XPG_CODESET		16
335bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o#define TERRITORY		32
345bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o#define CEN_AUDIENCE		64
355bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o#define XPG_MODIFIER		128
365bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o
375bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o#define CEN_SPECIFIC	(CEN_REVISION|CEN_SPONSOR|CEN_SPECIAL|CEN_AUDIENCE)
385bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o#define XPG_SPECIFIC	(XPG_CODESET|XPG_NORM_CODESET|XPG_MODIFIER)
395bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o
405bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o
415bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'ostruct loaded_l10nfile
425bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o{
435bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o  const char *filename;
445bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o  int decided;
455bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o
465bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o  const void *data;
475bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o
485bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o  struct loaded_l10nfile *next;
495bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o  struct loaded_l10nfile *successor[1];
505bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o};
515bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o
525bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o
535bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'oextern const char *_nl_normalize_codeset PARAMS ((const unsigned char *codeset,
545bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o						  size_t name_len));
555bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o
565bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'oextern struct loaded_l10nfile *
575bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o_nl_make_l10nflist PARAMS ((struct loaded_l10nfile **l10nfile_list,
585bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o			    const char *dirlist, size_t dirlist_len, int mask,
595bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o			    const char *language, const char *territory,
605bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o			    const char *codeset,
615bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o			    const char *normalized_codeset,
625bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o			    const char *modifier, const char *special,
635bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o			    const char *sponsor, const char *revision,
645bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o			    const char *filename, int do_allocate));
655bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o
665bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o
675bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'oextern const char *_nl_expand_alias PARAMS ((const char *name));
685bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o
695bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'oextern int _nl_explode_name PARAMS ((char *name, const char **language,
705bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o				     const char **modifier,
715bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o				     const char **territory,
725bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o				     const char **codeset,
735bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o				     const char **normalized_codeset,
745bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o				     const char **special,
755bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o				     const char **sponsor,
765bc5a89c2a5c07b0237c13d37d869c986b5435fbTheodore Ts'o				     const char **revision));
77