[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Adonthell-commits] CVS: adonthell/intl ChangeLog,1.3,1.4 Makefile.in,1.
From: |
Kai Sterker <address@hidden> |
Subject: |
[Adonthell-commits] CVS: adonthell/intl ChangeLog,1.3,1.4 Makefile.in,1.2,1.3 VERSION,1.3,1.4 bindtextdom.c,1.2,1.3 config.charset,1.3,1.4 dcgettext.c,1.2,1.3 dcigettext.c,1.2,1.3 dcngettext.c,1.2,1.3 dgettext.c,1.2,1.3 dngettext.c,1.2,1.3 eval-plural.h,1.3,1.4 gettext.c,1.2,1.3 gettextP.h,1.2,1.3 gmo.h,1.2,1.3 intl-compat.c,1.2,1.3 l10nflist.c,1.2,1.3 libgnuintl.h,1.2,1.3 loadinfo.h,1.2,1.3 loadmsgcat.c,1.2,1.3 localcharset.c,1.2,1.3 localename.c,1.4,1.5 ngettext.c,1.2,1.3 os2compat.c,1.3,1.4 os2compat.h,1.2,1.3 plural-exp.h,1.2,1.3 textdomain.c,1.2,1.3 |
Date: |
Thu, 22 Aug 2002 11:16:30 -0400 |
Update of /cvsroot/adonthell/adonthell/intl
In directory subversions:/tmp/cvs-serv12550/intl
Modified Files:
ChangeLog Makefile.in VERSION bindtextdom.c config.charset
dcgettext.c dcigettext.c dcngettext.c dgettext.c dngettext.c
eval-plural.h gettext.c gettextP.h gmo.h intl-compat.c
l10nflist.c libgnuintl.h loadinfo.h loadmsgcat.c
localcharset.c localename.c ngettext.c os2compat.c os2compat.h
plural-exp.h textdomain.c
Log Message:
UPDATED gettext to version 0.11.5
Index: ChangeLog
===================================================================
RCS file: /cvsroot/adonthell/adonthell/intl/ChangeLog,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** ChangeLog 15 Apr 2002 13:02:35 -0000 1.3
--- ChangeLog 22 Aug 2002 15:16:28 -0000 1.4
***************
*** 1,4 ****
! 2002-03-12 GNU <address@hidden>
! * Version 0.11.1 released.
--- 1,4 ----
! 2002-08-06 GNU <address@hidden>
! * Version 0.11.5 released.
Index: Makefile.in
===================================================================
RCS file: /cvsroot/adonthell/adonthell/intl/Makefile.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** Makefile.in 7 Apr 2002 09:51:28 -0000 1.2
--- Makefile.in 22 Aug 2002 15:16:28 -0000 1.3
***************
*** 85,91 ****
# Maintainers of other packages that include the intl directory must *not*
# change these values.
! LTV_CURRENT=2
LTV_REVISION=0
! LTV_AGE=0
.SUFFIXES:
--- 85,91 ----
# Maintainers of other packages that include the intl directory must *not*
# change these values.
! LTV_CURRENT=4
LTV_REVISION=0
! LTV_AGE=2
.SUFFIXES:
Index: VERSION
===================================================================
RCS file: /cvsroot/adonthell/adonthell/intl/VERSION,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** VERSION 15 Apr 2002 13:02:35 -0000 1.3
--- VERSION 22 Aug 2002 15:16:28 -0000 1.4
***************
*** 1 ****
! GNU gettext library from gettext-0.11.1
--- 1 ----
! GNU gettext library from gettext-0.11.5
Index: bindtextdom.c
===================================================================
RCS file: /cvsroot/adonthell/adonthell/intl/bindtextdom.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** bindtextdom.c 7 Apr 2002 09:51:28 -0000 1.2
--- bindtextdom.c 22 Aug 2002 15:16:28 -0000 1.3
***************
*** 1,4 ****
/* Implementation of the bindtextdomain(3) function
! Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
--- 1,4 ----
/* Implementation of the bindtextdomain(3) function
! Copyright (C) 1995-1998, 2000, 2001, 2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
***************
*** 46,51 ****
using libintl.a cannot be linked statically. */
#if !defined _LIBC
! # define _nl_default_dirname _nl_default_dirname__
! # define _nl_domain_bindings _nl_domain_bindings__
#endif
--- 46,51 ----
using libintl.a cannot be linked statically. */
#if !defined _LIBC
! # define _nl_default_dirname libintl_nl_default_dirname
! # define _nl_domain_bindings libintl_nl_domain_bindings
#endif
***************
*** 64,68 ****
/* Lock variable to protect the global data in the gettext implementation. */
! __libc_rwlock_define (extern, _nl_state_lock)
--- 64,68 ----
/* Lock variable to protect the global data in the gettext implementation. */
! __libc_rwlock_define (extern, _nl_state_lock attribute_hidden)
***************
*** 78,83 ****
# endif
#else
! # define BINDTEXTDOMAIN bindtextdomain__
! # define BIND_TEXTDOMAIN_CODESET bind_textdomain_codeset__
#endif
--- 78,83 ----
# endif
#else
! # define BINDTEXTDOMAIN libintl_bindtextdomain
! # define BIND_TEXTDOMAIN_CODESET libintl_bind_textdomain_codeset
#endif
Index: config.charset
===================================================================
RCS file: /cvsroot/adonthell/adonthell/intl/config.charset,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** config.charset 15 Apr 2002 13:02:35 -0000 1.3
--- config.charset 22 Aug 2002 15:16:28 -0000 1.4
***************
*** 35,39 ****
# ISO-8859-1 glibc aix hpux irix osf solaris freebsd yes
# ISO-8859-2 glibc aix hpux irix osf solaris freebsd yes
! # ISO-8859-3 glibc yes
# ISO-8859-4 osf solaris freebsd yes
# ISO-8859-5 glibc aix hpux irix osf solaris freebsd yes
--- 35,39 ----
# ISO-8859-1 glibc aix hpux irix osf solaris freebsd yes
# ISO-8859-2 glibc aix hpux irix osf solaris freebsd yes
! # ISO-8859-3 glibc solaris yes
# ISO-8859-4 osf solaris freebsd yes
# ISO-8859-5 glibc aix hpux irix osf solaris freebsd yes
***************
*** 43,49 ****
--- 43,51 ----
# ISO-8859-9 glibc aix hpux irix osf solaris yes
# ISO-8859-13 glibc
+ # ISO-8859-14 glibc
# ISO-8859-15 glibc aix osf solaris freebsd
# KOI8-R glibc solaris freebsd yes
# KOI8-U glibc freebsd yes
+ # KOI8-T glibc
# CP437 dos
# CP775 dos
***************
*** 59,79 ****
# CP866 freebsd dos
# CP869 dos
! # CP874 win32 dos
# CP922 aix
! # CP932 aix win32 dos
# CP943 aix
! # CP949 osf win32 dos
! # CP950 win32 dos
# CP1046 aix
# CP1124 aix
# CP1129 aix
! # CP1250 win32
! # CP1251 glibc win32
! # CP1252 aix win32
! # CP1253 win32
! # CP1254 win32
! # CP1255 win32
! # CP1256 win32
! # CP1257 win32
# GB2312 glibc aix hpux irix solaris freebsd yes
# EUC-JP glibc aix hpux irix osf solaris freebsd yes
--- 61,82 ----
# CP866 freebsd dos
# CP869 dos
! # CP874 woe32 dos
# CP922 aix
! # CP932 aix woe32 dos
# CP943 aix
! # CP949 osf woe32 dos
! # CP950 woe32 dos
# CP1046 aix
# CP1124 aix
+ # CP1125 dos
# CP1129 aix
! # CP1250 woe32
! # CP1251 glibc woe32
! # CP1252 aix woe32
! # CP1253 woe32
! # CP1254 woe32
! # CP1255 glibc woe32
! # CP1256 woe32
! # CP1257 woe32
# GB2312 glibc aix hpux irix solaris freebsd yes
# EUC-JP glibc aix hpux irix osf solaris freebsd yes
***************
*** 81,91 ****
# EUC-TW glibc aix hpux irix osf solaris
# BIG5 glibc aix hpux osf solaris freebsd yes
! # BIG5-HKSCS glibc
! # GBK aix osf win32 dos
! # GB18030 glibc
# SHIFT_JIS hpux osf solaris freebsd yes
! # JOHAB glibc win32
# TIS-620 glibc aix hpux osf solaris
# VISCII glibc yes
# HP-ROMAN8 hpux
# HP-ARABIC8 hpux
--- 84,96 ----
# EUC-TW glibc aix hpux irix osf solaris
# BIG5 glibc aix hpux osf solaris freebsd yes
! # BIG5-HKSCS glibc solaris
! # GBK glibc aix osf solaris woe32 dos
! # GB18030 glibc solaris
# SHIFT_JIS hpux osf solaris freebsd yes
! # JOHAB glibc solaris woe32
# TIS-620 glibc aix hpux osf solaris
# VISCII glibc yes
+ # TCVN5712-1 glibc
+ # GEORGIAN-PS glibc
# HP-ROMAN8 hpux
# HP-ARABIC8 hpux
***************
*** 218,221 ****
--- 223,227 ----
echo "ISO8859-1 ISO-8859-1"
echo "ISO8859-2 ISO-8859-2"
+ echo "ISO8859-3 ISO-8859-3"
echo "ISO8859-4 ISO-8859-4"
echo "ISO8859-5 ISO-8859-5"
***************
*** 227,233 ****
--- 233,243 ----
echo "koi8-r KOI8-R"
echo "BIG5 BIG5"
+ echo "Big5-HKSCS BIG5-HKSCS"
echo "gb2312 GB2312"
+ echo "GBK GBK"
+ echo "GB18030 GB18030"
echo "cns11643 EUC-TW"
echo "5601 EUC-KR"
+ echo "ko_KR.johap92 JOHAB"
echo "eucJP EUC-JP"
echo "PCK SHIFT_JIS"
***************
*** 301,305 ****
echo "# correct it in this file, and send a mail to"
echo "# Juan Manuel Guerrero <address@hidden>"
! echo "# and Bruno Haible <address@hidden>."
echo "#"
echo "C ASCII"
--- 311,315 ----
echo "# correct it in this file, and send a mail to"
echo "# Juan Manuel Guerrero <address@hidden>"
! echo "# and Bruno Haible <address@hidden>."
echo "#"
echo "C ASCII"
***************
*** 413,416 ****
--- 423,428 ----
echo "ru CP866"
echo "ru_RU CP866"
+ echo "uk CP1125"
+ echo "uk_UA CP1125"
# ISO-8859-6 languages
echo "ar CP864"
Index: dcgettext.c
===================================================================
RCS file: /cvsroot/adonthell/adonthell/intl/dcgettext.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** dcgettext.c 7 Apr 2002 09:51:28 -0000 1.2
--- dcgettext.c 22 Aug 2002 15:16:28 -0000 1.3
***************
*** 1,4 ****
/* Implementation of the dcgettext(3) function.
! Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
--- 1,4 ----
/* Implementation of the dcgettext(3) function.
! Copyright (C) 1995-1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
***************
*** 38,43 ****
# define DCIGETTEXT __dcigettext
#else
! # define DCGETTEXT dcgettext__
! # define DCIGETTEXT dcigettext__
#endif
--- 38,43 ----
# define DCIGETTEXT __dcigettext
#else
! # define DCGETTEXT libintl_dcgettext
! # define DCIGETTEXT libintl_dcigettext
#endif
***************
*** 55,58 ****
--- 55,59 ----
#ifdef _LIBC
/* Alias for function name in GNU C Library. */
+ INTDEF(__dcgettext)
weak_alias (__dcgettext, dcgettext);
#endif
Index: dcigettext.c
===================================================================
RCS file: /cvsroot/adonthell/adonthell/intl/dcigettext.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** dcigettext.c 7 Apr 2002 09:51:28 -0000 1.2
--- dcigettext.c 22 Aug 2002 15:16:28 -0000 1.3
***************
*** 65,68 ****
--- 65,82 ----
#include <locale.h>
+ #ifdef _LIBC
+ /* Guess whether integer division by zero raises signal SIGFPE.
+ Set to 1 only if you know for sure. In case of doubt, set to 0. */
+ # if defined __alpha__ || defined __arm__ || defined __i386__ \
+ || defined __m68k__ || defined __s390__
+ # define INTDIV0_RAISES_SIGFPE 1
+ # else
+ # define INTDIV0_RAISES_SIGFPE 0
+ # endif
+ #endif
+ #if !INTDIV0_RAISES_SIGFPE
+ # include <signal.h>
+ #endif
+
#if defined HAVE_SYS_PARAM_H || defined _LIBC
# include <sys/param.h>
***************
*** 103,110 ****
using libintl.a cannot be linked statically. */
#if !defined _LIBC
! # define _nl_default_default_domain _nl_default_default_domain__
! # define _nl_current_default_domain _nl_current_default_domain__
! # define _nl_default_dirname _nl_default_dirname__
! # define _nl_domain_bindings _nl_domain_bindings__
#endif
--- 117,124 ----
using libintl.a cannot be linked statically. */
#if !defined _LIBC
! # define _nl_default_default_domain libintl_nl_default_default_domain
! # define _nl_current_default_domain libintl_nl_current_default_domain
! # define _nl_default_dirname libintl_nl_default_dirname
! # define _nl_domain_bindings libintl_nl_domain_bindings
#endif
***************
*** 260,267 ****
/* Name of the default domain used for gettext(3) prior any call to
textdomain(3). The default value for this is "messages". */
! const char _nl_default_default_domain[] = "messages";
/* Value used as the default domain for gettext(3). */
! const char *_nl_current_default_domain = _nl_default_default_domain;
/* Contains the default location of the message catalogs. */
--- 274,282 ----
/* Name of the default domain used for gettext(3) prior any call to
textdomain(3). The default value for this is "messages". */
! const char _nl_default_default_domain[] attribute_hidden = "messages";
/* Value used as the default domain for gettext(3). */
! const char *_nl_current_default_domain attribute_hidden
! = _nl_default_default_domain;
/* Contains the default location of the message catalogs. */
***************
*** 292,295 ****
--- 307,311 ----
#ifdef HAVE_ALLOCA
/* Nothing has to be done. */
+ # define freea(p) /* nothing */
# define ADD_BLOCK(list, address) /* nothing */
# define FREE_BLOCKS(list) /* nothing */
***************
*** 316,319 ****
--- 332,336 ----
struct block_list *old = list; \
list = list->next; \
+ free (old->address); \
free (old); \
} \
***************
*** 321,324 ****
--- 338,342 ----
# undef alloca
# define alloca(size) (malloc (size))
+ # define freea(p) free (p)
#endif /* have alloca */
***************
*** 344,353 ****
# define DCIGETTEXT __dcigettext
#else
! # define DCIGETTEXT dcigettext__
#endif
/* Lock variable to protect the global data in the gettext implementation. */
#ifdef _LIBC
! __libc_rwlock_define_initialized (, _nl_state_lock)
#endif
--- 362,371 ----
# define DCIGETTEXT __dcigettext
#else
! # define DCIGETTEXT libintl_dcigettext
#endif
/* Lock variable to protect the global data in the gettext implementation. */
#ifdef _LIBC
! __libc_rwlock_define_initialized (, _nl_state_lock attribute_hidden)
#endif
***************
*** 446,449 ****
--- 464,468 ----
foundp = (struct known_translation_t **) tfind (search, &root, transcmp);
+ freea (search);
if (foundp != NULL && (*foundp)->counter == _nl_msg_cat_cntr)
{
***************
*** 679,682 ****
--- 698,702 ----
{
struct loaded_domain *domain;
+ nls_uint32 nstrings;
size_t act;
char *result;
***************
*** 691,696 ****
domain = (struct loaded_domain *) domain_file->data;
/* Locate the MSGID and its translation. */
! if (domain->hash_size > 2 && domain->hash_tab != NULL)
{
/* Use the hashing table. */
--- 711,718 ----
domain = (struct loaded_domain *) domain_file->data;
+ nstrings = domain->nstrings;
+
/* Locate the MSGID and its translation. */
! if (domain->hash_tab != NULL)
{
/* Use the hashing table. */
***************
*** 702,706 ****
while (1)
{
! nls_uint32 nstr = W (domain->must_swap, domain->hash_tab[idx]);
if (nstr == 0)
--- 724,729 ----
while (1)
{
! nls_uint32 nstr =
! W (domain->must_swap_hash_tab, domain->hash_tab[idx]);
if (nstr == 0)
***************
*** 708,721 ****
return NULL;
! /* Compare msgid with the original string at index nstr-1.
We compare the lengths with >=, not ==, because plural entries
are represented by strings with an embedded NUL. */
! if (W (domain->must_swap, domain->orig_tab[nstr - 1].length) >= len
! && (strcmp (msgid,
! domain->data + W (domain->must_swap,
! domain->orig_tab[nstr - 1].offset))
! == 0))
{
! act = nstr - 1;
goto found;
}
--- 731,751 ----
return NULL;
! nstr--;
!
! /* Compare msgid with the original string at index nstr.
We compare the lengths with >=, not ==, because plural entries
are represented by strings with an embedded NUL. */
! if (nstr < nstrings
! ? W (domain->must_swap, domain->orig_tab[nstr].length) >= len
! && (strcmp (msgid,
! domain->data + W (domain->must_swap,
! domain->orig_tab[nstr].offset))
! == 0)
! : domain->orig_sysdep_tab[nstr - nstrings].length > len
! && (strcmp (msgid,
! domain->orig_sysdep_tab[nstr - nstrings].pointer)
! == 0))
{
! act = nstr;
goto found;
}
***************
*** 735,739 ****
bottom = 0;
! top = domain->nstrings;
while (bottom < top)
{
--- 765,769 ----
bottom = 0;
! top = nstrings;
while (bottom < top)
{
***************
*** 758,764 ****
/* The translation was found at index ACT. If we have to convert the
string to use a different character set, this is the time. */
! result = ((char *) domain->data
! + W (domain->must_swap, domain->trans_tab[act].offset));
! resultlen = W (domain->must_swap, domain->trans_tab[act].length) + 1;
#if defined _LIBC || HAVE_ICONV
--- 788,802 ----
/* The translation was found at index ACT. If we have to convert the
string to use a different character set, this is the time. */
! if (act < nstrings)
! {
! result = (char *)
! (domain->data + W (domain->must_swap, domain->trans_tab[act].offset));
! resultlen = W (domain->must_swap, domain->trans_tab[act].length) + 1;
! }
! else
! {
! result = (char *) domain->trans_sysdep_tab[act - nstrings].pointer;
! resultlen = domain->trans_sysdep_tab[act - nstrings].length;
! }
#if defined _LIBC || HAVE_ICONV
***************
*** 793,798 ****
if (domain->conv_tab == NULL
! && ((domain->conv_tab = (char **) calloc (domain->nstrings,
! sizeof (char *)))
== NULL))
/* Mark that we didn't succeed allocating a table. */
--- 831,837 ----
if (domain->conv_tab == NULL
! && ((domain->conv_tab =
! (char **) calloc (nstrings + domain->n_sysdep_strings,
! sizeof (char *)))
== NULL))
/* Mark that we didn't succeed allocating a table. */
Index: dcngettext.c
===================================================================
RCS file: /cvsroot/adonthell/adonthell/intl/dcngettext.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** dcngettext.c 7 Apr 2002 09:51:28 -0000 1.2
--- dcngettext.c 22 Aug 2002 15:16:28 -0000 1.3
***************
*** 1,4 ****
/* Implementation of the dcngettext(3) function.
! Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
--- 1,4 ----
/* Implementation of the dcngettext(3) function.
! Copyright (C) 1995-1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
***************
*** 38,43 ****
# define DCIGETTEXT __dcigettext
#else
! # define DCNGETTEXT dcngettext__
! # define DCIGETTEXT dcigettext__
#endif
--- 38,43 ----
# define DCIGETTEXT __dcigettext
#else
! # define DCNGETTEXT libintl_dcngettext
! # define DCIGETTEXT libintl_dcigettext
#endif
***************
*** 57,60 ****
--- 57,61 ----
#ifdef _LIBC
/* Alias for function name in GNU C Library. */
+ INTDEF(__dcngettext)
weak_alias (__dcngettext, dcngettext);
#endif
Index: dgettext.c
===================================================================
RCS file: /cvsroot/adonthell/adonthell/intl/dgettext.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** dgettext.c 7 Apr 2002 09:51:28 -0000 1.2
--- dgettext.c 22 Aug 2002 15:16:28 -0000 1.3
***************
*** 1,4 ****
/* Implementation of the dgettext(3) function.
! Copyright (C) 1995-1997, 2000, 2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
--- 1,4 ----
/* Implementation of the dgettext(3) function.
! Copyright (C) 1995-1997, 2000, 2001, 2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
***************
*** 38,45 ****
#ifdef _LIBC
# define DGETTEXT __dgettext
! # define DCGETTEXT __dcgettext
#else
! # define DGETTEXT dgettext__
! # define DCGETTEXT dcgettext__
#endif
--- 38,45 ----
#ifdef _LIBC
# define DGETTEXT __dgettext
! # define DCGETTEXT INTUSE(__dcgettext)
#else
! # define DGETTEXT libintl_dgettext
! # define DCGETTEXT libintl_dcgettext
#endif
Index: dngettext.c
===================================================================
RCS file: /cvsroot/adonthell/adonthell/intl/dngettext.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** dngettext.c 7 Apr 2002 09:51:28 -0000 1.2
--- dngettext.c 22 Aug 2002 15:16:28 -0000 1.3
***************
*** 1,4 ****
/* Implementation of the dngettext(3) function.
! Copyright (C) 1995-1997, 2000, 2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
--- 1,4 ----
/* Implementation of the dngettext(3) function.
! Copyright (C) 1995-1997, 2000, 2001, 2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
***************
*** 38,45 ****
#ifdef _LIBC
# define DNGETTEXT __dngettext
! # define DCNGETTEXT __dcngettext
#else
! # define DNGETTEXT dngettext__
! # define DCNGETTEXT dcngettext__
#endif
--- 38,45 ----
#ifdef _LIBC
# define DNGETTEXT __dngettext
! # define DCNGETTEXT INTUSE(__dcngettext)
#else
! # define DNGETTEXT libintl_dngettext
! # define DCNGETTEXT libintl_dcngettext
#endif
Index: eval-plural.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/intl/eval-plural.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** eval-plural.h 15 Apr 2002 13:02:35 -0000 1.3
--- eval-plural.h 22 Aug 2002 15:16:28 -0000 1.4
***************
*** 69,74 ****
--- 69,82 ----
return leftarg * rightarg;
case divide:
+ #if !INTDIV0_RAISES_SIGFPE
+ if (rightarg == 0)
+ raise (SIGFPE);
+ #endif
return leftarg / rightarg;
case module:
+ #if !INTDIV0_RAISES_SIGFPE
+ if (rightarg == 0)
+ raise (SIGFPE);
+ #endif
return leftarg % rightarg;
case plus:
Index: gettext.c
===================================================================
RCS file: /cvsroot/adonthell/adonthell/intl/gettext.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** gettext.c 7 Apr 2002 09:51:28 -0000 1.2
--- gettext.c 22 Aug 2002 15:16:28 -0000 1.3
***************
*** 1,4 ****
/* Implementation of gettext(3) function.
! Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
--- 1,4 ----
/* Implementation of gettext(3) function.
! Copyright (C) 1995, 1997, 2000, 2001, 2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
***************
*** 43,50 ****
#ifdef _LIBC
# define GETTEXT __gettext
! # define DCGETTEXT __dcgettext
#else
! # define GETTEXT gettext__
! # define DCGETTEXT dcgettext__
#endif
--- 43,50 ----
#ifdef _LIBC
# define GETTEXT __gettext
! # define DCGETTEXT INTUSE(__dcgettext)
#else
! # define GETTEXT libintl_gettext
! # define DCGETTEXT libintl_dcgettext
#endif
Index: gettextP.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/intl/gettextP.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** gettextP.h 7 Apr 2002 09:51:28 -0000 1.2
--- gettextP.h 22 Aug 2002 15:16:28 -0000 1.3
***************
*** 1,4 ****
/* Header describing internals of libintl library.
! Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
Written by Ulrich Drepper <address@hidden>, 1995.
--- 1,4 ----
/* Header describing internals of libintl library.
! Copyright (C) 1995-1999, 2000-2002 Free Software Foundation, Inc.
Written by Ulrich Drepper <address@hidden>, 1995.
***************
*** 49,52 ****
--- 49,56 ----
#endif
+ #ifndef attribute_hidden
+ # define attribute_hidden
+ #endif
+
/* Tell the compiler when a conditional or integer expression is
almost always true or almost always false. */
***************
*** 73,88 ****
/* The representation of an opened message catalog. */
struct loaded_domain
{
const char *data;
int use_mmap;
size_t mmap_size;
int must_swap;
nls_uint32 nstrings;
! struct string_desc *orig_tab;
! struct string_desc *trans_tab;
nls_uint32 hash_size;
! nls_uint32 *hash_tab;
int codeset_cntr;
#ifdef _LIBC
--- 77,124 ----
+ /* In-memory representation of system dependent string. */
+ struct sysdep_string_desc
+ {
+ /* Length of addressed string, including the trailing NUL. */
+ size_t length;
+ /* Pointer to addressed string. */
+ const char *pointer;
+ };
+
/* The representation of an opened message catalog. */
struct loaded_domain
{
+ /* Pointer to memory containing the .mo file. */
const char *data;
+ /* 1 if the memory is mmap()ed, 0 if the memory is malloc()ed. */
int use_mmap;
+ /* Size of mmap()ed memory. */
size_t mmap_size;
+ /* 1 if the .mo file uses a different endianness than this machine. */
int must_swap;
+ /* Pointer to additional malloc()ed memory. */
+ void *malloced;
+
+ /* Number of static strings pairs. */
nls_uint32 nstrings;
! /* Pointer to descriptors of original strings in the file. */
! const struct string_desc *orig_tab;
! /* Pointer to descriptors of translated strings in the file. */
! const struct string_desc *trans_tab;
!
! /* Number of system dependent strings pairs. */
! nls_uint32 n_sysdep_strings;
! /* Pointer to descriptors of original sysdep strings. */
! const struct sysdep_string_desc *orig_sysdep_tab;
! /* Pointer to descriptors of translated sysdep strings. */
! const struct sysdep_string_desc *trans_sysdep_tab;
!
! /* Size of hash table. */
nls_uint32 hash_size;
! /* Pointer to hash table. */
! const nls_uint32 *hash_tab;
! /* 1 if the hash table uses a different endianness than this machine. */
! int must_swap_hash_tab;
!
int codeset_cntr;
#ifdef _LIBC
***************
*** 173,198 ****
const char *__codeset));
#else
! extern char *gettext__ PARAMS ((const char *__msgid));
! extern char *dgettext__ PARAMS ((const char *__domainname,
! const char *__msgid));
! extern char *dcgettext__ PARAMS ((const char *__domainname,
! const char *__msgid, int __category));
! extern char *ngettext__ PARAMS ((const char *__msgid1, const char *__msgid2,
! unsigned long int __n));
! extern char *dngettext__ PARAMS ((const char *__domainname,
! const char *__msgid1, const char *__msgid2,
! unsigned long int __n));
! extern char *dcngettext__ PARAMS ((const char *__domainname,
! const char *__msgid1, const char *__msgid2,
! unsigned long int __n, int __category));
! extern char *dcigettext__ PARAMS ((const char *__domainname,
! const char *__msgid1, const char *__msgid2,
! int __plural, unsigned long int __n,
! int __category));
! extern char *textdomain__ PARAMS ((const char *__domainname));
! extern char *bindtextdomain__ PARAMS ((const char *__domainname,
! const char *__dirname));
! extern char *bind_textdomain_codeset__ PARAMS ((const char *__domainname,
! const char *__codeset));
#endif
--- 209,239 ----
const char *__codeset));
#else
! extern char *libintl_gettext PARAMS ((const char *__msgid));
! extern char *libintl_dgettext PARAMS ((const char *__domainname,
! const char *__msgid));
! extern char *libintl_dcgettext PARAMS ((const char *__domainname,
! const char *__msgid, int __category));
! extern char *libintl_ngettext PARAMS ((const char *__msgid1,
! const char *__msgid2,
! unsigned long int __n));
! extern char *libintl_dngettext PARAMS ((const char *__domainname,
! const char *__msgid1,
! const char *__msgid2,
! unsigned long int __n));
! extern char *libintl_dcngettext PARAMS ((const char *__domainname,
! const char *__msgid1,
! const char *__msgid2,
! unsigned long int __n,
! int __category));
! extern char *libintl_dcigettext PARAMS ((const char *__domainname,
! const char *__msgid1,
! const char *__msgid2,
! int __plural, unsigned long int __n,
! int __category));
! extern char *libintl_textdomain PARAMS ((const char *__domainname));
! extern char *libintl_bindtextdomain PARAMS ((const char *__domainname,
! const char *__dirname));
! extern char *libintl_bind_textdomain_codeset PARAMS ((const char
*__domainname,
! const char *__codeset));
#endif
Index: gmo.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/intl/gmo.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** gmo.h 7 Apr 2002 09:51:28 -0000 1.2
--- gmo.h 22 Aug 2002 15:16:28 -0000 1.3
***************
*** 1,4 ****
/* Description of GNU message catalog format: general file layout.
! Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
--- 1,4 ----
/* Description of GNU message catalog format: general file layout.
! Copyright (C) 1995, 1997, 2000-2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
***************
*** 76,98 ****
/* The revision number of the file format. */
nls_uint32 revision;
/* The number of strings pairs. */
nls_uint32 nstrings;
/* Offset of table with start offsets of original strings. */
nls_uint32 orig_tab_offset;
! /* Offset of table with start offsets of translation strings. */
nls_uint32 trans_tab_offset;
! /* Size of hashing table. */
nls_uint32 hash_tab_size;
! /* Offset of first hashing entry. */
nls_uint32 hash_tab_offset;
};
struct string_desc
{
! /* Length of addressed string. */
nls_uint32 length;
/* Offset of string in file. */
nls_uint32 offset;
};
/* @@ begin of epilog @@ */
--- 76,146 ----
/* The revision number of the file format. */
nls_uint32 revision;
+
+ /* The following are only used in .mo files with major revision 0. */
+
/* The number of strings pairs. */
nls_uint32 nstrings;
/* Offset of table with start offsets of original strings. */
nls_uint32 orig_tab_offset;
! /* Offset of table with start offsets of translated strings. */
nls_uint32 trans_tab_offset;
! /* Size of hash table. */
nls_uint32 hash_tab_size;
! /* Offset of first hash table entry. */
nls_uint32 hash_tab_offset;
+
+ /* The following are only used in .mo files with minor revision >= 1. */
+
+ /* The number of system dependent segments. */
+ nls_uint32 n_sysdep_segments;
+ /* Offset of table describing system dependent segments. */
+ nls_uint32 sysdep_segments_offset;
+ /* The number of system dependent strings pairs. */
+ nls_uint32 n_sysdep_strings;
+ /* Offset of table with start offsets of original sysdep strings. */
+ nls_uint32 orig_sysdep_tab_offset;
+ /* Offset of table with start offsets of translated sysdep strings. */
+ nls_uint32 trans_sysdep_tab_offset;
};
+ /* Descriptor for static string contained in the binary .mo file. */
struct string_desc
{
! /* Length of addressed string, not including the trailing NUL. */
! nls_uint32 length;
! /* Offset of string in file. */
! nls_uint32 offset;
! };
!
! /* The following are only used in .mo files with minor revision >= 1. */
!
! /* Descriptor for system dependent string segment. */
! struct sysdep_segment
! {
! /* Length of addressed string, including the trailing NUL. */
nls_uint32 length;
/* Offset of string in file. */
nls_uint32 offset;
};
+
+ /* Descriptor for system dependent string. */
+ struct sysdep_string
+ {
+ /* Offset of static string segments in file. */
+ nls_uint32 offset;
+ /* Alternating sequence of static and system dependent segments.
+ The last segment is a static segment, including the trailing NUL. */
+ struct segment_pair
+ {
+ /* Size of static segment. */
+ nls_uint32 segsize;
+ /* Reference to system dependent string segment, or ~0 at the end. */
+ nls_uint32 sysdepref;
+ } segments[1];
+ };
+
+ /* Marker for the end of the segments[] array. This has the value 0xFFFFFFFF,
+ regardless whether 'int' is 16 bit, 32 bit, or 64 bit. */
+ #define SEGMENTS_END ((nls_uint32) ~0)
/* @@ begin of epilog @@ */
Index: intl-compat.c
===================================================================
RCS file: /cvsroot/adonthell/adonthell/intl/intl-compat.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** intl-compat.c 7 Apr 2002 09:51:28 -0000 1.2
--- intl-compat.c 22 Aug 2002 15:16:28 -0000 1.3
***************
*** 1,5 ****
/* intl-compat.c - Stub functions to call gettext functions from GNU gettext
Library.
! Copyright (C) 1995, 2000, 2001 Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
--- 1,5 ----
/* intl-compat.c - Stub functions to call gettext functions from GNU gettext
Library.
! Copyright (C) 1995, 2000-2002 Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
***************
*** 22,25 ****
--- 22,26 ----
#endif
+ #define _INTL_REDIRECT_MACROS
#include "libgnuintl.h"
#include "gettextP.h"
***************
*** 27,71 ****
/* @@ end of prolog @@ */
! /* This file redirects the gettext functions (without prefix or suffix) to
! those defined in the included GNU gettext library (with "__" suffix).
! It is compiled into libintl when the included GNU gettext library is
! configured --with-included-gettext.
!
! This redirection works also in the case that the system C library or
! the system libintl library contain gettext/textdomain/... functions.
! If it didn't, we would need to add preprocessor level redirections to
! libgnuintl.h of the following form:
!
! # define gettext gettext__
! # define dgettext dgettext__
! # define dcgettext dcgettext__
! # define ngettext ngettext__
! # define dngettext dngettext__
! # define dcngettext dcngettext__
! # define textdomain textdomain__
! # define bindtextdomain bindtextdomain__
! # define bind_textdomain_codeset bind_textdomain_codeset__
!
! How does this redirection work? There are two cases.
! A. When libintl.a is linked into an executable, it works because
! functions defined in the executable always override functions in
! the shared libraries.
! B. When libintl.so is used, it works because
! 1. those systems defining gettext/textdomain/... in the C library
! (namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer) are
! ELF systems and define these symbols as weak, thus explicitly
! letting other shared libraries override it.
! 2. those systems defining gettext/textdomain/... in a standalone
! libintl.so library (namely, Solaris 2.3 and newer) have this
! shared library in /usr/lib, and the linker will search /usr/lib
! *after* the directory where the GNU gettext library is installed.
!
! A third case, namely when libintl.a is linked into a shared library
! whose name is not libintl.so, is not supported. In this case, on
! Solaris, when -lintl precedes the linker option for the shared library
! containing GNU gettext, the system's gettext would indeed override
! the GNU gettext. Anyone doing this kind of stuff must be clever enough
! to 1. compile libintl.a with -fPIC, 2. remove -lintl from his linker
! command line. */
--- 28,36 ----
/* @@ end of prolog @@ */
! /* This file redirects the gettext functions (without prefix) to those
! defined in the included GNU libintl library (with "libintl_" prefix).
! It is compiled into libintl in order to make the AM_GNU_GETTEXT test
! of gettext <= 0.11.2 work with the libintl library >= 0.11.3 which
! has the redirections primarily in the <libintl.h> include file. */
***************
*** 85,89 ****
const char *msgid;
{
! return gettext__ (msgid);
}
--- 50,54 ----
const char *msgid;
{
! return libintl_gettext (msgid);
}
***************
*** 94,98 ****
const char *msgid;
{
! return dgettext__ (domainname, msgid);
}
--- 59,63 ----
const char *msgid;
{
! return libintl_dgettext (domainname, msgid);
}
***************
*** 104,108 ****
int category;
{
! return dcgettext__ (domainname, msgid, category);
}
--- 69,73 ----
int category;
{
! return libintl_dcgettext (domainname, msgid, category);
}
***************
*** 114,118 ****
unsigned long int n;
{
! return ngettext__ (msgid1, msgid2, n);
}
--- 79,83 ----
unsigned long int n;
{
! return libintl_ngettext (msgid1, msgid2, n);
}
***************
*** 125,129 ****
unsigned long int n;
{
! return dngettext__ (domainname, msgid1, msgid2, n);
}
--- 90,94 ----
unsigned long int n;
{
! return libintl_dngettext (domainname, msgid1, msgid2, n);
}
***************
*** 137,141 ****
int category;
{
! return dcngettext__ (domainname, msgid1, msgid2, n, category);
}
--- 102,106 ----
int category;
{
! return libintl_dcngettext (domainname, msgid1, msgid2, n, category);
}
***************
*** 145,149 ****
const char *domainname;
{
! return textdomain__ (domainname);
}
--- 110,114 ----
const char *domainname;
{
! return libintl_textdomain (domainname);
}
***************
*** 154,158 ****
const char *dirname;
{
! return bindtextdomain__ (domainname, dirname);
}
--- 119,123 ----
const char *dirname;
{
! return libintl_bindtextdomain (domainname, dirname);
}
***************
*** 163,166 ****
const char *codeset;
{
! return bind_textdomain_codeset__ (domainname, codeset);
}
--- 128,131 ----
const char *codeset;
{
! return libintl_bind_textdomain_codeset (domainname, codeset);
}
Index: l10nflist.c
===================================================================
RCS file: /cvsroot/adonthell/adonthell/intl/l10nflist.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** l10nflist.c 7 Apr 2002 09:51:28 -0000 1.2
--- l10nflist.c 22 Aug 2002 15:16:28 -0000 1.3
***************
*** 1,3 ****
! /* Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
Contributed by Ulrich Drepper <address@hidden>, 1995.
--- 1,3 ----
! /* Copyright (C) 1995-1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Contributed by Ulrich Drepper <address@hidden>, 1995.
***************
*** 63,66 ****
--- 63,84 ----
#endif
+ /* Pathname support.
+ ISSLASH(C) tests whether C is a directory separator character.
+ IS_ABSOLUTE_PATH(P) tests whether P is an absolute path. If it is not,
+ it may be concatenated to a directory pathname.
+ */
+ #if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined
__DJGPP__
+ /* Win32, OS/2, DOS */
+ # define ISSLASH(C) ((C) == '/' || (C) == '\\')
+ # define HAS_DEVICE(P) \
+ ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
+ && (P)[1] == ':')
+ # define IS_ABSOLUTE_PATH(P) (ISSLASH ((P)[0]) || HAS_DEVICE (P))
+ #else
+ /* Unix */
+ # define ISSLASH(C) ((C) == '/')
+ # define IS_ABSOLUTE_PATH(P) ISSLASH ((P)[0])
+ #endif
+
/* Define function which are usually not available. */
***************
*** 86,89 ****
--- 104,111 ----
# undef __argz_count
# define __argz_count(argz, len) argz_count__ (argz, len)
+ #else
+ # ifdef _LIBC
+ # define __argz_count(argz, len) INTUSE(__argz_count) (argz, len)
+ # endif
#endif /* !_LIBC && !HAVE___ARGZ_COUNT */
***************
*** 110,113 ****
--- 132,140 ----
# undef __argz_stringify
# define __argz_stringify(argz, len, sep) argz_stringify__ (argz, len, sep)
+ #else
+ # ifdef _LIBC
+ # define __argz_stringify(argz, len, sep) \
+ INTUSE(__argz_stringify) (argz, len, sep)
+ # endif
#endif /* !_LIBC && !HAVE___ARGZ_STRINGIFY */
***************
*** 177,186 ****
{
char *abs_filename;
! struct loaded_l10nfile *last = NULL;
struct loaded_l10nfile *retval;
char *cp;
size_t entries;
int cnt;
/* Allocate room for the full file name. */
abs_filename = (char *) malloc (dirlist_len
--- 204,219 ----
{
char *abs_filename;
! struct loaded_l10nfile **lastp;
struct loaded_l10nfile *retval;
char *cp;
+ size_t dirlist_count;
size_t entries;
int cnt;
+ /* If LANGUAGE contains an absolute directory specification, we ignore
+ DIRLIST. */
+ if (IS_ABSOLUTE_PATH (language))
+ dirlist_len = 0;
+
/* Allocate room for the full file name. */
abs_filename = (char *) malloc (dirlist_len
***************
*** 200,204 ****
|| (mask & CEN_REVISION) != 0)
? (1 + ((mask & CEN_SPONSOR) != 0
! ? strlen (sponsor) + 1 : 0)
+ ((mask & CEN_REVISION) != 0
? strlen (revision) + 1 : 0)) : 0)
--- 233,237 ----
|| (mask & CEN_REVISION) != 0)
? (1 + ((mask & CEN_SPONSOR) != 0
! ? strlen (sponsor) : 0)
+ ((mask & CEN_REVISION) != 0
? strlen (revision) + 1 : 0)) : 0)
***************
*** 208,219 ****
return NULL;
- retval = NULL;
- last = NULL;
-
/* Construct file name. */
! memcpy (abs_filename, dirlist, dirlist_len);
! __argz_stringify (abs_filename, dirlist_len, PATH_SEPARATOR);
! cp = abs_filename + (dirlist_len - 1);
! *cp++ = '/';
cp = stpcpy (cp, language);
--- 241,254 ----
return NULL;
/* Construct file name. */
! cp = abs_filename;
! if (dirlist_len > 0)
! {
! memcpy (cp, dirlist, dirlist_len);
! __argz_stringify (cp, dirlist_len, PATH_SEPARATOR);
! cp += dirlist_len;
! cp[-1] = '/';
! }
!
cp = stpcpy (cp, language);
***************
*** 262,266 ****
/* Look in list of already loaded domains whether it is already
available. */
! last = NULL;
for (retval = *l10nfile_list; retval != NULL; retval = retval->next)
if (retval->filename != NULL)
--- 297,301 ----
/* Look in list of already loaded domains whether it is already
available. */
! lastp = l10nfile_list;
for (retval = *l10nfile_list; retval != NULL; retval = retval->next)
if (retval->filename != NULL)
***************
*** 277,281 ****
}
! last = retval;
}
--- 312,316 ----
}
! lastp = &retval->next;
}
***************
*** 286,331 ****
}
! retval = (struct loaded_l10nfile *)
! malloc (sizeof (*retval) + (__argz_count (dirlist, dirlist_len)
! * (1 << pop (mask))
! * sizeof (struct loaded_l10nfile *)));
if (retval == NULL)
return NULL;
retval->filename = abs_filename;
! retval->decided = (__argz_count (dirlist, dirlist_len) != 1
|| ((mask & XPG_CODESET) != 0
&& (mask & XPG_NORM_CODESET) != 0));
retval->data = NULL;
! if (last == NULL)
! {
! retval->next = *l10nfile_list;
! *l10nfile_list = retval;
! }
! else
! {
! retval->next = last->next;
! last->next = retval;
! }
entries = 0;
! /* If the DIRLIST is a real list the RETVAL entry corresponds not to
! a real file. So we have to use the DIRLIST separation mechanism
! of the inner loop. */
! cnt = __argz_count (dirlist, dirlist_len) == 1 ? mask - 1 : mask;
! for (; cnt >= 0; --cnt)
if ((cnt & ~mask) == 0
&& ((cnt & CEN_SPECIFIC) == 0 || (cnt & XPG_SPECIFIC) == 0)
&& ((cnt & XPG_CODESET) == 0 || (cnt & XPG_NORM_CODESET) == 0))
{
! /* Iterate over all elements of the DIRLIST. */
! char *dir = NULL;
! while ((dir = __argz_next ((char *) dirlist, dirlist_len, dir))
! != NULL)
retval->successor[entries++]
! = _nl_make_l10nflist (l10nfile_list, dir, strlen (dir) + 1, cnt,
! language, territory, codeset,
normalized_codeset, modifier, special,
sponsor, revision, filename, 1);
--- 321,384 ----
}
! dirlist_count = (dirlist_len > 0 ? __argz_count (dirlist, dirlist_len) : 1);
!
! /* Allocate a new loaded_l10nfile. */
! retval =
! (struct loaded_l10nfile *)
! malloc (sizeof (*retval)
! + (((dirlist_count << pop (mask)) + (dirlist_count > 1 ? 1 : 0))
! * sizeof (struct loaded_l10nfile *)));
if (retval == NULL)
return NULL;
retval->filename = abs_filename;
!
! /* We set retval->data to NULL here; it is filled in later.
! Setting retval->decided to 1 here means that retval does not
! correspond to a real file (dirlist_count > 1) or is not worth
! looking up (if an unnormalized codeset was specified). */
! retval->decided = (dirlist_count > 1
|| ((mask & XPG_CODESET) != 0
&& (mask & XPG_NORM_CODESET) != 0));
retval->data = NULL;
! retval->next = *lastp;
! *lastp = retval;
entries = 0;
! /* Recurse to fill the inheritance list of RETVAL.
! If the DIRLIST is a real list (i.e. DIRLIST_COUNT > 1), the RETVAL
! entry does not correspond to a real file; retval->filename contains
! colons. In this case we loop across all elements of DIRLIST and
! across all bit patterns dominated by MASK.
! If the DIRLIST is a single directory or entirely redundant (i.e.
! DIRLIST_COUNT == 1), we loop across all bit patterns dominated by
! MASK, excluding MASK itself.
! In either case, we loop down from MASK to 0. This has the effect
! that the extra bits in the locale name are dropped in this order:
! first the modifier, then the territory, then the codeset, then the
! normalized_codeset. */
! for (cnt = dirlist_count > 1 ? mask : mask - 1; cnt >= 0; --cnt)
if ((cnt & ~mask) == 0
&& ((cnt & CEN_SPECIFIC) == 0 || (cnt & XPG_SPECIFIC) == 0)
&& ((cnt & XPG_CODESET) == 0 || (cnt & XPG_NORM_CODESET) == 0))
{
! if (dirlist_count > 1)
! {
! /* Iterate over all elements of the DIRLIST. */
! char *dir = NULL;
! while ((dir = __argz_next ((char *) dirlist, dirlist_len, dir))
! != NULL)
! retval->successor[entries++]
! = _nl_make_l10nflist (l10nfile_list, dir, strlen (dir) + 1,
! cnt, language, territory, codeset,
! normalized_codeset, modifier, special,
! sponsor, revision, filename, 1);
! }
! else
retval->successor[entries++]
! = _nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len,
! cnt, language, territory, codeset,
normalized_codeset, modifier, special,
sponsor, revision, filename, 1);
Index: libgnuintl.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/intl/libgnuintl.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** libgnuintl.h 7 Apr 2002 09:51:28 -0000 1.2
--- libgnuintl.h 22 Aug 2002 15:16:28 -0000 1.3
***************
*** 1,4 ****
/* Message catalogs for internationalization.
! Copyright (C) 1995-1997, 2000, 2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
--- 1,4 ----
/* Message catalogs for internationalization.
! Copyright (C) 1995-1997, 2000-2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
***************
*** 25,32 ****
gettext() and dgettext(). It is specified in POSIX, but not in ANSI C.
On systems that don't define it, use an arbitrary value instead.
! On Solaris, <locale.h> defines __LOCALE_H then includes <libintl.h> (i.e.
! this file!) and then only defines LC_MESSAGES. To avoid a redefinition
! warning, don't define LC_MESSAGES in this case. */
! #if !defined LC_MESSAGES && !defined __LOCALE_H
# define LC_MESSAGES 1729
#endif
--- 25,33 ----
gettext() and dgettext(). It is specified in POSIX, but not in ANSI C.
On systems that don't define it, use an arbitrary value instead.
! On Solaris, <locale.h> defines __LOCALE_H (or _LOCALE_H in Solaris 2.5)
! then includes <libintl.h> (i.e. this file!) and then only defines
! LC_MESSAGES. To avoid a redefinition warning, don't define LC_MESSAGES
! in this case. */
! #if !defined LC_MESSAGES && !(defined __LOCALE_H || (defined _LOCALE_H &&
defined __sun))
# define LC_MESSAGES 1729
#endif
***************
*** 36,44 ****
#define __USE_GNU_GETTEXT 1
/* Resolve a platform specific conflict on DJGPP. GNU gettext takes
precedence over _conio_gettext. */
#ifdef __DJGPP__
# undef gettext
- # define gettext gettext
#endif
--- 37,49 ----
#define __USE_GNU_GETTEXT 1
+ /* Provide information about the supported file formats. Returns the
+ maximum minor revision number supported for a given major revision. */
+ #define __GNU_GETTEXT_SUPPORTED_REVISION(major) \
+ ((major) == 0 ? 1 : -1)
+
/* Resolve a platform specific conflict on DJGPP. GNU gettext takes
precedence over _conio_gettext. */
#ifdef __DJGPP__
# undef gettext
#endif
***************
*** 57,97 ****
#endif
/* Look up MSGID in the current default message catalog for the current
LC_MESSAGES locale. If not found, returns MSGID itself (the default
text). */
! extern char *gettext _INTL_PARAMS ((const char *__msgid));
/* Look up MSGID in the DOMAINNAME message catalog for the current
LC_MESSAGES locale. */
extern char *dgettext _INTL_PARAMS ((const char *__domainname,
! const char *__msgid));
/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
locale. */
extern char *dcgettext _INTL_PARAMS ((const char *__domainname,
const char *__msgid,
! int __category));
/* Similar to `gettext' but select the plural form corresponding to the
number N. */
extern char *ngettext _INTL_PARAMS ((const char *__msgid1,
const char *__msgid2,
! unsigned long int __n));
/* Similar to `dgettext' but select the plural form corresponding to the
number N. */
extern char *dngettext _INTL_PARAMS ((const char *__domainname,
const char *__msgid1,
const char *__msgid2,
! unsigned long int __n));
/* Similar to `dcgettext' but select the plural form corresponding to the
number N. */
extern char *dcngettext _INTL_PARAMS ((const char *__domainname,
const char *__msgid1,
const char *__msgid2,
unsigned long int __n,
! int __category));
--- 62,235 ----
#endif
+
+ /* We redirect the functions to those prefixed with "libintl_". This is
+ necessary, because some systems define gettext/textdomain/... in the C
+ library (namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer).
+ If we used the unprefixed names, there would be cases where the
+ definition in the C library would override the one in the libintl.so
+ shared library. Recall that on ELF systems, the symbols are looked
+ up in the following order:
+ 1. in the executable,
+ 2. in the shared libraries specified on the link command line, in order,
+ 3. in the dependencies of the shared libraries specified on the link
+ command line,
+ 4. in the dlopen()ed shared libraries, in the order in which they were
+ dlopen()ed.
+ The definition in the C library would override the one in libintl.so if
+ either
+ * -lc is given on the link command line and -lintl isn't, or
+ * -lc is given on the link command line before -lintl, or
+ * libintl.so is a dependency of a dlopen()ed shared library but not
+ linked to the executable at link time.
+ Since Solaris gettext() behaves differently than GNU gettext(), this
+ would be unacceptable.
+
+ The redirection happens by default through macros in C, so that &gettext
+ is independent of the compilation unit, but through inline functions in
+ C++, in order not to interfere with the name mangling of class fields or
+ class methods called 'gettext'. */
+
+ /* The user can define _INTL_REDIRECT_INLINE or _INTL_REDIRECT_MACROS.
+ If he doesn't, we choose the method. A third possible method is
+ _INTL_REDIRECT_ASM, supported only by GCC. */
+ #if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS)
+ # if __GNUC__ >= 2 && (defined __STDC__ || defined __cplusplus)
+ # define _INTL_REDIRECT_ASM
+ # else
+ # ifdef __cplusplus
+ # define _INTL_REDIRECT_INLINE
+ # else
+ # define _INTL_REDIRECT_MACROS
+ # endif
+ # endif
+ #endif
+ /* Auxiliary macros. */
+ #ifdef _INTL_REDIRECT_ASM
+ # define _INTL_ASM(cname) __asm__ (_INTL_ASMNAME (__USER_LABEL_PREFIX__,
#cname))
+ # define _INTL_ASMNAME(prefix,cnamestring) _INTL_STRINGIFY (prefix)
cnamestring
+ # define _INTL_STRINGIFY(prefix) #prefix
+ #else
+ # define _INTL_ASM(cname)
+ #endif
+
/* Look up MSGID in the current default message catalog for the current
LC_MESSAGES locale. If not found, returns MSGID itself (the default
text). */
! #ifdef _INTL_REDIRECT_INLINE
! extern char *libintl_gettext (const char *__msgid);
! static inline char *gettext (const char *__msgid)
! {
! return libintl_gettext (__msgid);
! }
! #else
! #ifdef _INTL_REDIRECT_MACROS
! # define gettext libintl_gettext
! #endif
! extern char *gettext _INTL_PARAMS ((const char *__msgid))
! _INTL_ASM (libintl_gettext);
! #endif
/* Look up MSGID in the DOMAINNAME message catalog for the current
LC_MESSAGES locale. */
+ #ifdef _INTL_REDIRECT_INLINE
+ extern char *libintl_dgettext (const char *__domainname, const char *__msgid);
+ static inline char *dgettext (const char *__domainname, const char *__msgid)
+ {
+ return libintl_dgettext (__domainname, __msgid);
+ }
+ #else
+ #ifdef _INTL_REDIRECT_MACROS
+ # define dgettext libintl_dgettext
+ #endif
extern char *dgettext _INTL_PARAMS ((const char *__domainname,
! const char *__msgid))
! _INTL_ASM (libintl_dgettext);
! #endif
/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
locale. */
+ #ifdef _INTL_REDIRECT_INLINE
+ extern char *libintl_dcgettext (const char *__domainname, const char *__msgid,
+ int __category);
+ static inline char *dcgettext (const char *__domainname, const char *__msgid,
+ int __category)
+ {
+ return libintl_dcgettext (__domainname, __msgid, __category);
+ }
+ #else
+ #ifdef _INTL_REDIRECT_MACROS
+ # define dcgettext libintl_dcgettext
+ #endif
extern char *dcgettext _INTL_PARAMS ((const char *__domainname,
const char *__msgid,
! int __category))
! _INTL_ASM (libintl_dcgettext);
! #endif
/* Similar to `gettext' but select the plural form corresponding to the
number N. */
+ #ifdef _INTL_REDIRECT_INLINE
+ extern char *libintl_ngettext (const char *__msgid1, const char *__msgid2,
+ unsigned long int __n);
+ static inline char *ngettext (const char *__msgid1, const char *__msgid2,
+ unsigned long int __n)
+ {
+ return libintl_ngettext (__msgid1, __msgid2, __n);
+ }
+ #else
+ #ifdef _INTL_REDIRECT_MACROS
+ # define ngettext libintl_ngettext
+ #endif
extern char *ngettext _INTL_PARAMS ((const char *__msgid1,
const char *__msgid2,
! unsigned long int __n))
! _INTL_ASM (libintl_ngettext);
! #endif
/* Similar to `dgettext' but select the plural form corresponding to the
number N. */
+ #ifdef _INTL_REDIRECT_INLINE
+ extern char *libintl_dngettext (const char *__domainname, const char
*__msgid1,
+ const char *__msgid2, unsigned long int __n);
+ static inline char *dngettext (const char *__domainname, const char *__msgid1,
+ const char *__msgid2, unsigned long int __n)
+ {
+ return libintl_dngettext (__domainname, __msgid1, __msgid2, __n);
+ }
+ #else
+ #ifdef _INTL_REDIRECT_MACROS
+ # define dngettext libintl_dngettext
+ #endif
extern char *dngettext _INTL_PARAMS ((const char *__domainname,
const char *__msgid1,
const char *__msgid2,
! unsigned long int __n))
! _INTL_ASM (libintl_dngettext);
! #endif
/* Similar to `dcgettext' but select the plural form corresponding to the
number N. */
+ #ifdef _INTL_REDIRECT_INLINE
+ extern char *libintl_dcngettext (const char *__domainname,
+ const char *__msgid1, const char *__msgid2,
+ unsigned long int __n, int __category);
+ static inline char *dcngettext (const char *__domainname,
+ const char *__msgid1, const char *__msgid2,
+ unsigned long int __n, int __category)
+ {
+ return libintl_dcngettext (__domainname, __msgid1, __msgid2, __n,
__category);
+ }
+ #else
+ #ifdef _INTL_REDIRECT_MACROS
+ # define dcngettext libintl_dcngettext
+ #endif
extern char *dcngettext _INTL_PARAMS ((const char *__domainname,
const char *__msgid1,
const char *__msgid2,
unsigned long int __n,
! int __category))
! _INTL_ASM (libintl_dcngettext);
! #endif
***************
*** 99,132 ****
If DOMAINNAME is null, return the current default.
If DOMAINNAME is "", reset to the default of "messages". */
! extern char *textdomain _INTL_PARAMS ((const char *__domainname));
/* Specify that the DOMAINNAME message catalog will be found
in DIRNAME rather than in the system locale data base. */
extern char *bindtextdomain _INTL_PARAMS ((const char *__domainname,
! const char *__dirname));
/* Specify the character encoding in which the messages from the
DOMAINNAME message catalog will be returned. */
extern char *bind_textdomain_codeset _INTL_PARAMS ((const char *__domainname,
! const char *__codeset));
!
!
! /* Optimized version of the functions above. */
! #if defined __OPTIMIZED
! /* These are macros, but could also be inline functions. */
!
! # define gettext(msgid)
\
! dgettext (NULL, msgid)
!
! # define dgettext(domainname, msgid) \
! dcgettext (domainname, msgid, LC_MESSAGES)
!
! # define ngettext(msgid1, msgid2, n) \
! dngettext (NULL, msgid1, msgid2, n)
!
! # define dngettext(domainname, msgid1, msgid2, n) \
! dcngettext (domainname, msgid1, msgid2, n, LC_MESSAGES)
!
! #endif /* Optimizing. */
--- 237,291 ----
If DOMAINNAME is null, return the current default.
If DOMAINNAME is "", reset to the default of "messages". */
! #ifdef _INTL_REDIRECT_INLINE
! extern char *libintl_textdomain (const char *__domainname);
! static inline char *textdomain (const char *__domainname)
! {
! return libintl_textdomain (__domainname);
! }
! #else
! #ifdef _INTL_REDIRECT_MACROS
! # define textdomain libintl_textdomain
! #endif
! extern char *textdomain _INTL_PARAMS ((const char *__domainname))
! _INTL_ASM (libintl_textdomain);
! #endif
/* Specify that the DOMAINNAME message catalog will be found
in DIRNAME rather than in the system locale data base. */
+ #ifdef _INTL_REDIRECT_INLINE
+ extern char *libintl_bindtextdomain (const char *__domainname,
+ const char *__dirname);
+ static inline char *bindtextdomain (const char *__domainname,
+ const char *__dirname)
+ {
+ return libintl_bindtextdomain (__domainname, __dirname);
+ }
+ #else
+ #ifdef _INTL_REDIRECT_MACROS
+ # define bindtextdomain libintl_bindtextdomain
+ #endif
extern char *bindtextdomain _INTL_PARAMS ((const char *__domainname,
! const char *__dirname))
! _INTL_ASM (libintl_bindtextdomain);
! #endif
/* Specify the character encoding in which the messages from the
DOMAINNAME message catalog will be returned. */
+ #ifdef _INTL_REDIRECT_INLINE
+ extern char *libintl_bind_textdomain_codeset (const char *__domainname,
+ const char *__codeset);
+ static inline char *bind_textdomain_codeset (const char *__domainname,
+ const char *__codeset)
+ {
+ return libintl_bind_textdomain_codeset (__domainname, __codeset);
+ }
+ #else
+ #ifdef _INTL_REDIRECT_MACROS
+ # define bind_textdomain_codeset libintl_bind_textdomain_codeset
+ #endif
extern char *bind_textdomain_codeset _INTL_PARAMS ((const char *__domainname,
! const char *__codeset))
! _INTL_ASM (libintl_bind_textdomain_codeset);
! #endif
Index: loadinfo.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/intl/loadinfo.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** loadinfo.h 7 Apr 2002 09:51:28 -0000 1.2
--- loadinfo.h 22 Aug 2002 15:16:28 -0000 1.3
***************
*** 1,3 ****
! /* Copyright (C) 1996-1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <address@hidden>, 1996.
--- 1,3 ----
! /* Copyright (C) 1996-1999, 2000-2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <address@hidden>, 1996.
***************
*** 93,96 ****
--- 93,110 ----
size_t name_len));
+ /* Lookup a locale dependent file.
+ *L10NFILE_LIST denotes a pool of lookup results of locale dependent
+ files of the same kind, sorted in decreasing order of ->filename.
+ DIRLIST and DIRLIST_LEN are an argz list of directories in which to
+ look, containing at least one directory (i.e. DIRLIST_LEN > 0).
+ MASK, LANGUAGE, TERRITORY, CODESET, NORMALIZED_CODESET, MODIFIER,
+ SPECIAL, SPONSOR, REVISION are the pieces of the locale name, as
+ produced by _nl_explode_name(). FILENAME is the filename suffix.
+ The return value is the lookup result, either found in *L10NFILE_LIST,
+ or - if DO_ALLOCATE is nonzero - freshly allocated, or possibly NULL.
+ If the return value is non-NULL, it is added to *L10NFILE_LIST, and
+ its ->next field denotes the chaining inside *L10NFILE_LIST, and
+ furthermore its ->successor[] field contains a list of other lookup
+ results from which this lookup result inherits. */
extern struct loaded_l10nfile *
_nl_make_l10nflist PARAMS ((struct loaded_l10nfile **l10nfile_list,
***************
*** 103,111 ****
const char *filename, int do_allocate));
!
extern const char *_nl_expand_alias PARAMS ((const char *name));
! /* normalized_codeset is dynamically allocated and has to be freed by
! the caller. */
extern int _nl_explode_name PARAMS ((char *name, const char **language,
const char **modifier,
--- 117,143 ----
const char *filename, int do_allocate));
! /* Lookup the real locale name for a locale alias NAME, or NULL if
! NAME is not a locale alias (but possibly a real locale name).
! The return value is statically allocated and must not be freed. */
extern const char *_nl_expand_alias PARAMS ((const char *name));
! /* Split a locale name NAME into its pieces: language, modifier,
! territory, codeset, special, sponsor, revision.
! NAME gets destructively modified: NUL bytes are inserted here and
! there. *LANGUAGE gets assigned NAME. Each of *MODIFIER, *TERRITORY,
! *CODESET, *SPECIAL, *SPONSOR, *REVISION gets assigned either a
! pointer into the old NAME string, or NULL. *NORMALIZED_CODESET
! gets assigned the expanded *CODESET, if it is different from *CODESET;
! this one is dynamically allocated and has to be freed by the caller.
! The return value is a bitmask, where each bit corresponds to one
! filled-in value:
! XPG_MODIFIER, CEN_AUDIENCE for *MODIFIER,
! TERRITORY for *TERRITORY,
! XPG_CODESET for *CODESET,
! XPG_NORM_CODESET for *NORMALIZED_CODESET,
! CEN_SPECIAL for *SPECIAL,
! CEN_SPONSOR for *SPONSOR,
! CEN_REVISION for *REVISION.
! */
extern int _nl_explode_name PARAMS ((char *name, const char **language,
const char **modifier,
***************
*** 117,120 ****
--- 149,155 ----
const char **revision));
+ /* Split a locale name NAME into a leading language part and all the
+ rest. Return a pointer to the first character after the language,
+ i.e. to the first byte of the rest. */
extern char *_nl_find_language PARAMS ((const char *name));
Index: loadmsgcat.c
===================================================================
RCS file: /cvsroot/adonthell/adonthell/intl/loadmsgcat.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** loadmsgcat.c 7 Apr 2002 09:51:28 -0000 1.2
--- loadmsgcat.c 22 Aug 2002 15:16:28 -0000 1.3
***************
*** 1,4 ****
/* Load needed message catalogs.
! Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
--- 1,4 ----
/* Load needed message catalogs.
! Copyright (C) 1995-1999, 2000-2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
***************
[...974 lines suppressed...]
! }
break;
default:
/* This is an invalid revision. */
+ invalid:
+ /* This is an invalid .mo file. */
+ if (domain->malloced)
+ free (domain->malloced);
#ifdef HAVE_MMAP
if (use_mmap)
***************
*** 433,436 ****
--- 1301,1307 ----
_nl_free_domain_conv (domain);
+
+ if (domain->malloced)
+ free (domain->malloced);
# ifdef _POSIX_MAPPED_FILES
Index: localcharset.c
===================================================================
RCS file: /cvsroot/adonthell/adonthell/intl/localcharset.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** localcharset.c 7 Apr 2002 09:51:28 -0000 1.2
--- localcharset.c 22 Aug 2002 15:16:28 -0000 1.3
***************
*** 18,22 ****
USA. */
! /* Written by Bruno Haible <address@hidden>. */
#ifdef HAVE_CONFIG_H
--- 18,22 ----
USA. */
! /* Written by Bruno Haible <address@hidden>. */
#ifdef HAVE_CONFIG_H
***************
*** 83,86 ****
--- 83,91 ----
#endif
+ #ifdef __cplusplus
+ /* When compiling with "gcc -x c++", produce a function with C linkage. */
+ extern "C" const char * locale_charset (void);
+ #endif
+
/* The following static variable is declared 'volatile' to avoid a
possible multithread problem in the function get_charset_aliases. If we
***************
*** 202,206 ****
# if defined WIN32
cp = "CP936" "\0" "GBK" "\0"
! "CP1361" "\0" "JOHAB" "\0";
# endif
#endif
--- 207,224 ----
# if defined WIN32
cp = "CP936" "\0" "GBK" "\0"
! "CP1361" "\0" "JOHAB" "\0"
! "CP20127" "\0" "ASCII" "\0"
! "CP20866" "\0" "KOI8-R" "\0"
! "CP21866" "\0" "KOI8-RU" "\0"
! "CP28591" "\0" "ISO-8859-1" "\0"
! "CP28592" "\0" "ISO-8859-2" "\0"
! "CP28593" "\0" "ISO-8859-3" "\0"
! "CP28594" "\0" "ISO-8859-4" "\0"
! "CP28595" "\0" "ISO-8859-5" "\0"
! "CP28596" "\0" "ISO-8859-6" "\0"
! "CP28597" "\0" "ISO-8859-7" "\0"
! "CP28598" "\0" "ISO-8859-8" "\0"
! "CP28599" "\0" "ISO-8859-9" "\0"
! "CP28605" "\0" "ISO-8859-15" "\0";
# endif
#endif
***************
*** 268,272 ****
static char buf[2 + 10 + 1];
! /* Win32 has a function returning the locale's codepage as a number. */
sprintf (buf, "CP%u", GetACP ());
codeset = buf;
--- 286,290 ----
static char buf[2 + 10 + 1];
! /* Woe32 has a function returning the locale's codepage as a number. */
sprintf (buf, "CP%u", GetACP ());
codeset = buf;
***************
*** 341,344 ****
--- 359,368 ----
break;
}
+
+ /* Don't return an empty string. GNU libc and GNU libiconv interpret
+ the empty string as denoting "the locale's character encoding",
+ thus GNU libiconv would call this function a second time. */
+ if (codeset[0] == '\0')
+ codeset = "ASCII";
return codeset;
Index: localename.c
===================================================================
RCS file: /cvsroot/adonthell/adonthell/intl/localename.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** localename.c 25 Apr 2002 15:34:12 -0000 1.4
--- localename.c 22 Aug 2002 15:16:28 -0000 1.5
***************
*** 66,69 ****
--- 66,72 ----
# define LANG_CATALAN 0x03
# endif
+ # ifndef LANG_DIVEHI
+ # define LANG_DIVEHI 0x65
+ # endif
# ifndef LANG_ESTONIAN
# define LANG_ESTONIAN 0x25
***************
*** 75,78 ****
--- 78,84 ----
# define LANG_FARSI 0x29
# endif
+ # ifndef LANG_GALICIAN
+ # define LANG_GALICIAN 0x56
+ # endif
# ifndef LANG_GEORGIAN
# define LANG_GEORGIAN 0x37
***************
*** 102,105 ****
--- 108,114 ----
# define LANG_KONKANI 0x57
# endif
+ # ifndef LANG_KYRGYZ
+ # define LANG_KYRGYZ 0x40
+ # endif
# ifndef LANG_LATVIAN
# define LANG_LATVIAN 0x26
***************
*** 123,126 ****
--- 132,138 ----
# define LANG_MARATHI 0x4e
# endif
+ # ifndef LANG_MONGOLIAN
+ # define LANG_MONGOLIAN 0x50
+ # endif
# ifndef LANG_NEPALI
# define LANG_NEPALI 0x61
***************
*** 144,150 ****
--- 156,168 ----
# define LANG_SLOVAK 0x1b
# endif
+ # ifndef LANG_SORBIAN
+ # define LANG_SORBIAN 0x2e
+ # endif
# ifndef LANG_SWAHILI
# define LANG_SWAHILI 0x41
# endif
+ # ifndef LANG_SYRIAC
+ # define LANG_SYRIAC 0x5a
+ # endif
# ifndef LANG_TAMIL
# define LANG_TAMIL 0x49
***************
*** 429,436 ****
--- 447,459 ----
primary = PRIMARYLANGID (langid);
sub = SUBLANGID (langid);
+
+ /* Dispatch on language.
+ See also http://www.unicode.org/unicode/onlinedat/languages.html .
+ For details about languages, see http://www.ethnologue.com/ . */
switch (primary)
{
case LANG_AFRIKAANS: return "af_ZA";
case LANG_ALBANIAN: return "sq_AL";
+ case 0x5e: /* AMHARIC */ return "am_ET";
case LANG_ARABIC:
switch (sub)
***************
*** 469,473 ****
--- 492,499 ----
case LANG_BENGALI: return "bn_IN";
case LANG_BULGARIAN: return "bg_BG";
+ case 0x55: /* BURMESE */ return "my_MM";
+ case 0x53: /* CAMBODIAN */ return "km_KH";
case LANG_CATALAN: return "ca_ES";
+ case 0x5c: /* CHEROKEE */ return "chr_US";
case LANG_CHINESE:
switch (sub)
***************
*** 490,507 ****
switch (sub)
{
! /* FIXME: How to distinguish Croatian and Latin Serbian locales? */
case SUBLANG_SERBIAN_LATIN: return "sr_YU";
case SUBLANG_SERBIAN_CYRILLIC: return "address@hidden";
- default: return "hr_HR";
}
case LANG_CZECH: return "cs_CZ";
case LANG_DANISH: return "da_DK";
case LANG_DUTCH:
switch (sub)
{
case SUBLANG_DUTCH: return "nl_NL";
! case SUBLANG_DUTCH_BELGIAN: return "nl_BE";
}
return "nl";
case LANG_ENGLISH:
switch (sub)
--- 516,535 ----
switch (sub)
{
! case SUBLANG_DEFAULT: return "hr_HR";
case SUBLANG_SERBIAN_LATIN: return "sr_YU";
case SUBLANG_SERBIAN_CYRILLIC: return "address@hidden";
}
+ return "hr";
case LANG_CZECH: return "cs_CZ";
case LANG_DANISH: return "da_DK";
+ case LANG_DIVEHI: return "div_MV";
case LANG_DUTCH:
switch (sub)
{
case SUBLANG_DUTCH: return "nl_NL";
! case SUBLANG_DUTCH_BELGIAN: /* FLEMISH, VLAAMS */ return "nl_BE";
}
return "nl";
+ case 0x66: /* EDO */ return "bin_NG";
case LANG_ENGLISH:
switch (sub)
***************
*** 534,538 ****
{
case SUBLANG_FRENCH: return "fr_FR";
! case SUBLANG_FRENCH_BELGIAN: return "fr_BE";
case SUBLANG_FRENCH_CANADIAN: return "fr_CA";
case SUBLANG_FRENCH_SWISS: return "fr_CH";
--- 562,566 ----
{
case SUBLANG_FRENCH: return "fr_FR";
! case SUBLANG_FRENCH_BELGIAN: /* WALLOON */ return "fr_BE";
case SUBLANG_FRENCH_CANADIAN: return "fr_CA";
case SUBLANG_FRENCH_SWISS: return "fr_CH";
***************
*** 541,544 ****
--- 569,582 ----
}
return "fr";
+ case 0x62: /* FRISIAN */ return "fy_NL";
+ case 0x67: /* FULFULDE */ return "ful_NG";
+ case 0x3c: /* GAELIC */
+ switch (sub)
+ {
+ case 0x01: /* SCOTTISH */ return "gd_GB";
+ case 0x02: /* IRISH */ return "ga_IE";
+ }
+ return "C";
+ case LANG_GALICIAN: return "gl_ES";
case LANG_GEORGIAN: return "ka_GE";
case LANG_GERMAN:
***************
*** 553,562 ****
--- 591,609 ----
return "de";
case LANG_GREEK: return "el_GR";
+ case 0x74: /* GUARANI */ return "gn_PY";
case LANG_GUJARATI: return "gu_IN";
+ case 0x68: /* HAUSA */ return "ha_NG";
+ case 0x75: /* HAWAIIAN */
+ /* FIXME: Do they mean Hawaiian ("haw_US", 1000 speakers)
+ or Hawaii Creole English ("cpe_US", 600000 speakers)? */
+ return "cpe_US";
case LANG_HEBREW: return "he_IL";
case LANG_HINDI: return "hi_IN";
case LANG_HUNGARIAN: return "hu_HU";
+ case 0x69: /* IBIBIO */ return "nic_NG";
case LANG_ICELANDIC: return "is_IS";
+ case 0x70: /* IGBO */ return "ibo_NG";
case LANG_INDONESIAN: return "id_ID";
+ case 0x5d: /* INUKTITUT */ return "iu_CA";
case LANG_ITALIAN:
switch (sub)
***************
*** 568,571 ****
--- 615,619 ----
case LANG_JAPANESE: return "ja_JP";
case LANG_KANNADA: return "kn_IN";
+ case 0x71: /* KANURI */ return "kau_NG";
case LANG_KASHMIRI:
switch (sub)
***************
*** 580,583 ****
--- 628,634 ----
return "kok_IN";
case LANG_KOREAN: return "ko_KR";
+ case LANG_KYRGYZ: return "ky_KG";
+ case 0x54: /* LAO */ return "lo_LA";
+ case 0x76: /* LATIN */ return "la_VA";
case LANG_LATVIAN: return "lv_LV";
case LANG_LITHUANIAN: return "lt_LT";
***************
*** 591,598 ****
--- 642,652 ----
return "ms";
case LANG_MALAYALAM: return "ml_IN";
+ case 0x3a: /* MALTESE */ return "mt_MT";
case LANG_MANIPURI:
/* FIXME: Adjust this when such locales appear on Unix. */
return "mni_IN";
case LANG_MARATHI: return "mr_IN";
+ case LANG_MONGOLIAN:
+ return "mn"; /* Ambiguous: could be "mn_CN" or "mn_MN". */
case LANG_NEPALI:
switch (sub)
***************
*** 610,613 ****
--- 664,671 ----
return "no";
case LANG_ORIYA: return "or_IN";
+ case 0x72: /* OROMO */ return "om_ET";
+ case 0x79: /* PAPIAMENTU */ return "pap_AN";
+ case 0x63: /* PASHTO */
+ return "ps"; /* Ambiguous: could be "ps_PK" or "ps_AF". */
case LANG_POLISH: return "pl_PL";
case LANG_PORTUGUESE:
***************
*** 621,634 ****
return "pt";
case LANG_PUNJABI: return "pa_IN";
case LANG_ROMANIAN: return "ro_RO";
case LANG_RUSSIAN:
return "ru"; /* Ambiguous: could be "ru_RU" or "ru_UA". */
case LANG_SANSKRIT: return "sa_IN";
case LANG_SINDHI: return "sd";
case LANG_SLOVAK: return "sk_SK";
case LANG_SLOVENIAN: return "sl_SI";
! /* case LANG_SORBIAN: */
/* FIXME: Adjust this when such locales appear on Unix. */
! /* return "wen_DE"; */
case LANG_SPANISH:
switch (sub)
--- 679,696 ----
return "pt";
case LANG_PUNJABI: return "pa_IN";
+ case 0x17: /* RHAETO-ROMANCE */ return "rm_CH";
case LANG_ROMANIAN: return "ro_RO";
case LANG_RUSSIAN:
return "ru"; /* Ambiguous: could be "ru_RU" or "ru_UA". */
+ case 0x3b: /* SAMI */ return "se_NO";
case LANG_SANSKRIT: return "sa_IN";
case LANG_SINDHI: return "sd";
+ case 0x5b: /* SINHALESE */ return "si_LK";
case LANG_SLOVAK: return "sk_SK";
case LANG_SLOVENIAN: return "sl_SI";
! case 0x77: /* SOMALI */ return "so_SO";
! case LANG_SORBIAN:
/* FIXME: Adjust this when such locales appear on Unix. */
! return "wen_DE";
case LANG_SPANISH:
switch (sub)
***************
*** 657,661 ****
}
return "es";
! case LANG_SWAHILI: return "sw";
case LANG_SWEDISH:
switch (sub)
--- 719,724 ----
}
return "es";
! case 0x30: /* SUTU */ return "bnt_TZ";
! case LANG_SWAHILI: return "sw_KE";
case LANG_SWEDISH:
switch (sub)
***************
*** 665,674 ****
}
return "sv";
case LANG_TAMIL:
return "ta"; /* Ambiguous: could be "ta_IN" or "ta_LK" or "ta_SG". */
! case LANG_TATAR: return "tt";
case LANG_TELUGU: return "te_IN";
case LANG_THAI: return "th_TH";
case LANG_TURKISH: return "tr_TR";
case LANG_UKRAINIAN: return "uk_UA";
case LANG_URDU:
--- 728,745 ----
}
return "sv";
+ case LANG_SYRIAC: return "syr_TR"; /* An extinct language. */
+ case 0x64: /* TAGALOG */ return "tl_PH";
+ case 0x28: /* TAJIK */ return "tg_TJ";
+ case 0x5f: /* TAMAZIGHT */ return "ber_MA";
case LANG_TAMIL:
return "ta"; /* Ambiguous: could be "ta_IN" or "ta_LK" or "ta_SG". */
! case LANG_TATAR: return "tt_RU";
case LANG_TELUGU: return "te_IN";
case LANG_THAI: return "th_TH";
+ case 0x51: /* TIBETAN */ return "bo_CN";
+ case 0x73: /* TIGRINYA */ return "ti_ET";
+ case 0x31: /* TSONGA */ return "ts_ZA";
case LANG_TURKISH: return "tr_TR";
+ case 0x42: /* TURKMEN */ return "tk_TM";
case LANG_UKRAINIAN: return "uk_UA";
case LANG_URDU:
***************
*** 687,691 ****
--- 758,769 ----
}
return "uz";
+ case 0x33: /* VENDA */ return "ven_ZA";
case LANG_VIETNAMESE: return "vi_VN";
+ case 0x52: /* WELSH */ return "cy_GB";
+ case 0x34: /* XHOSA */ return "xh_ZA";
+ case 0x78: /* YI */ return "sit_CN";
+ case 0x3d: /* YIDDISH */ return "yi_IL";
+ case 0x6a: /* YORUBA */ return "yo_NG";
+ case 0x35: /* ZULU */ return "zu_ZA";
default: return "C";
}
Index: ngettext.c
===================================================================
RCS file: /cvsroot/adonthell/adonthell/intl/ngettext.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** ngettext.c 7 Apr 2002 09:51:28 -0000 1.2
--- ngettext.c 22 Aug 2002 15:16:28 -0000 1.3
***************
*** 1,4 ****
/* Implementation of ngettext(3) function.
! Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
--- 1,4 ----
/* Implementation of ngettext(3) function.
! Copyright (C) 1995, 1997, 2000, 2001, 2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
***************
*** 45,52 ****
#ifdef _LIBC
# define NGETTEXT __ngettext
! # define DCNGETTEXT __dcngettext
#else
! # define NGETTEXT ngettext__
! # define DCNGETTEXT dcngettext__
#endif
--- 45,52 ----
#ifdef _LIBC
# define NGETTEXT __ngettext
! # define DCNGETTEXT INTUSE(__dcngettext)
#else
! # define NGETTEXT libintl_ngettext
! # define DCNGETTEXT libintl_dcngettext
#endif
Index: os2compat.c
===================================================================
RCS file: /cvsroot/adonthell/adonthell/intl/os2compat.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** os2compat.c 15 Apr 2002 13:02:35 -0000 1.3
--- os2compat.c 22 Aug 2002 15:16:28 -0000 1.4
***************
*** 24,27 ****
--- 24,28 ----
#include <stdlib.h>
#include <string.h>
+ #include <sys/param.h>
/* A version of getenv() that works from DLLs */
***************
*** 39,101 ****
/* A fixed size buffer. */
! #define LOCALEDIR_MAX 260
! char _nl_default_dirname__[LOCALEDIR_MAX+1];
! char *_os2_libdir = NULL;
! char *_os2_localealiaspath = NULL;
! char *_os2_localedir = NULL;
static __attribute__((constructor)) void
! os2_initialize ()
{
char *root = getenv ("UNIXROOT");
char *gnulocaledir = getenv ("GNULOCALEDIR");
! _os2_libdir = gnulocaledir;
! if (!_os2_libdir)
{
if (root)
{
size_t sl = strlen (root);
! _os2_libdir = (char *) malloc (sl + strlen (LIBDIR) + 1);
! memcpy (_os2_libdir, root, sl);
! memcpy (_os2_libdir + sl, LIBDIR, strlen (LIBDIR) + 1);
}
else
! _os2_libdir = LIBDIR;
}
! _os2_localealiaspath = gnulocaledir;
! if (!_os2_localealiaspath)
{
if (root)
{
size_t sl = strlen (root);
! _os2_localealiaspath = (char *) malloc (sl + strlen
(LOCALE_ALIAS_PATH) + 1);
! memcpy (_os2_localealiaspath, root, sl);
! memcpy (_os2_localealiaspath + sl, LOCALE_ALIAS_PATH, strlen
(LOCALE_ALIAS_PATH) + 1);
}
else
! _os2_localealiaspath = LOCALE_ALIAS_PATH;
}
! _os2_localedir = gnulocaledir;
! if (!_os2_localedir)
{
if (root)
{
size_t sl = strlen (root);
! _os2_localedir = (char *) malloc (sl + strlen (LOCALEDIR) + 1);
! memcpy (_os2_localedir, root, sl);
! memcpy (_os2_localedir + sl, LOCALEDIR, strlen (LOCALEDIR) + 1);
}
else
! _os2_localedir = LOCALEDIR;
}
! {
! extern const char _nl_default_dirname__[];
! if (strlen (_os2_localedir) <= LOCALEDIR_MAX)
! strcpy (_nl_default_dirname__, _os2_localedir);
! }
}
--- 40,98 ----
/* A fixed size buffer. */
! char libintl_nl_default_dirname[MAXPATHLEN+1];
! char *_nlos2_libdir = NULL;
! char *_nlos2_localealiaspath = NULL;
! char *_nlos2_localedir = NULL;
static __attribute__((constructor)) void
! nlos2_initialize ()
{
char *root = getenv ("UNIXROOT");
char *gnulocaledir = getenv ("GNULOCALEDIR");
! _nlos2_libdir = gnulocaledir;
! if (!_nlos2_libdir)
{
if (root)
{
size_t sl = strlen (root);
! _nlos2_libdir = (char *) malloc (sl + strlen (LIBDIR) + 1);
! memcpy (_nlos2_libdir, root, sl);
! memcpy (_nlos2_libdir + sl, LIBDIR, strlen (LIBDIR) + 1);
}
else
! _nlos2_libdir = LIBDIR;
}
! _nlos2_localealiaspath = gnulocaledir;
! if (!_nlos2_localealiaspath)
{
if (root)
{
size_t sl = strlen (root);
! _nlos2_localealiaspath = (char *) malloc (sl + strlen
(LOCALE_ALIAS_PATH) + 1);
! memcpy (_nlos2_localealiaspath, root, sl);
! memcpy (_nlos2_localealiaspath + sl, LOCALE_ALIAS_PATH, strlen
(LOCALE_ALIAS_PATH) + 1);
}
else
! _nlos2_localealiaspath = LOCALE_ALIAS_PATH;
}
! _nlos2_localedir = gnulocaledir;
! if (!_nlos2_localedir)
{
if (root)
{
size_t sl = strlen (root);
! _nlos2_localedir = (char *) malloc (sl + strlen (LOCALEDIR) + 1);
! memcpy (_nlos2_localedir, root, sl);
! memcpy (_nlos2_localedir + sl, LOCALEDIR, strlen (LOCALEDIR) + 1);
}
else
! _nlos2_localedir = LOCALEDIR;
}
! if (strlen (_nlos2_localedir) <= MAXPATHLEN)
! strcpy (libintl_nl_default_dirname, _nlos2_localedir);
}
Index: os2compat.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/intl/os2compat.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** os2compat.h 7 Apr 2002 09:51:28 -0000 1.2
--- os2compat.h 22 Aug 2002 15:16:28 -0000 1.3
***************
*** 22,35 ****
#undef LIBDIR
! #define LIBDIR _os2_libdir
! extern char *_os2_libdir;
#undef LOCALEDIR
! #define LOCALEDIR _os2_localedir
! extern char *_os2_localedir;
#undef LOCALE_ALIAS_PATH
! #define LOCALE_ALIAS_PATH _os2_localealiaspath
! extern char *_os2_localealiaspath;
#endif
--- 22,35 ----
#undef LIBDIR
! #define LIBDIR _nlos2_libdir
! extern char *_nlos2_libdir;
#undef LOCALEDIR
! #define LOCALEDIR _nlos2_localedir
! extern char *_nlos2_localedir;
#undef LOCALE_ALIAS_PATH
! #define LOCALE_ALIAS_PATH _nlos2_localealiaspath
! extern char *_nlos2_localealiaspath;
#endif
Index: plural-exp.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/intl/plural-exp.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** plural-exp.h 7 Apr 2002 09:51:28 -0000 1.2
--- plural-exp.h 22 Aug 2002 15:16:28 -0000 1.3
***************
*** 1,4 ****
/* Expression parsing and evaluation for plural form selection.
! Copyright (C) 2000, 2001 Free Software Foundation, Inc.
Written by Ulrich Drepper <address@hidden>, 2000.
--- 1,4 ----
/* Expression parsing and evaluation for plural form selection.
! Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
Written by Ulrich Drepper <address@hidden>, 2000.
***************
*** 33,36 ****
--- 33,40 ----
#endif
+ #ifndef attribute_hidden
+ # define attribute_hidden
+ #endif
+
/* This is the representation of the expressions to determine the
***************
*** 95,102 ****
# define EXTRACT_PLURAL_EXPRESSION __gettext_extract_plural
#elif defined (IN_LIBINTL)
! # define FREE_EXPRESSION gettext_free_exp__
! # define PLURAL_PARSE gettextparse__
! # define GERMANIC_PLURAL gettext_germanic_plural__
! # define EXTRACT_PLURAL_EXPRESSION gettext_extract_plural__
#else
# define FREE_EXPRESSION free_plural_expression
--- 99,106 ----
# define EXTRACT_PLURAL_EXPRESSION __gettext_extract_plural
#elif defined (IN_LIBINTL)
! # define FREE_EXPRESSION libintl_gettext_free_exp
! # define PLURAL_PARSE libintl_gettextparse
! # define GERMANIC_PLURAL libintl_gettext_germanic_plural
! # define EXTRACT_PLURAL_EXPRESSION libintl_gettext_extract_plural
#else
# define FREE_EXPRESSION free_plural_expression
***************
*** 109,113 ****
internal_function;
extern int PLURAL_PARSE PARAMS ((void *arg));
! extern struct expression GERMANIC_PLURAL;
extern void EXTRACT_PLURAL_EXPRESSION PARAMS ((const char *nullentry,
struct expression **pluralp,
--- 113,117 ----
internal_function;
extern int PLURAL_PARSE PARAMS ((void *arg));
! extern struct expression GERMANIC_PLURAL attribute_hidden;
extern void EXTRACT_PLURAL_EXPRESSION PARAMS ((const char *nullentry,
struct expression **pluralp,
Index: textdomain.c
===================================================================
RCS file: /cvsroot/adonthell/adonthell/intl/textdomain.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** textdomain.c 7 Apr 2002 09:51:28 -0000 1.2
--- textdomain.c 22 Aug 2002 15:16:28 -0000 1.3
***************
*** 1,4 ****
/* Implementation of the textdomain(3) function.
! Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
--- 1,4 ----
/* Implementation of the textdomain(3) function.
! Copyright (C) 1995-1998, 2000, 2001, 2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
***************
*** 45,50 ****
using libintl.a cannot be linked statically. */
#if !defined _LIBC
! # define _nl_default_default_domain _nl_default_default_domain__
! # define _nl_current_default_domain _nl_current_default_domain__
#endif
--- 45,50 ----
using libintl.a cannot be linked statically. */
#if !defined _LIBC
! # define _nl_default_default_domain libintl_nl_default_default_domain
! # define _nl_current_default_domain libintl_nl_current_default_domain
#endif
***************
*** 52,59 ****
/* Name of the default text domain. */
! extern const char _nl_default_default_domain[];
/* Default text domain in which entries for gettext(3) are to be found. */
! extern const char *_nl_current_default_domain;
--- 52,59 ----
/* Name of the default text domain. */
! extern const char _nl_default_default_domain[] attribute_hidden;
/* Default text domain in which entries for gettext(3) are to be found. */
! extern const char *_nl_current_default_domain attribute_hidden;
***************
*** 68,76 ****
# endif
#else
! # define TEXTDOMAIN textdomain__
#endif
/* Lock variable to protect the global data in the gettext implementation. */
! __libc_rwlock_define (extern, _nl_state_lock)
/* Set the current default message catalog to DOMAINNAME.
--- 68,76 ----
# endif
#else
! # define TEXTDOMAIN libintl_textdomain
#endif
/* Lock variable to protect the global data in the gettext implementation. */
! __libc_rwlock_define (extern, _nl_state_lock attribute_hidden)
/* Set the current default message catalog to DOMAINNAME.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Adonthell-commits] CVS: adonthell/intl ChangeLog,1.3,1.4 Makefile.in,1.2,1.3 VERSION,1.3,1.4 bindtextdom.c,1.2,1.3 config.charset,1.3,1.4 dcgettext.c,1.2,1.3 dcigettext.c,1.2,1.3 dcngettext.c,1.2,1.3 dgettext.c,1.2,1.3 dngettext.c,1.2,1.3 eval-plural.h,1.3,1.4 gettext.c,1.2,1.3 gettextP.h,1.2,1.3 gmo.h,1.2,1.3 intl-compat.c,1.2,1.3 l10nflist.c,1.2,1.3 libgnuintl.h,1.2,1.3 loadinfo.h,1.2,1.3 loadmsgcat.c,1.2,1.3 localcharset.c,1.2,1.3 localename.c,1.4,1.5 ngettext.c,1.2,1.3 os2compat.c,1.3,1.4 os2compat.h,1.2,1.3 plural-exp.h,1.2,1.3 textdomain.c,1.2,1.3,
Kai Sterker <address@hidden> <=
- Prev by Date:
[Adonthell-commits] CVS: adonthell ABOUT-NLS,1.3,1.4 mkinstalldirs,1.3,1.4
- Next by Date:
[Adonthell-commits] CVS: adonthell/po Makefile.in.in,1.6,1.7
- Previous by thread:
[Adonthell-commits] CVS: adonthell ABOUT-NLS,1.3,1.4 mkinstalldirs,1.3,1.4
- Next by thread:
[Adonthell-commits] CVS: adonthell/po Makefile.in.in,1.6,1.7
- Index(es):