* SUPPORTED (SUPPORTED-LOCALES): Add dz_BT.UTF-8.
	[BZ #368]
	* locales/dz_BT: New file.
This commit is contained in:
Ulrich Drepper 2005-10-14 22:56:25 +00:00
parent daa226125c
commit 7d4722e3fd
9 changed files with 1451 additions and 59 deletions

View File

@ -265,7 +265,7 @@
#endif #endif
#if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0 \ #if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0 \
&& __GNUC_PREREQ (4, 0) && defined __OPTIMIZE__ && __OPTIMIZE__ > 0 && __GNUC_PREREQ (4, 1) && defined __OPTIMIZE__ && __OPTIMIZE__ > 0
# if _FORTIFY_SOURCE > 1 # if _FORTIFY_SOURCE > 1
# define __USE_FORTIFY_LEVEL 2 # define __USE_FORTIFY_LEVEL 2
# else # else

View File

@ -1,5 +1,5 @@
/* Declarations for internal libc locale interfaces /* Declarations for internal libc locale interfaces
Copyright (C) 1995-2001, 2002, 2003 Free Software Foundation, Inc. Copyright (C) 1995-2001, 2002, 2003, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or The GNU C Library is free software; you can redistribute it and/or
@ -31,7 +31,10 @@
#include <intl/loadinfo.h> /* For loaded_l10nfile definition. */ #include <intl/loadinfo.h> /* For loaded_l10nfile definition. */
/* Magic number at the beginning of a locale data file for CATEGORY. */ /* Magic number at the beginning of a locale data file for CATEGORY. */
#define LIMAGIC(category) ((unsigned int) (0x20031115 ^ (category))) #define LIMAGIC(category) \
(category == LC_COLLATE \
? ((unsigned int) (0x20051014 ^ (category))) \
: ((unsigned int) (0x20031115 ^ (category))))
/* Two special weight constants for the collation data. */ /* Two special weight constants for the collation data. */
#define IGNORE_CHAR 2 #define IGNORE_CHAR 2

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1995-2002, 2003 Free Software Foundation, Inc. /* Copyright (C) 1995-2002, 2003, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.org>, 1995. Contributed by Ulrich Drepper <drepper@gnu.org>, 1995.
@ -2469,14 +2469,14 @@ collate_output (struct localedef_t *locale, const struct charmap_t *charmap,
runp = collate->start; runp = collate->start;
while (runp != NULL) while (runp != NULL)
{ {
if (runp->mbs != NULL && runp->weights != NULL) if (runp->mbs != NULL && runp->weights != NULL && !runp->is_character)
/* Yep, the element really counts. */ /* Yep, the element really counts. */
++elem_size; ++elem_size;
runp = runp->next; runp = runp->next;
} }
/* Add 40% and find the next prime number. */ /* Add 40% and find the next prime number. */
elem_size = MIN (next_prime (elem_size * 1.4), 257); elem_size = next_prime (elem_size * 1.4);
/* Allocate the table. Each entry consists of two words: the hash /* Allocate the table. Each entry consists of two words: the hash
value and an index in a secondary table which provides the index value and an index in a secondary table which provides the index
@ -2496,18 +2496,20 @@ collate_output (struct localedef_t *locale, const struct charmap_t *charmap,
uint32_t namelen = strlen (runp->name); uint32_t namelen = strlen (runp->name);
uint32_t hash = elem_hash (runp->name, namelen); uint32_t hash = elem_hash (runp->name, namelen);
size_t idx = hash % elem_size; size_t idx = hash % elem_size;
size_t start_idx = idx;
if (elem_table[idx * 2] != 0) if (elem_table[idx * 2] != 0)
{ {
/* The spot is already take. Try iterating using the value /* The spot is already taken. Try iterating using the value
from the secondary hashing function. */ from the secondary hashing function. */
size_t iter = hash % (elem_size - 2); size_t iter = hash % (elem_size - 2) + 1;
do do
{ {
idx += iter; idx += iter;
if (idx >= elem_size) if (idx >= elem_size)
idx -= elem_size; idx -= elem_size;
assert (idx != start_idx);
} }
while (elem_table[idx * 2] != 0); while (elem_table[idx * 2] != 0);
} }

View File

