* elf.c (assign_file_positions_except_relocs): Assign relocs
[binutils.git] / intl / gettextP.h
blob00c520319728c12a69f7fc6ca20ae2f5ec33f1f1
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 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 _GETTEXTP_H
20 #define _GETTEXTP_H
22 #include "loadinfo.h"
24 /* @@ end of prolog @@ */
26 #ifndef PARAMS
27 # if __STDC__
28 # define PARAMS(args) args
29 # else
30 # define PARAMS(args) ()
31 # endif
32 #endif
34 #ifndef internal_function
35 # define internal_function
36 #endif
38 #ifndef W
39 # define W(flag, data) ((flag) ? SWAP (data) : (data))
40 #endif
43 #ifdef _LIBC
44 # include <byteswap.h>
45 # define SWAP(i) bswap_32 (i)
46 #else
47 static nls_uint32 SWAP PARAMS ((nls_uint32 i));
49 static inline nls_uint32
50 SWAP (i)
51 nls_uint32 i;
53 return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24);
55 #endif
58 struct loaded_domain
60 const char *data;
61 int use_mmap;
62 size_t mmap_size;
63 int must_swap;
64 nls_uint32 nstrings;
65 struct string_desc *orig_tab;
66 struct string_desc *trans_tab;
67 nls_uint32 hash_size;
68 nls_uint32 *hash_tab;
71 struct binding
73 struct binding *next;
74 char *domainname;
75 char *dirname;
78 struct loaded_l10nfile *_nl_find_domain PARAMS ((const char *__dirname,
79 char *__locale,
80 const char *__domainname))
81 internal_function;
82 void _nl_load_domain PARAMS ((struct loaded_l10nfile *__domain))
83 internal_function;
84 void _nl_unload_domain PARAMS ((struct loaded_domain *__domain))
85 internal_function;
87 /* @@ begin of epilog @@ */
89 #endif /* gettextP.h */