]> sourceware.org Git - glibc.git/blob - intl/gettextP.h
Update.
[glibc.git] / intl / gettextP.h
1 /* Header describing internals of gettext library
2 Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
3 Written by Ulrich Drepper <drepper@cygnus.com>, 1995.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public License as
7 published by the Free Software Foundation; either version 2 of the
8 License, or (at your option) any later version.
9
10 The GNU C Library 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 GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public
16 License along with the GNU C Library; see the file COPYING.LIB. If not,
17 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. */
19
20 #ifndef _GETTEXTP_H
21 #define _GETTEXTP_H
22
23 #ifdef _LIBC
24 # include "../iconv/gconv_int.h"
25 #else
26 # if HAVE_ICONV
27 # include <iconv.h>
28 # endif
29 #endif
30
31 #include "loadinfo.h"
32
33 /* @@ end of prolog @@ */
34
35 #ifndef PARAMS
36 # if __STDC__
37 # define PARAMS(args) args
38 # else
39 # define PARAMS(args) ()
40 # endif
41 #endif
42
43 #ifndef internal_function
44 # define internal_function
45 #endif
46
47 #ifndef W
48 # define W(flag, data) ((flag) ? SWAP (data) : (data))
49 #endif
50
51
52 #ifdef _LIBC
53 # include <byteswap.h>
54 # define SWAP(i) bswap_32 (i)
55 #else
56 static nls_uint32 SWAP PARAMS ((nls_uint32 i));
57
58 static inline nls_uint32
59 SWAP (i)
60 nls_uint32 i;
61 {
62 return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24);
63 }
64 #endif
65
66
67 struct loaded_domain
68 {
69 const char *data;
70 int use_mmap;
71 size_t mmap_size;
72 int must_swap;
73 nls_uint32 nstrings;
74 struct string_desc *orig_tab;
75 struct string_desc *trans_tab;
76 nls_uint32 hash_size;
77 nls_uint32 *hash_tab;
78 #ifdef _LIBC
79 __gconv_t conv;
80 #else
81 # if HAVE_ICONV
82 iconv_t conv;
83 # endif
84 #endif
85 char **conv_tab;
86 };
87
88 struct binding
89 {
90 struct binding *next;
91 char *domainname;
92 char *dirname;
93 };
94
95 struct loaded_l10nfile *_nl_find_domain PARAMS ((const char *__dirname,
96 char *__locale,
97 const char *__domainname))
98 internal_function;
99 void _nl_load_domain PARAMS ((struct loaded_l10nfile *__domain))
100 internal_function;
101 void _nl_unload_domain PARAMS ((struct loaded_domain *__domain))
102 internal_function;
103
104 /* @@ begin of epilog @@ */
105
106 #endif /* gettextP.h */
This page took 0.04136 seconds and 5 git commands to generate.