1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00
2001-01-04  H.J. Lu  <hjl@gnu.org>

	* elf/dl-support.c (DL_FIND_AUXV): New.  Defined if not defined.
	(_dl_clktck): Declared.
	(non_dynamic_init): Take 3 arguments.
	Set _dl_pagesize, _dl_platform and _dl_clktck from AUX.

2001-01-01  Bruno Haible  <haible@clisp.cons.org>

	Finish implementation of plural form handling.
	* intl/dcigettext.c (known_translation_t): Rename 'domain' field to
	'domainname'.  Remove 'plindex' field. Add 'domain' and
	'translation_length' fields.
	(transcmp): Don't compare 'plindex' fields.
	(plural_lookup): New function.
	(DCIGETTEXT): Change cache handing in the plural case.  Don't call
	plural_eval before the translation and its catalog file have been
	found. Remove plindex from cache key.  Add 'translation_length' and
	'domain' to cache result.
	(_nl_find_msg): Remove index argument, return length of translation
	to the caller instead.  Weaken comparison of string lengths, to account
	for plural entries.  Call iconv() on the entire result string, not
	only on the portion needed so far.
	* intl/loadinfo.h (_nl_find_msg): Remove index argument, add lengthp
	argument.
	* intl/loadmsgcat.c (_nl_load_domain): Adapt to _nl_find_msg change.
This commit is contained in:
Ulrich Drepper
2001-01-05 06:43:17 +00:00
parent eda6c725e7
commit f8f900ecb9
5 changed files with 231 additions and 152 deletions

View File

@ -1,5 +1,5 @@
/* Load needed message catalogs.
Copyright (C) 1995-1999, 2000 Free Software Foundation, Inc.
Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@ -107,14 +107,15 @@ static struct expression germanic_plural =
.operation = not_equal,
.val =
{
.args2 = {
.args2 =
{
.left = (struct expression *) &plvar,
.right = (struct expression *) &plone
}
}
};
#define INIT_GERMANIC_PLURAL()
# define INIT_GERMANIC_PLURAL()
#else
@ -141,7 +142,7 @@ init_germanic_plural ()
}
}
#define INIT_GERMANIC_PLURAL() init_germanic_plural ()
# define INIT_GERMANIC_PLURAL() init_germanic_plural ()
#endif
@ -160,6 +161,7 @@ _nl_load_domain (domain_file)
int use_mmap = 0;
struct loaded_domain *domain;
char *nullentry;
size_t nullentrylen;
domain_file->decided = 1;
domain_file->data = NULL;
@ -297,7 +299,7 @@ _nl_load_domain (domain_file)
# endif
#endif
domain->conv_tab = NULL;
nullentry = _nl_find_msg (domain_file, "", 0);
nullentry = _nl_find_msg (domain_file, "", &nullentrylen);
if (nullentry != NULL)
{
#if defined _LIBC || HAVE_ICONV