Blame intl/gmo.h

Packit Service a721b1
/* Description of GNU message catalog format: general file layout.
Packit Service a721b1
   Copyright (C) 1995, 1997, 2000-2002, 2004, 2006 Free Software Foundation, Inc.
Packit Service a721b1
Packit Service a721b1
   This program is free software; you can redistribute it and/or modify it
Packit Service a721b1
   under the terms of the GNU Library General Public License as published
Packit Service a721b1
   by the Free Software Foundation; either version 2, or (at your option)
Packit Service a721b1
   any later version.
Packit Service a721b1
Packit Service a721b1
   This program is distributed in the hope that it will be useful,
Packit Service a721b1
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service a721b1
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit Service a721b1
   Library General Public License for more details.
Packit Service a721b1
Packit Service a721b1
   You should have received a copy of the GNU Library General Public
Packit Service a721b1
   License along with this program; if not, write to the Free Software
Packit Service a721b1
   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
Packit Service a721b1
   USA.  */
Packit Service a721b1
Packit Service a721b1
#ifndef _GETTEXT_H
Packit Service a721b1
#define _GETTEXT_H 1
Packit Service a721b1
Packit Service a721b1
#include <limits.h>
Packit Service a721b1
Packit Service a721b1
/* @@ end of prolog @@ */
Packit Service a721b1
Packit Service a721b1
/* The magic number of the GNU message catalog format.  */
Packit Service a721b1
#define _MAGIC 0x950412de
Packit Service a721b1
#define _MAGIC_SWAPPED 0xde120495
Packit Service a721b1
Packit Service a721b1
/* Revision number of the currently used .mo (binary) file format.  */
Packit Service a721b1
#define MO_REVISION_NUMBER 0
Packit Service a721b1
#define MO_REVISION_NUMBER_WITH_SYSDEP_I 1
Packit Service a721b1
Packit Service a721b1
/* The following contortions are an attempt to use the C preprocessor
Packit Service a721b1
   to determine an unsigned integral type that is 32 bits wide.  An
Packit Service a721b1
   alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but
Packit Service a721b1
   as of version autoconf-2.13, the AC_CHECK_SIZEOF macro doesn't work
Packit Service a721b1
   when cross-compiling.  */
Packit Service a721b1
Packit Service a721b1
#if __STDC__
Packit Service a721b1
# define UINT_MAX_32_BITS 4294967295U
Packit Service a721b1
#else
Packit Service a721b1
# define UINT_MAX_32_BITS 0xFFFFFFFF
Packit Service a721b1
#endif
Packit Service a721b1
Packit Service a721b1
/* If UINT_MAX isn't defined, assume it's a 32-bit type.
Packit Service a721b1
   This should be valid for all systems GNU cares about because
Packit Service a721b1
   that doesn't include 16-bit systems, and only modern systems
Packit Service a721b1
   (that certainly have <limits.h>) have 64+-bit integral types.  */
Packit Service a721b1
Packit Service a721b1
#ifndef UINT_MAX
Packit Service a721b1
# define UINT_MAX UINT_MAX_32_BITS
Packit Service a721b1
#endif
Packit Service a721b1
Packit Service a721b1
#if UINT_MAX == UINT_MAX_32_BITS
Packit Service a721b1
typedef unsigned nls_uint32;
Packit Service a721b1
#else
Packit Service a721b1
# if USHRT_MAX == UINT_MAX_32_BITS
Packit Service a721b1
typedef unsigned short nls_uint32;
Packit Service a721b1
# else
Packit Service a721b1
#  if ULONG_MAX == UINT_MAX_32_BITS
Packit Service a721b1
typedef unsigned long nls_uint32;
Packit Service a721b1
#  else
Packit Service a721b1
  /* The following line is intended to throw an error.  Using #error is
Packit Service a721b1
     not portable enough.  */
Packit Service a721b1
  "Cannot determine unsigned 32-bit data type."