@ -1,5 +1,10 @@
2005-10-14 Ulrich Drepper <drepper@redhat.com> 2005-10-14 Ulrich Drepper <drepper@redhat.com>
* SUPPORTED (SUPPORTED-LOCALES): Add dz_BT.UTF-8.
[BZ #368]
* locales/dz_BT: New file.
[BZ #195] [BZ #195]
* locales/hu_HU: Add some transliterations. * locales/hu_HU: Add some transliterations.

View File

@ -83,6 +83,7 @@ de_DE@euro/ISO-8859-15 \
de_LU.UTF-8/UTF-8 \ de_LU.UTF-8/UTF-8 \
de_LU/ISO-8859-1 \ de_LU/ISO-8859-1 \
de_LU@euro/ISO-8859-15 \ de_LU@euro/ISO-8859-15 \
dz_BT/UTF-8 \
el_GR.UTF-8/UTF-8 \ el_GR.UTF-8/UTF-8 \
el_GR/ISO-8859-7 \ el_GR/ISO-8859-7 \
en_AU.UTF-8/UTF-8 \ en_AU.UTF-8/UTF-8 \

1360
localedata/locales/dz_BT Normal file

File diff suppressed because it is too large Load Diff

View File

@ -6,6 +6,10 @@
- a new attribute for mutexes: number of times we spin before calling - a new attribute for mutexes: number of times we spin before calling
sys_futex sys_futex
- for adaptive mutexes: when releasing, determine whether somebody spins.
If yes, for a short time release lock. If someone else locks no wakeup
syscall needed.
- test with threaded process terminating and semadj (?) being applied - test with threaded process terminating and semadj (?) being applied

View File

@ -1,5 +1,5 @@
/* Copyright (C) 1991,1992,1993,1996,1997,1998,1999,2000,2001,2003,2004 /* Copyright (C) 1991,1992,1993,1996,1997,1998,1999,2000,2001,2003,2004,2005
Free Software Foundation, Inc. Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or The GNU C Library is free software; you can redistribute it and/or
@ -502,24 +502,31 @@ FCT (pattern, string, string_end, no_leading_period, flags)
idx = 0; idx = 0;
elem = hash % table_size; elem = hash % table_size;
second = hash % (table_size - 2); if (symb_table[2 * elem] != 0)
while (symb_table[2 * elem] != 0)
{ {
/* First compare the hashing value. */ second = hash % (table_size - 2) + 1;
if (symb_table[2 * elem] == hash
&& c1 == extra[symb_table[2 * elem + 1]]
&& memcmp (str,
&extra[symb_table[2 * elem + 1]
+ 1], c1) == 0)
{
/* Yep, this is the entry. */
idx = symb_table[2 * elem + 1];
idx += 1 + extra[idx];
break;
}
/* Next entry. */ do
elem += second; {
/* First compare the hashing value. */
if (symb_table[2 * elem] == hash
&& (c1
== extra[symb_table[2 * elem + 1]])
&& memcmp (str,
&extra[symb_table[2 * elem
+ 1]
+ 1], c1) == 0)
{
/* Yep, this is the entry. */
idx = symb_table[2 * elem + 1];
idx += 1 + extra[idx];
break;
}
/* Next entry. */
elem += second;
}
while (symb_table[2 * elem] != 0);
} }
if (symb_table[2 * elem] != 0) if (symb_table[2 * elem] != 0)
@ -714,25 +721,30 @@ FCT (pattern, string, string_end, no_leading_period, flags)
idx = 0; idx = 0;
elem = hash % table_size; elem = hash % table_size;
second = hash % (table_size - 2); if (symb_table[2 * elem] != 0)
while (symb_table[2 * elem] != 0)
{ {
/* First compare the hashing value. */ second = hash % (table_size - 2) + 1;
if (symb_table[2 * elem] == hash
&& (c1
== extra[symb_table[2 * elem + 1]])
&& memcmp (str,
&extra[symb_table[2 * elem + 1]
+ 1], c1) == 0)
{
/* Yep, this is the entry. */
idx = symb_table[2 * elem + 1];
idx += 1 + extra[idx];
break;
}
/* Next entry. */ do
elem += second; {
/* First compare the hashing value. */
if (symb_table[2 * elem] == hash
&& (c1
== extra[symb_table[2 * elem + 1]])
&& memcmp (str,
&extra[symb_table[2 * elem + 1]
+ 1], c1) == 0)
{
/* Yep, this is the entry. */
idx = symb_table[2 * elem + 1];
idx += 1 + extra[idx];
break;
}
/* Next entry. */
elem += second;
}
while (symb_table[2 * elem] != 0);
} }
if (symb_table[2 * elem] != 0) if (symb_table[2 * elem] != 0)

View File

@ -2742,23 +2742,28 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
{ {
int32_t hash = elem_hash ((const char *) name, name_len); int32_t hash = elem_hash ((const char *) name, name_len);
int32_t elem = hash % table_size; int32_t elem = hash % table_size;
int32_t second = hash % (table_size - 2); if (symb_table[2 * elem] != 0)
while (symb_table[2 * elem] != 0)
{ {
/* First compare the hashing value. */ int32_t second = hash % (table_size - 2) + 1;
if (symb_table[2 * elem] == hash
/* Compare the length of the name. */
&& name_len == extra[symb_table[2 * elem + 1]]
/* Compare the name. */
&& memcmp (name, &extra[symb_table[2 * elem + 1] + 1],
name_len) == 0)
{
/* Yep, this is the entry. */
break;
}
/* Next entry. */ do
elem += second; {
/* First compare the hashing value. */
if (symb_table[2 * elem] == hash
/* Compare the length of the name. */
&& name_len == extra[symb_table[2 * elem + 1]]
/* Compare the name. */
&& memcmp (name, &extra[symb_table[2 * elem + 1] + 1],
name_len) == 0)
{
/* Yep, this is the entry. */
break;
}
/* Next entry. */
elem += second;
}
while (symb_table[2 * elem] != 0);
} }
return elem; return elem;
} }
@ -3000,7 +3005,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
/* /*
if (MB_CUR_MAX > 1) if (MB_CUR_MAX > 1)
*/ */
collseqwc = _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQWC); collseqwc = _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQWC);
table_size = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_SYMB_HASH_SIZEMB); table_size = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_SYMB_HASH_SIZEMB);
symb_table = (const int32_t *) _NL_CURRENT (LC_COLLATE, symb_table = (const int32_t *) _NL_CURRENT (LC_COLLATE,
_NL_COLLATE_SYMB_TABLEMB); _NL_COLLATE_SYMB_TABLEMB);