]> git.saurik.com Git - bison.git/blame - intl/gettextP.h
* lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
[bison.git] / intl / gettextP.h
CommitLineData
705db0b5
AD
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.
4
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.
9
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.
14
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. */
18
19#ifndef _GETTEXTP_H
20#define _GETTEXTP_H
21
22#include "loadinfo.h"
23
24/* @@ end of prolog @@ */
25
26#ifndef PARAMS
27# if __STDC__
28# define PARAMS(args) args
29# else
30# define PARAMS(args) ()
31# endif
32#endif
33
34#ifndef internal_function
35# define internal_function
36#endif
37
38#ifndef W
39# define W(flag, data) ((flag) ? SWAP (data) : (data))
40#endif
41
42
43#ifdef _LIBC
44# include <byteswap.h>
45# define SWAP(i) bswap_32 (i)
46#else
47static nls_uint32 SWAP PARAMS ((nls_uint32 i));
48
49static inline nls_uint32
50SWAP (i)
51 nls_uint32 i;
52{
53 return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24);
54}
55#endif
56
57
58struct loaded_domain
59{
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;
69};
70
71struct binding
72{
73 struct binding *next;
74 char *domainname;
75 char *dirname;
76};
77
78struct loaded_l10nfile *_nl_find_domain PARAMS ((const char *__dirname,
79 char *__locale,
80 const char *__domainname))
81 internal_function;
82void _nl_load_domain PARAMS ((struct loaded_l10nfile *__domain))
83 internal_function;
84void _nl_unload_domain PARAMS ((struct loaded_domain *__domain))
85 internal_function;
86
87/* @@ begin of epilog @@ */
88
89#endif /* gettextP.h */