Packit Service a721b1
#  endif
Packit Service a721b1
# endif
Packit Service a721b1
#endif
Packit Service a721b1
Packit Service a721b1
Packit Service a721b1
/* Header for binary .mo file format.  */
Packit Service a721b1
struct mo_file_header
Packit Service a721b1
{
Packit Service a721b1
  /* The magic number.  */
Packit Service a721b1
  nls_uint32 magic;
Packit Service a721b1
  /* The revision number of the file format.  */
Packit Service a721b1
  nls_uint32 revision;
Packit Service a721b1
Packit Service a721b1
  /* The following are only used in .mo files with major revision 0 or 1.  */
Packit Service a721b1
Packit Service a721b1
  /* The number of strings pairs.  */
Packit Service a721b1
  nls_uint32 nstrings;
Packit Service a721b1
  /* Offset of table with start offsets of original strings.  */
Packit Service a721b1
  nls_uint32 orig_tab_offset;
Packit Service a721b1
  /* Offset of table with start offsets of translated strings.  */
Packit Service a721b1
  nls_uint32 trans_tab_offset;
Packit Service a721b1
  /* Size of hash table.  */
Packit Service a721b1
  nls_uint32 hash_tab_size;
Packit Service a721b1
  /* Offset of first hash table entry.  */
Packit Service a721b1
  nls_uint32 hash_tab_offset;
Packit Service a721b1
Packit Service a721b1
  /* The following are only used in .mo files with minor revision >= 1.  */
Packit Service a721b1
Packit Service a721b1
  /* The number of system dependent segments.  */
Packit Service a721b1
  nls_uint32 n_sysdep_segments;
Packit Service a721b1
  /* Offset of table describing system dependent segments.  */
Packit Service a721b1
  nls_uint32 sysdep_segments_offset;
Packit Service a721b1
  /* The number of system dependent strings pairs.  */
Packit Service a721b1
  nls_uint32 n_sysdep_strings;
Packit Service a721b1
  /* Offset of table with start offsets of original sysdep strings.  */
Packit Service a721b1
  nls_uint32 orig_sysdep_tab_offset;
Packit Service a721b1
  /* Offset of table with start offsets of translated sysdep strings.  */
Packit Service a721b1
  nls_uint32 trans_sysdep_tab_offset;
Packit Service a721b1
};
Packit Service a721b1
Packit Service a721b1
/* Descriptor for static string contained in the binary .mo file.  */
Packit Service a721b1
struct string_desc
Packit Service a721b1
{
Packit Service a721b1
  /* Length of addressed string, not including the trailing NUL.  */
Packit Service a721b1
  nls_uint32 length;
Packit Service a721b1
  /* Offset of string in file.  */
Packit Service a721b1
  nls_uint32 offset;
Packit Service a721b1
};
Packit Service a721b1
Packit Service a721b1
/* The following are only used in .mo files with minor revision >= 1.  */
Packit Service a721b1
Packit Service a721b1
/* Descriptor for system dependent string segment.  */
Packit Service a721b1
struct sysdep_segment
Packit Service a721b1
{
Packit Service a721b1
  /* Length of addressed string, including the trailing NUL.  */
Packit Service a721b1
  nls_uint32 length;
Packit Service a721b1
  /* Offset of string in file.  */
Packit Service a721b1
  nls_uint32 offset;
Packit Service a721b1
};
Packit Service a721b1
Packit Service a721b1
/* Pair of a static and a system dependent segment, in struct sysdep_string.  */
Packit Service a721b1
struct segment_pair
Packit Service a721b1
{
Packit Service a721b1
  /* Size of static segment.  */
Packit Service a721b1
  nls_uint32 segsize;
Packit Service a721b1
  /* Reference to system dependent string segment, or ~0 at the end.  */
Packit Service a721b1
  nls_uint32 sysdepref;
Packit Service a721b1
};
Packit Service a721b1
Packit Service a721b1
/* Descriptor for system dependent string.  */
Packit Service a721b1
struct sysdep_string
Packit Service a721b1
{
Packit Service a721b1
  /* Offset of static string segments in file.  */
Packit Service a721b1
  nls_uint32 offset;
Packit Service a721b1
  /* Alternating sequence of static and system dependent segments.
Packit Service a721b1
     The last segment is a static segment, including the trailing NUL.  */
Packit Service a721b1
  struct segment_pair segments[1];
Packit Service a721b1
};
Packit Service a721b1
Packit Service a721b1
/* Marker for the end of the segments[] array.  This has the value 0xFFFFFFFF,
Packit Service a721b1
   regardless whether 'int' is 16 bit, 32 bit, or 64 bit.  */
Packit Service a721b1
#define SEGMENTS_END ((nls_uint32) ~0)
Packit Service a721b1
Packit Service a721b1
/* @@ begin of epilog @@ */
Packit Service a721b1
Packit Service a721b1
#endif	/* gettext.h  */