OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [newlib-1.18.0/] [newlib/] [libc/] [sys/] [linux/] [intl/] [gettext.h] - Blame information for rev 357

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 207 jeremybenn
/* Internal header for GNU gettext internationalization functions.
2
   Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
3
   This file is part of the GNU C Library.
4
 
5
   The GNU C Library is free software; you can redistribute it and/or
6
   modify it under the terms of the GNU Lesser General Public
7
   License as published by the Free Software Foundation; either
8
   version 2.1 of the 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
   Lesser General Public License for more details.
14
 
15
   You should have received a copy of the GNU Lesser General Public
16
   License along with the GNU C Library; if not, write to the Free
17
   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
18
   02111-1307 USA.  */
19
 
20
#ifndef _GETTEXT_H
21
#define _GETTEXT_H 1
22
 
23
#if HAVE_LIMITS_H || _LIBC
24
# include <limits.h>
25
#endif
26
 
27
/* @@ end of prolog @@ */
28
 
29
/* The magic number of the GNU message catalog format.  */
30
#define _MAGIC 0x950412de
31
#define _MAGIC_SWAPPED 0xde120495
32
 
33
/* Revision number of the currently used .mo (binary) file format.  */
34
#define MO_REVISION_NUMBER 0
35
 
36
/* The following contortions are an attempt to use the C preprocessor
37
   to determine an unsigned integral type that is 32 bits wide.  An
38
   alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but
39
   as of version autoconf-2.13, the AC_CHECK_SIZEOF macro doesn't work
40
   when cross-compiling.  */
41
 
42
#if __STDC__
43
# define UINT_MAX_32_BITS 4294967295U
44
#else
45
# define UINT_MAX_32_BITS 0xFFFFFFFF
46
#endif
47
 
48
/* If UINT_MAX isn't defined, assume it's a 32-bit type.
49
   This should be valid for all systems GNU cares about because
50
   that doesn't include 16-bit systems, and only modern systems
51
   (that certainly have <limits.h>) have 64+-bit integral types.  */
52
 
53
#ifndef UINT_MAX
54
# define UINT_MAX UINT_MAX_32_BITS
55
#endif
56
 
57
#if UINT_MAX == UINT_MAX_32_BITS
58
typedef unsigned nls_uint32;
59
#else
60
# if USHRT_MAX == UINT_MAX_32_BITS
61
typedef unsigned short nls_uint32;
62
# else
63
#  if ULONG_MAX == UINT_MAX_32_BITS
64
typedef unsigned long nls_uint32;
65
#  else
66
  /* The following line is intended to throw an error.  Using #error is
67
     not portable enough.  */
68
  "Cannot determine unsigned 32-bit data type."
69
#  endif
70
# endif
71
#endif
72
 
73
 
74
/* Header for binary .mo file format.  */
75
struct mo_file_header
76
{
77
  /* The magic number.  */
78
  nls_uint32 magic;
79
  /* The revision number of the file format.  */
80
  nls_uint32 revision;
81
  /* The number of strings pairs.  */
82
  nls_uint32 nstrings;
83
  /* Offset of table with start offsets of original strings.  */
84
  nls_uint32 orig_tab_offset;
85
  /* Offset of table with start offsets of translation strings.  */
86
  nls_uint32 trans_tab_offset;
87
  /* Size of hashing table.  */
88
  nls_uint32 hash_tab_size;
89
  /* Offset of first hashing entry.  */
90
  nls_uint32 hash_tab_offset;
91
};
92
 
93
struct string_desc
94
{
95
  /* Length of addressed string.  */
96
  nls_uint32 length;
97
  /* Offset of string in file.  */
98
  nls_uint32 offset;
99
};
100
 
101
/* @@ begin of epilog @@ */
102
 
103
#endif  /* gettext.h  */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.