bug 771: Remember whether navigation was requested by user
[elinks/kon.git] / src / intl / gettext / loadinfo.h
blobfe47c90cfa307c1c0b90430a825bfaa605e1048e
1 /* Copyright (C) 1996-1999, 2000, 2001 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3 Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2, or (at your option)
8 any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software Foundation,
17 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
19 #ifndef _LOADINFO_H
20 #define _LOADINFO_H 1
22 /* Separator in PATH like lists of pathnames. */
23 #if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
24 /* Win32, OS/2, DOS */
25 #define PATH_SEPARATOR ';'
26 #else
27 /* Unix */
28 #define PATH_SEPARATOR ':'
29 #endif
31 /* Encoding of locale name parts. */
32 #define CEN_REVISION 1
33 #define CEN_SPONSOR 2
34 #define CEN_SPECIAL 4
35 #define XPG_NORM_CODESET 8
36 #define XPG_CODESET 16
37 #define TERRITORY 32
38 #define CEN_AUDIENCE 64
39 #define XPG_MODIFIER 128
41 #define CEN_SPECIFIC (CEN_REVISION|CEN_SPONSOR|CEN_SPECIAL|CEN_AUDIENCE)
42 #define XPG_SPECIFIC (XPG_CODESET|XPG_NORM_CODESET|XPG_MODIFIER)
44 struct loaded_l10nfile {
45 const unsigned char *filename;
46 const unsigned char *langdirname;
47 int langdirnamelen;
49 int decided;
51 const void *data;
53 struct loaded_l10nfile *next;
54 struct loaded_l10nfile *successor[1];
57 /* Normalize codeset name. There is no standard for the codeset
58 names. Normalization allows the user to use any of the common
59 names. The return value is dynamically allocated and has to be
60 freed by the caller. */
61 extern const unsigned char *_nl_normalize_codeset(const unsigned char *codeset,
62 size_t name_len);
64 extern struct loaded_l10nfile *_nl_make_l10nflist(
65 struct loaded_l10nfile ** l10nfile_list, const unsigned char *dirlist,
66 size_t dirlist_len, int mask, const unsigned char *language,
67 const unsigned char *territory, const unsigned char *codeset,
68 const unsigned char *normalized_codeset, const unsigned char *modifier,
69 const unsigned char *special, const unsigned char *sponsor, const unsigned char *revision,
70 const unsigned char *filename, int do_allocate);
72 extern const unsigned char *_nl_expand_alias(const unsigned char *name);
74 /* normalized_codeset is dynamically allocated and has to be freed by
75 the caller. */
76 extern int _nl_explode_name(unsigned char *name, const unsigned char **language,
77 const unsigned char **modifier,
78 const unsigned char **territory,
79 const unsigned char **codeset,
80 const unsigned char **normalized_codeset,
81 const unsigned char **special,
82 const unsigned char **sponsor,
83 const unsigned char **revision);
85 extern unsigned char *_nl_find_language(const unsigned char *name);
87 #endif /* loadinfo.h */