summaryrefslogtreecommitdiff
path: root/libc/locale
diff options
context:
space:
mode:
authorjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2007-09-12 16:26:54 +0000
committerjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2007-09-12 16:26:54 +0000
commit83584a7af898dd93c48600fe850d150c51b10899 (patch)
tree0affa8ffee374ab83e40501d8d8967a03569c44d /libc/locale
parent04b4d23592609edcd19fd5a461bbe6d3cc677b5b (diff)
Merge changes between r2424 and r3467 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@3468 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/locale')
-rw-r--r--libc/locale/localeinfo.h4
-rw-r--r--libc/locale/programs/3level.h5
-rw-r--r--libc/locale/programs/charmap-dir.c5
-rw-r--r--libc/locale/programs/charmap-dir.h5
-rw-r--r--libc/locale/programs/charmap-kw.gperf5
-rw-r--r--libc/locale/programs/charmap-kw.h5
-rw-r--r--libc/locale/programs/charmap.c5
-rw-r--r--libc/locale/programs/charmap.h5
-rw-r--r--libc/locale/programs/config.h5
-rw-r--r--libc/locale/programs/ld-address.c5
-rw-r--r--libc/locale/programs/ld-collate.c275
-rw-r--r--libc/locale/programs/ld-ctype.c15
-rw-r--r--libc/locale/programs/ld-identification.c5
-rw-r--r--libc/locale/programs/ld-measurement.c5
-rw-r--r--libc/locale/programs/ld-messages.c5
-rw-r--r--libc/locale/programs/ld-monetary.c13
-rw-r--r--libc/locale/programs/ld-name.c5
-rw-r--r--libc/locale/programs/ld-numeric.c5
-rw-r--r--libc/locale/programs/ld-paper.c5
-rw-r--r--libc/locale/programs/ld-telephone.c5
-rw-r--r--libc/locale/programs/ld-time.c5
-rw-r--r--libc/locale/programs/linereader.c5
-rw-r--r--libc/locale/programs/linereader.h5
-rw-r--r--libc/locale/programs/locale-spec.c5
-rw-r--r--libc/locale/programs/locale.c5
-rw-r--r--libc/locale/programs/localedef.c5
-rw-r--r--libc/locale/programs/localedef.h5
-rw-r--r--libc/locale/programs/locarchive.c5
-rw-r--r--libc/locale/programs/locfile-kw.gperf5
-rw-r--r--libc/locale/programs/locfile-kw.h5
-rw-r--r--libc/locale/programs/locfile-token.h5
-rw-r--r--libc/locale/programs/locfile.c5
-rw-r--r--libc/locale/programs/locfile.h5
-rw-r--r--libc/locale/programs/repertoire.c11
-rw-r--r--libc/locale/programs/repertoire.h5
-rw-r--r--libc/locale/programs/simple-hash.c5
-rw-r--r--libc/locale/programs/simple-hash.h5
-rw-r--r--libc/locale/programs/xmalloc.c5
-rw-r--r--libc/locale/programs/xstrdup.c5
-rw-r--r--libc/locale/weightwc.h4
40 files changed, 280 insertions, 212 deletions
diff --git a/libc/locale/localeinfo.h b/libc/locale/localeinfo.h
index 5c1f27f7e..5e3e99ca6 100644
--- a/libc/locale/localeinfo.h
+++ b/libc/locale/localeinfo.h
@@ -1,5 +1,5 @@
/* Declarations for internal libc locale interfaces
- Copyright (C) 1995-2003, 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1995-2003, 2005, 2006, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -186,7 +186,7 @@ extern const union catnamestr_t
};
char str[0];
} _nl_category_names attribute_hidden;
-const uint8_t _nl_category_name_idxs[__LC_LAST] attribute_hidden;
+extern const uint8_t _nl_category_name_idxs[__LC_LAST] attribute_hidden;
extern const uint8_t _nl_category_name_sizes[__LC_LAST] attribute_hidden;
/* Name of the standard locales. */
diff --git a/libc/locale/programs/3level.h b/libc/locale/programs/3level.h
index eebcca413..d2a7fd07f 100644
--- a/libc/locale/programs/3level.h
+++ b/libc/locale/programs/3level.h
@@ -3,8 +3,9 @@
Contributed by Bruno Haible <haible@clisp.cons.org>, 2000.
This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License version 2 as
- published by the Free Software Foundation.
+ it under the terms of the GNU General Public License as published
+ by the Free Software Foundation; version 2 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/libc/locale/programs/charmap-dir.c b/libc/locale/programs/charmap-dir.c
index 0568ab5ca..dc14c94fc 100644
--- a/libc/locale/programs/charmap-dir.c
+++ b/libc/locale/programs/charmap-dir.c
@@ -2,8 +2,9 @@
This file is part of the GNU C Library.
This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License version 2 as
- published by the Free Software Foundation.
+ it under the terms of the GNU General Public License as published
+ by the Free Software Foundation; version 2 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/libc/locale/programs/charmap-dir.h b/libc/locale/programs/charmap-dir.h
index 256db8dc3..028f926b0 100644
--- a/libc/locale/programs/charmap-dir.h
+++ b/libc/locale/programs/charmap-dir.h
@@ -2,8 +2,9 @@
This file is part of the GNU C Library.
This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License version 2 as
- published by the Free Software Foundation.
+ it under the terms of the GNU General Public License as published
+ by the Free Software Foundation; version 2 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/libc/locale/programs/charmap-kw.gperf b/libc/locale/programs/charmap-kw.gperf
index 64f745250..03fea9484 100644
--- a/libc/locale/programs/charmap-kw.gperf
+++ b/libc/locale/programs/charmap-kw.gperf
@@ -4,8 +4,9 @@
Contributed by Ulrich Drepper, <drepper@gnu.org>.
This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License version 2 as
- published by the Free Software Foundation.
+ it under the terms of the GNU General Public License as published
+ by the Free Software Foundation; version 2 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/libc/locale/programs/charmap-kw.h b/libc/locale/programs/charmap-kw.h
index d7d85774d..8ad642163 100644
--- a/libc/locale/programs/charmap-kw.h
+++ b/libc/locale/programs/charmap-kw.h
@@ -35,8 +35,9 @@
Contributed by Ulrich Drepper, <drepper@gnu.org>.
This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License version 2 as
- published by the Free Software Foundation.
+ it under the terms of the GNU General Public License as published
+ by the Free Software Foundation; version 2 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/libc/locale/programs/charmap.c b/libc/locale/programs/charmap.c
index dbc1101fd..ef528217f 100644
--- a/libc/locale/programs/charmap.c
+++ b/libc/locale/programs/charmap.c
@@ -3,8 +3,9 @@
Contributed by Ulrich Drepper <drepper@gnu.org>, 1996.
This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License version 2 as
- published by the Free Software Foundation.
+ it under the terms of the GNU General Public License as published
+ by the Free Software Foundation; version 2 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/libc/locale/programs/charmap.h b/libc/locale/programs/charmap.h
index fd711f2d1..11fddd760 100644
--- a/libc/locale/programs/charmap.h
+++ b/libc/locale/programs/charmap.h
@@ -3,8 +3,9 @@
Contributed by Ulrich Drepper <drepper@gnu.org>, 1996.
This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License version 2 as
- published by the Free Software Foundation.
+ it under the terms of the GNU General Public License as published
+ by the Free Software Foundation; version 2 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/libc/locale/programs/config.h b/libc/locale/programs/config.h
index 6f9bfde90..2f66997ab 100644
--- a/libc/locale/programs/config.h
+++ b/libc/locale/programs/config.h
@@ -4,8 +4,9 @@
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1995.
This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License version 2 as
- published by the Free Software Foundation.
+ it under the terms of the GNU General Public License as published
+ by the Free Software Foundation; version 2 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/libc/locale/programs/ld-address.c b/libc/locale/programs/ld-address.c
index ae642369d..40149fde1 100644
--- a/libc/locale/programs/ld-address.c
+++ b/libc/locale/programs/ld-address.c
@@ -3,8 +3,9 @@
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License version 2 as
- published by the Free Software Foundation.
+ it under the terms of the GNU General Public License as published
+ by the Free Software Foundation; version 2 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/libc/locale/programs/ld-collate.c b/libc/locale/programs/ld-collate.c
index f87e419be..3e2f88fe8 100644
--- a/libc/locale/programs/ld-collate.c
+++ b/libc/locale/programs/ld-collate.c
@@ -3,8 +3,9 @@
Contributed by Ulrich Drepper <drepper@gnu.org>, 1995.
This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License version 2 as
- published by the Free Software Foundation.
+ it under the terms of the GNU General Public License as published
+ by the Free Software Foundation; version 2 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -996,7 +997,8 @@ insert_value (struct linereader *ldfile, const char *symstr, size_t symlen,
uint32_t wcs[2] = { wc, 0 };
/* We have to allocate an entry. */
- elem = new_element (collate, seq != NULL ? seq->bytes : NULL,
+ elem = new_element (collate,
+ seq != NULL ? (char *) seq->bytes : NULL,
seq != NULL ? seq->nbytes : 0,
wc == ILLEGAL_CHAR_VALUE ? NULL : wcs,
symstr, symlen, 1);
@@ -1391,7 +1393,8 @@ order for `%.*s' already defined at %s:%Zu"),
/* We have to allocate an entry. */
elem = new_element (collate,
- seq != NULL ? seq->bytes : NULL,
+ seq != NULL
+ ? (char *) seq->bytes : NULL,
seq != NULL ? seq->nbytes : 0,
wc == ILLEGAL_CHAR_VALUE
? NULL : wcs, buf, lenfrom, 1);
@@ -1940,6 +1943,137 @@ output_weightwc (struct obstack *pool, struct locale_collate_t *collate,
return retval | ((elem->section->ruleidx & 0x7f) << 24);
}
+/* If localedef is every threaded, this would need to be __thread var. */
+static struct
+{
+ struct obstack *weightpool;
+ struct obstack *extrapool;
+ struct obstack *indpool;
+ struct locale_collate_t *collate;
+ struct collidx_table *tablewc;
+} atwc;
+
+static void add_to_tablewc (uint32_t ch, struct element_t *runp);
+
+static void
+add_to_tablewc (uint32_t ch, struct element_t *runp)
+{
+ if (runp->wcnext == NULL && runp->nwcs == 1)
+ {
+ int32_t weigthidx = output_weightwc (atwc.weightpool, atwc.collate,
+ runp);
+ collidx_table_add (atwc.tablewc, ch, weigthidx);
+ }
+ else
+ {
+ /* As for the singlebyte table, we recognize sequences and
+ compress them. */
+ struct element_t *lastp;
+
+ collidx_table_add (atwc.tablewc, ch,
+ -(obstack_object_size (atwc.extrapool)
+ / sizeof (uint32_t)));
+
+ do
+ {
+ /* Store the current index in the weight table. We know that
+ the current position in the `extrapool' is aligned on a
+ 32-bit address. */
+ int32_t weightidx;
+ int added;
+
+ /* Find out wether this is a single entry or we have more than
+ one consecutive entry. */
+ if (runp->wcnext != NULL
+ && runp->nwcs == runp->wcnext->nwcs
+ && wmemcmp_uint32 (runp->wcs,
+ runp->wcnext->wcs,
+ runp->nwcs - 1) == 0
+ && (runp->wcs[runp->nwcs - 1]
+ == runp->wcnext->wcs[runp->nwcs - 1] + 1))
+ {
+ int i;
+ struct element_t *series_startp = runp;
+ struct element_t *curp;
+
+ /* Now add first the initial byte sequence. */
+ added = (1 + 1 + 2 * (runp->nwcs - 1)) * sizeof (int32_t);
+ if (sizeof (int32_t) == sizeof (int))
+ obstack_make_room (atwc.extrapool, added);
+
+ /* More than one consecutive entry. We mark this by having
+ a negative index into the indirect table. */
+ obstack_int32_grow_fast (atwc.extrapool,
+ -(obstack_object_size (atwc.indpool)
+ / sizeof (int32_t)));
+ obstack_int32_grow_fast (atwc.extrapool, runp->nwcs - 1);
+
+ do
+ runp = runp->wcnext;
+ while (runp->wcnext != NULL
+ && runp->nwcs == runp->wcnext->nwcs
+ && wmemcmp_uint32 (runp->wcs,
+ runp->wcnext->wcs,
+ runp->nwcs - 1) == 0
+ && (runp->wcs[runp->nwcs - 1]
+ == runp->wcnext->wcs[runp->nwcs - 1] + 1));
+
+ /* Now walk backward from here to the beginning. */
+ curp = runp;
+
+ for (i = 1; i < runp->nwcs; ++i)
+ obstack_int32_grow_fast (atwc.extrapool, curp->wcs[i]);
+
+ /* Now find the end of the consecutive sequence and
+ add all the indeces in the indirect pool. */
+ do
+ {
+ weightidx = output_weightwc (atwc.weightpool, atwc.collate,
+ curp);
+ obstack_int32_grow (atwc.indpool, weightidx);
+
+ curp = curp->wclast;
+ }
+ while (curp != series_startp);
+
+ /* Add the final weight. */
+ weightidx = output_weightwc (atwc.weightpool, atwc.collate,
+ curp);
+ obstack_int32_grow (atwc.indpool, weightidx);
+
+ /* And add the end byte sequence. Without length this
+ time. */
+ for (i = 1; i < curp->nwcs; ++i)
+ obstack_int32_grow (atwc.extrapool, curp->wcs[i]);
+ }
+ else
+ {
+ /* A single entry. Simply add the index and the length and
+ string (except for the first character which is already
+ tested for). */
+ int i;
+
+ /* Output the weight info. */
+ weightidx = output_weightwc (atwc.weightpool, atwc.collate,
+ runp);
+
+ added = (1 + 1 + runp->nwcs - 1) * sizeof (int32_t);
+ if (sizeof (int) == sizeof (int32_t))
+ obstack_make_room (atwc.extrapool, added);
+
+ obstack_int32_grow_fast (atwc.extrapool, weightidx);
+ obstack_int32_grow_fast (atwc.extrapool, runp->nwcs - 1);
+ for (i = 1; i < runp->nwcs; ++i)
+ obstack_int32_grow_fast (atwc.extrapool, runp->wcs[i]);
+ }
+
+ /* Next entry. */
+ lastp = runp;
+ runp = runp->wcnext;
+ }
+ while (runp != NULL);
+ }
+}
void
collate_output (struct localedef_t *locale, const struct charmap_t *charmap,
@@ -2211,130 +2345,21 @@ collate_output (struct localedef_t *locale, const struct charmap_t *charmap,
with the same wide character and add them one after the other to
the table. In case we have more than one sequence starting with
the same byte we have to use extra indirection. */
- {
- auto void add_to_tablewc (uint32_t ch, struct element_t *runp);
+ tablewc.p = 6;
+ tablewc.q = 10;
+ collidx_table_init (&tablewc);
- void add_to_tablewc (uint32_t ch, struct element_t *runp)
- {
- if (runp->wcnext == NULL && runp->nwcs == 1)
- {
- int32_t weigthidx = output_weightwc (&weightpool, collate, runp);
- collidx_table_add (&tablewc, ch, weigthidx);
- }
- else
- {
- /* As for the singlebyte table, we recognize sequences and
- compress them. */
- struct element_t *lastp;
+ atwc.weightpool = &weightpool;
+ atwc.extrapool = &extrapool;
+ atwc.indpool = &indirectpool;
+ atwc.collate = collate;
+ atwc.tablewc = &tablewc;
- collidx_table_add (&tablewc, ch,
- -(obstack_object_size (&extrapool) / sizeof (uint32_t)));
+ wchead_table_iterate (&collate->wcheads, add_to_tablewc);
- do
- {
- /* Store the current index in the weight table. We know that
- the current position in the `extrapool' is aligned on a
- 32-bit address. */
- int32_t weightidx;
- int added;
-
- /* Find out wether this is a single entry or we have more than
- one consecutive entry. */
- if (runp->wcnext != NULL
- && runp->nwcs == runp->wcnext->nwcs
- && wmemcmp_uint32 (runp->wcs,
- runp->wcnext->wcs,
- runp->nwcs - 1) == 0
- && (runp->wcs[runp->nwcs - 1]
- == runp->wcnext->wcs[runp->nwcs - 1] + 1))
- {
- int i;
- struct element_t *series_startp = runp;
- struct element_t *curp;
-
- /* Now add first the initial byte sequence. */
- added = (1 + 1 + 2 * (runp->nwcs - 1)) * sizeof (int32_t);
- if (sizeof (int32_t) == sizeof (int))
- obstack_make_room (&extrapool, added);
-
- /* More than one consecutive entry. We mark this by having
- a negative index into the indirect table. */
- obstack_int32_grow_fast (&extrapool,
- -(obstack_object_size (&indirectpool)
- / sizeof (int32_t)));
- obstack_int32_grow_fast (&extrapool, runp->nwcs - 1);
-
- do
- runp = runp->wcnext;
- while (runp->wcnext != NULL
- && runp->nwcs == runp->wcnext->nwcs
- && wmemcmp_uint32 (runp->wcs,
- runp->wcnext->wcs,
- runp->nwcs - 1) == 0
- && (runp->wcs[runp->nwcs - 1]
- == runp->wcnext->wcs[runp->nwcs - 1] + 1));
-
- /* Now walk backward from here to the beginning. */
- curp = runp;
-
- for (i = 1; i < runp->nwcs; ++i)
- obstack_int32_grow_fast (&extrapool, curp->wcs[i]);
-
- /* Now find the end of the consecutive sequence and
- add all the indeces in the indirect pool. */
- do
- {
- weightidx = output_weightwc (&weightpool, collate,
- curp);
- obstack_int32_grow (&indirectpool, weightidx);
+ collidx_table_finalize (&tablewc);
- curp = curp->wclast;
- }
- while (curp != series_startp);
-
- /* Add the final weight. */
- weightidx = output_weightwc (&weightpool, collate, curp);
- obstack_int32_grow (&indirectpool, weightidx);
-
- /* And add the end byte sequence. Without length this
- time. */
- for (i = 1; i < curp->nwcs; ++i)
- obstack_int32_grow_fast (&extrapool, curp->wcs[i]);
- }
- else
- {
- /* A single entry. Simply add the index and the length and
- string (except for the first character which is already
- tested for). */
- int i;
-
- /* Output the weight info. */
- weightidx = output_weightwc (&weightpool, collate, runp);
-
- added = (1 + 1 + runp->nwcs - 1) * sizeof (int32_t);
- if (sizeof (int) == sizeof (int32_t))
- obstack_make_room (&extrapool, added);
-
- obstack_int32_grow_fast (&extrapool, weightidx);
- obstack_int32_grow_fast (&extrapool, runp->nwcs - 1);
- for (i = 1; i < runp->nwcs; ++i)
- obstack_int32_grow_fast (&extrapool, runp->wcs[i]);
- }
-
- /* Next entry. */
- lastp = runp;
- runp = runp->wcnext;
- }
- while (runp != NULL);
- }
- }
-
- tablewc.p = 6;
- tablewc.q = 10;
- collidx_table_init (&tablewc);
-
- wchead_table_iterate (&collate->wcheads, add_to_tablewc);
- }
+ memset (&atwc, 0, sizeof (atwc));
/* Now add the four tables. */
add_locale_collidx_table (&file, &tablewc);
@@ -2384,7 +2409,9 @@ collate_output (struct localedef_t *locale, const struct charmap_t *charmap,
uint32_t namelen = strlen (runp->name);
uint32_t hash = elem_hash (runp->name, namelen);
size_t idx = hash % elem_size;
+#ifndef NDEBUG
size_t start_idx = idx;
+#endif
if (elem_table[idx * 2] != 0)
{
diff --git a/libc/locale/programs/ld-ctype.c b/libc/locale/programs/ld-ctype.c
index 2558a7617..2a4eae7f3 100644
--- a/libc/locale/programs/ld-ctype.c
+++ b/libc/locale/programs/ld-ctype.c
@@ -3,8 +3,9 @@
Contributed by Ulrich Drepper <drepper@gnu.org>, 1995.
This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License version 2 as
- published by the Free Software Foundation.
+ it under the terms of the GNU General Public License as published
+ by the Free Software Foundation; version 2 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -689,7 +690,8 @@ character <SP> not defined in character map")));
/* Find the UCS value for `bytes'. */
int inner;
uint32_t wch;
- struct charseq *seq = charmap_find_symbol (charmap, bytes, nbytes);
+ struct charseq *seq
+ = charmap_find_symbol (charmap, (char *) bytes, nbytes);
if (seq == NULL)
wch = ILLEGAL_CHAR_VALUE;
@@ -790,7 +792,7 @@ character <SP> not defined in character map")));
for (cnt = 0; cnt < 10; ++cnt)
{
ctype->mbdigits[cnt] = charmap_find_symbol (charmap,
- digits + cnt, 1);
+ (char *) digits + cnt, 1);
if (ctype->mbdigits[cnt] == NULL)
{
ctype->mbdigits[cnt] = charmap_find_symbol (charmap,
@@ -3373,7 +3375,8 @@ set_class_defaults (struct locale_ctype_t *ctype,
for (cnt = ctype->outdigits_act; cnt < 10; ++cnt)
{
ctype->mboutdigits[cnt] = charmap_find_symbol (charmap,
- digits + cnt, 1);
+ (char *) digits + cnt,
+ 1);
if (ctype->mboutdigits[cnt] == NULL)
ctype->mboutdigits[cnt] = charmap_find_symbol (charmap,
@@ -3879,7 +3882,7 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap,
int inner;
uint32_t wch;
struct charseq *seq =
- charmap_find_symbol (charmap, bytes, nbytes);
+ charmap_find_symbol (charmap, (char *) bytes, nbytes);
if (seq == NULL)
wch = ILLEGAL_CHAR_VALUE;
diff --git a/libc/locale/programs/ld-identification.c b/libc/locale/programs/ld-identification.c
index 2a0b04556..883f727fb 100644
--- a/libc/locale/programs/ld-identification.c
+++ b/libc/locale/programs/ld-identification.c
@@ -3,8 +3,9 @@
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License version 2 as
- published by the Free Software Foundation.
+ it under the terms of the GNU General Public License as published
+ by the Free Software Foundation; version 2 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/libc/locale/programs/ld-measurement.c b/libc/locale/programs/ld-measurement.c
index 7c880b39a..3159af6a3 100644
--- a/libc/locale/programs/ld-measurement.c
+++ b/libc/locale/programs/ld-measurement.c
@@ -3,8 +3,9 @@
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License version 2 as
- published by the Free Software Foundation.
+ it under the terms of the GNU General Public License as published
+ by the Free Software Foundation; version 2 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/libc/locale/programs/ld-messages.c b/libc/locale/programs/ld-messages.c
index 7c9399802..af87b9b9e 100644
--- a/libc/locale/programs/ld-messages.c
+++ b/libc/locale/programs/ld-messages.c
@@ -3,8 +3,9 @@
Contributed by Ulrich Drepper <drepper@gnu.org>, 1995.
This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License version 2 as
- published by the Free Software Foundation.
+ it under the terms of the GNU General Public License as published
+ by the Free Software Foundation; version 2 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/libc/locale/programs/ld-monetary.c b/libc/locale/programs/ld-monetary.c
index 11409f090..8224fa048 100644
--- a/libc/locale/programs/ld-monetary.c
+++ b/libc/locale/programs/ld-monetary.c
@@ -1,10 +1,12 @@
-/* Copyright (C) 1995-1999,2000,2001,2002,2005 Free Software Foundation, Inc.
+/* Copyright (C) 1995-1999,2000,2001,2002,2005,2007
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.org>, 1995.
This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License version 2 as
- published by the Free Software Foundation.
+ it under the terms of the GNU General Public License as published
+ by the Free Software Foundation; version 2 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -278,13 +280,14 @@ not correspond to a valid name in ISO 4217"),
monetary->cat = initval; \
} \
else if ((monetary->cat < min || monetary->cat > max) \
+ && min < max \
&& !be_quiet && !nothing) \
WITH_CUR_LOCALE (error (0, 0, _("\
%s: value for field `%s' must be in range %d...%d"), \
"LC_MONETARY", #cat, min, max))
- TEST_ELEM (int_frac_digits, -128, 127, -1);
- TEST_ELEM (frac_digits, -128, 127, -1);
+ TEST_ELEM (int_frac_digits, 1, 0, -1);
+ TEST_ELEM (frac_digits, 1, 0, -1);
TEST_ELEM (p_cs_precedes, -1, 1, -1);
TEST_ELEM (p_sep_by_space, -1, 2, -1);
TEST_ELEM (n_cs_precedes, -1, 1, -1);
diff --git a/libc/locale/programs/ld-name.c b/libc/locale/programs/ld-name.c
index 4b90660cd..8388741f2 100644
--- a/libc/locale/programs/ld-name.c
+++ b/libc/locale/programs/ld-name.c
@@ -3,8 +3,9 @@
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License version 2 as
- published by the Free Software Foundation.
+ it under the terms of the GNU General Public License as published
+ by the Free Software Foundation; version 2 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/libc/locale/programs/ld-numeric.c b/libc/locale/programs/ld-numeric.c
index af255a836..ea50ce818 100644
--- a/libc/locale/programs/ld-numeric.c
+++ b/libc/locale/programs/ld-numeric.c
@@ -3,8 +3,9 @@
Contributed by Ulrich Drepper <drepper@gnu.org>, 1995.
This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License version 2 as
- published by the Free Software Foundation.
+ it under the terms of the GNU General Public License as published
+ by the Free Software Foundation; version 2 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/libc/locale/programs/ld-paper.c b/libc/locale/programs/ld-paper.c
index e77632ec0..473e6a881 100644
--- a/libc/locale/programs/ld-paper.c
+++ b/libc/locale/programs/ld-paper.c
@@ -3,8 +3,9 @@
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License version 2 as
- published by the Free Software Foundation.
+ it under the terms of the GNU General Public License as published
+ by the Free Software Foundation; version 2 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/libc/locale/programs/ld-telephone.c b/libc/locale/programs/ld-telephone.c
index dc3d59dc6..cc4edac72 100644
--- a/libc/locale/programs/ld-telephone.c
+++ b/libc/locale/programs/ld-telephone.c
@@ -3,8 +3,9 @@
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License version 2 as
- published by the Free Software Foundation.
+ it under the terms of the GNU General Public License as published
+ by the Free Software Foundation; version 2 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/libc/locale/programs/ld-time.c b/libc/locale/programs/ld-time.c
index d6a1c6db1..0fdfa3a93 100644
--- a/libc/locale/programs/ld-time.c
+++ b/libc/locale/programs/ld-time.c
@@ -3,8 +3,9 @@
Contributed by Ulrich Drepper <drepper@gnu.org>, 1995.
This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License version 2 as
- published by the Free Software Foundation.
+ it under the terms of the GNU General Public License as published
+ by the Free Software Foundation; version 2 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/libc/locale/programs/linereader.c b/libc/locale/programs/linereader.c
index 3d6d2b197..64b2f70df 100644
--- a/libc/locale/programs/linereader.c
+++ b/libc/locale/programs/linereader.c
@@ -3,8 +3,9 @@
Contributed by Ulrich Drepper <drepper@gnu.org>, 1996.
This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License version 2 as
- published by the Free Software Foundation.
+ it under the terms of the GNU General Public License as published
+ by the Free Software Foundation; version 2 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/libc/locale/programs/linereader.h b/libc/locale/programs/linereader.h
index d4d7e830a..e0c844e5b 100644
--- a/libc/locale/programs/linereader.h
+++ b/libc/locale/programs/linereader.h
@@ -3,8 +3,9 @@
Contributed by Ulrich Drepper, <drepper@gnu.org>.
This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License version 2 as
- published by the Free Software Foundation.
+ it under the terms of the GNU General Public License as published
+ by the Free Software Foundation; version 2 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/libc/locale/programs/locale-spec.c b/libc/locale/programs/locale-spec.c
index 6ad3d95ef..6334f4c5f 100644
--- a/libc/locale/programs/locale-spec.c
+++ b/libc/locale/programs/locale-spec.c
@@ -4,8 +4,9 @@
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License version 2 as
- published by the Free Software Foundation.
+ it under the terms of the GNU General Public License as published
+ by the Free Software Foundation; version 2 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/libc/locale/programs/locale.c b/libc/locale/programs/locale.c
index cc3082d48..8322fc0d7 100644
--- a/libc/locale/programs/locale.c
+++ b/libc/locale/programs/locale.c
@@ -4,8 +4,9 @@
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1995.
This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License version 2 as
- published by the Free Software Foundation.
+ it under the terms of the GNU General Public License as published
+ by the Free Software Foundation; version 2 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/libc/locale/programs/localedef.c b/libc/locale/programs/localedef.c
index cabc18bf4..2b544056e 100644
--- a/libc/locale/programs/localedef.c
+++ b/libc/locale/programs/localedef.c
@@ -3,8 +3,9 @@
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1995.
This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License version 2 as
- published by the Free Software Foundation.
+ it under the terms of the GNU General Public License as published
+ by the Free Software Foundation; version 2 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/libc/locale/programs/localedef.h b/libc/locale/programs/localedef.h
index f8cc4ca9c..bdff9e6f2 100644
--- a/libc/locale/programs/localedef.h
+++ b/libc/locale/programs/localedef.h
@@ -4,8 +4,9 @@
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License version 2 as
- published by the Free Software Foundation.
+ it under the terms of the GNU General Public License as published
+ by the Free Software Foundation; version 2 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/libc/locale/programs/locarchive.c b/libc/locale/programs/locarchive.c
index c0ab810bb..c576127b5 100644
--- a/libc/locale/programs/locarchive.c
+++ b/libc/locale/programs/locarchive.c
@@ -3,8 +3,9 @@
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License version 2 as
- published by the Free Software Foundation.
+ it under the terms of the GNU General Public License as published
+ by the Free Software Foundation; version 2 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/libc/locale/programs/locfile-kw.gperf b/libc/locale/programs/locfile-kw.gperf
index efdb9afab..936256ab3 100644
--- a/libc/locale/programs/locfile-kw.gperf
+++ b/libc/locale/programs/locfile-kw.gperf
@@ -4,8 +4,9 @@
Contributed by Ulrich Drepper <drepper@gnu.org>, 1996.
This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License version 2 as
- published by the Free Software Foundation.
+ it under the terms of the GNU General Public License as published
+ by the Free Software Foundation; version 2 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/libc/locale/programs/locfile-kw.h b/libc/locale/programs/locfile-kw.h
index 6ec2134cd..c883842b3 100644
--- a/libc/locale/programs/locfile-kw.h
+++ b/libc/locale/programs/locfile-kw.h
@@ -35,8 +35,9 @@
Contributed by Ulrich Drepper <drepper@gnu.org>, 1996.
This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License version 2 as
- published by the Free Software Foundation.
+ it under the terms of the GNU General Public License as published
+ by the Free Software Foundation; version 2 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/libc/locale/programs/locfile-token.h b/libc/locale/programs/locfile-token.h
index beb979c63..d6db1a778 100644
--- a/libc/locale/programs/locfile-token.h
+++ b/libc/locale/programs/locfile-token.h
@@ -3,8 +3,9 @@
Contributed by Ulrich Drepper <drepper@gnu.org>, 1996.
This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License version 2 as
- published by the Free Software Foundation.
+ it under the terms of the GNU General Public License as published
+ by the Free Software Foundation; version 2 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/libc/locale/programs/locfile.c b/libc/locale/programs/locfile.c
index 8ba3b7404..1f08c7c4d 100644
--- a/libc/locale/programs/locfile.c
+++ b/libc/locale/programs/locfile.c
@@ -3,8 +3,9 @@
Contributed by Ulrich Drepper <drepper@gnu.org>, 1996.
This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License version 2 as
- published by the Free Software Foundation.
+ it under the terms of the GNU General Public License as published
+ by the Free Software Foundation; version 2 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/libc/locale/programs/locfile.h b/libc/locale/programs/locfile.h
index 5116283eb..414deeed5 100644
--- a/libc/locale/programs/locfile.h
+++ b/libc/locale/programs/locfile.h
@@ -3,8 +3,9 @@
Contributed by Ulrich Drepper <drepper@gnu.org>, 1996.
This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License version 2 as
- published by the Free Software Foundation.
+ it under the terms of the GNU General Public License as published
+ by the Free Software Foundation; version 2 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/libc/locale/programs/repertoire.c b/libc/locale/programs/repertoire.c
index b6c0a6ad5..cc83374c9 100644
--- a/libc/locale/programs/repertoire.c
+++ b/libc/locale/programs/repertoire.c
@@ -1,10 +1,11 @@
-/* Copyright (C) 1998-2002,2004,2005 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2002,2004,2005,2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License version 2 as
- published by the Free Software Foundation.
+ it under the terms of the GNU General Public License as published
+ by the Free Software Foundation; version 2 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -392,7 +393,7 @@ repertoire_new_char (struct linereader *lr, hash_table *ht, hash_table *rt,
const char *cp;
char *buf = NULL;
int prefix_len, len1, len2;
- unsigned int from_nr, to_nr, cnt;
+ unsigned long int from_nr, to_nr, cnt;
if (to == NULL)
{
@@ -461,7 +462,7 @@ hexadecimal range format should use only capital characters"));
{
uint32_t this_value = value + (cnt - from_nr);
- obstack_printf (ob, decimal_ellipsis ? "%.*s%0*d" : "%.*s%0*X",
+ obstack_printf (ob, decimal_ellipsis ? "%.*s%0*ld" : "%.*s%0*lX",
prefix_len, from, len1 - prefix_len, cnt);
obstack_1grow (ob, '\0');
diff --git a/libc/locale/programs/repertoire.h b/libc/locale/programs/repertoire.h
index 75877044c..2e1f7ae19 100644
--- a/libc/locale/programs/repertoire.h
+++ b/libc/locale/programs/repertoire.h
@@ -3,8 +3,9 @@
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License version 2 as
- published by the Free Software Foundation.
+ it under the terms of the GNU General Public License as published
+ by the Free Software Foundation; version 2 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/libc/locale/programs/simple-hash.c b/libc/locale/programs/simple-hash.c
index de8998cc7..5bd65f247 100644
--- a/libc/locale/programs/simple-hash.c
+++ b/libc/locale/programs/simple-hash.c
@@ -4,8 +4,9 @@
Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, October 1994.
This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License version 2 as
- published by the Free Software Foundation.
+ it under the terms of the GNU General Public License as published
+ by the Free Software Foundation; version 2 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/libc/locale/programs/simple-hash.h b/libc/locale/programs/simple-hash.h
index 7261ebc39..b41c233b0 100644
--- a/libc/locale/programs/simple-hash.h
+++ b/libc/locale/programs/simple-hash.h
@@ -3,8 +3,9 @@
Contributed by Ulrich Drepper <drepper@gnu.org>, 1995.
This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License version 2 as
- published by the Free Software Foundation.
+ it under the terms of the GNU General Public License as published
+ by the Free Software Foundation; version 2 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/libc/locale/programs/xmalloc.c b/libc/locale/programs/xmalloc.c
index a95dc5a40..a2eeda79b 100644
--- a/libc/locale/programs/xmalloc.c
+++ b/libc/locale/programs/xmalloc.c
@@ -4,8 +4,9 @@
This file is part of the GNU C Library.
This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License version 2 as
- published by the Free Software Foundation.
+ it under the terms of the GNU General Public License as published
+ by the Free Software Foundation; version 2 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/libc/locale/programs/xstrdup.c b/libc/locale/programs/xstrdup.c
index 12fb3a828..e6e302f41 100644
--- a/libc/locale/programs/xstrdup.c
+++ b/libc/locale/programs/xstrdup.c
@@ -3,8 +3,9 @@
This file is part of the GNU C Library.
This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License version 2 as
- published by the Free Software Foundation.
+ it under the terms of the GNU General Public License as published
+ by the Free Software Foundation; version 2 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/libc/locale/weightwc.h b/libc/locale/weightwc.h
index 436aa7e54..9ea1126a2 100644
--- a/libc/locale/weightwc.h
+++ b/libc/locale/weightwc.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2001,2003,2004,2005 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2001,2003,2004,2005,2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Ulrich Drepper, <drepper@cygnus.com>.
@@ -31,7 +31,7 @@ findidx (const wint_t **cpp)
/* Oh well, more than one sequence starting with this byte.
Search for the correct one. */
- const int32_t *cp = &extra[-i];
+ const int32_t *cp = (const int32_t *) &extra[-i];
while (1)
{
size_t nhere;