Update.
[glibc.git] / intl / gettextP.h
blobbcbe2720a7c15236044986b109eed79a6c83f4a8
1 /* Header describing internals of gettext library
2 Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
3 Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
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.
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.
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. */
20 #ifndef _GETTEXTP_H
21 #define _GETTEXTP_H
23 #include "loadinfo.h"
25 /* @@ end of prolog @@ */
27 #ifndef PARAMS
28 # if __STDC__
29 # define PARAMS(args) args
30 # else
31 # define PARAMS(args) ()
32 # endif
33 #endif
35 #ifndef internal_function
36 # define internal_function
37 #endif
39 #ifndef W
40 # define W(flag, data) ((flag) ? SWAP (data) : (data))
41 #endif
44 #ifdef _LIBC
45 # include <byteswap.h>
46 # define SWAP(i) bswap_32 (i)
47 #else
48 static nls_uint32 SWAP PARAMS ((nls_uint32 i));
50 static inline nls_uint32
51 SWAP (i)
52 nls_uint32 i;
54 return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24);
56 #endif
59 struct loaded_domain
61 const char *data;
62 int use_mmap;
63 size_t mmap_size;
64 int must_swap;
65 nls_uint32 nstrings;
66 struct string_desc *orig_tab;
67 struct string_desc *trans_tab;
68 nls_uint32 hash_size;
69 nls_uint32 *hash_tab;
72 struct binding
74 struct binding *next;
75 char *domainname;
76 char *dirname;
79 struct loaded_l10nfile *_nl_find_domain PARAMS ((const char *__dirname,
80 char *__locale,
81 const char *__domainname))
82 internal_function;
83 void _nl_load_domain PARAMS ((struct loaded_l10nfile *__domain))
84 internal_function;
85 void _nl_unload_domain PARAMS ((struct loaded_domain *__domain))
86 internal_function;
88 /* @@ begin of epilog @@ */
90 #endif /* gettextP.h */