aboutsummaryrefslogtreecommitdiff
path: root/locale
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2007-07-31 17:46:17 +0000
committerJakub Jelinek <jakub@redhat.com>2007-07-31 17:46:17 +0000
commit8833066b122427710a9e14a888ce6cfa862332d3 (patch)
tree29591019d695919417b3698618d6a342e97381d6 /locale
parentfedca46896bdb702cb988837a0c2c5447e72ba2b (diff)
downloadglibc-8833066b122427710a9e14a888ce6cfa862332d3.zip
glibc-8833066b122427710a9e14a888ce6cfa862332d3.tar.gz
glibc-8833066b122427710a9e14a888ce6cfa862332d3.tar.bz2
Updated to fedora-glibc-20070731T1624cvs/fedora-glibc-2_6_90-1
Diffstat (limited to 'locale')
-rw-r--r--locale/programs/3level.h41
-rw-r--r--locale/programs/charmap-dir.c5
-rw-r--r--locale/programs/charmap-dir.h5
-rw-r--r--locale/programs/charmap-kw.gperf5
-rw-r--r--locale/programs/charmap-kw.h5
-rw-r--r--locale/programs/charmap.c5
-rw-r--r--locale/programs/charmap.h5
-rw-r--r--locale/programs/config.h5
-rw-r--r--locale/programs/ld-address.c5
-rw-r--r--locale/programs/ld-collate.c275
-rw-r--r--locale/programs/ld-ctype.c15
-rw-r--r--locale/programs/ld-identification.c5
-rw-r--r--locale/programs/ld-measurement.c5
-rw-r--r--locale/programs/ld-messages.c5
-rw-r--r--locale/programs/ld-monetary.c13
-rw-r--r--locale/programs/ld-name.c5
-rw-r--r--locale/programs/ld-numeric.c5
-rw-r--r--locale/programs/ld-paper.c5
-rw-r--r--locale/programs/ld-telephone.c5
-rw-r--r--locale/programs/ld-time.c5
-rw-r--r--locale/programs/linereader.c5
-rw-r--r--locale/programs/linereader.h5
-rw-r--r--locale/programs/locale-spec.c5
-rw-r--r--locale/programs/locale.c5
-rw-r--r--locale/programs/localedef.c5
-rw-r--r--locale/programs/localedef.h5
-rw-r--r--locale/programs/locarchive.c5
-rw-r--r--locale/programs/locfile-kw.gperf5
-rw-r--r--locale/programs/locfile-kw.h5
-rw-r--r--locale/programs/locfile-token.h5
-rw-r--r--locale/programs/locfile.c5
-rw-r--r--locale/programs/locfile.h5
-rw-r--r--locale/programs/repertoire.c11
-rw-r--r--locale/programs/repertoire.h5
-rw-r--r--locale/programs/simple-hash.c5
-rw-r--r--locale/programs/simple-hash.h5
-rw-r--r--locale/programs/xmalloc.c5
-rw-r--r--locale/programs/xstrdup.c5
-rw-r--r--locale/weightwc.h4
39 files changed, 276 insertions, 248 deletions
diff --git a/locale/programs/3level.h b/locale/programs/3level.h
index 88f1b49..cce925e 100644
--- a/locale/programs/3level.h
+++ b/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
@@ -202,42 +203,6 @@ CONCAT(TABLE,_iterate) (struct TABLE *t,
}
}
}
-
-/* GCC ATM seems to do a poor job with pointers to nested functions passed
- to inlined functions. Help it a little bit with this hack. */
-#define wchead_table_iterate(tp, fn) \
-do \
- { \
- struct wchead_table *t = (tp); \
- uint32_t index1; \
- for (index1 = 0; index1 < t->level1_size; index1++) \
- { \
- uint32_t lookup1 = t->level1[index1]; \
- if (lookup1 != ((uint32_t) ~0)) \
- { \
- uint32_t lookup1_shifted = lookup1 << t->q; \
- uint32_t index2; \
- for (index2 = 0; index2 < (1 << t->q); index2++) \
- { \
- uint32_t lookup2 = t->level2[index2 + lookup1_shifted]; \
- if (lookup2 != ((uint32_t) ~0)) \
- { \
- uint32_t lookup2_shifted = lookup2 << t->p; \
- uint32_t index3; \
- for (index3 = 0; index3 < (1 << t->p); index3++) \
- { \
- struct element_t *lookup3 \
- = t->level3[index3 + lookup2_shifted]; \
- if (lookup3 != NULL) \
- fn ((((index1 << t->q) + index2) << t->p) + index3, \
- lookup3); \
- } \
- } \
- } \
- } \
- } \
- } while (0)
-
#endif
#ifndef NO_FINALIZE
diff --git a/locale/programs/charmap-dir.c b/locale/programs/charmap-dir.c
index 07d0cdc..e192edd 100644
--- a/locale/programs/charmap-dir.c
+++ b/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/locale/programs/charmap-dir.h b/locale/programs/charmap-dir.h
index 256db8d..028f926 100644
--- a/locale/programs/charmap-dir.h
+++ b/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/locale/programs/charmap-kw.gperf b/locale/programs/charmap-kw.gperf
index 64f7452..03fea94 100644
--- a/locale/programs/charmap-kw.gperf
+++ b/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/locale/programs/charmap-kw.h b/locale/programs/charmap-kw.h
index d7d8577..8ad6421 100644
--- a/locale/programs/charmap-kw.h
+++ b/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/locale/programs/charmap.c b/locale/programs/charmap.c
index dbc1101..ef52821 100644
--- a/locale/programs/charmap.c
+++ b/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/locale/programs/charmap.h b/locale/programs/charmap.h
index fd711f2..11fddd7 100644
--- a/locale/programs/charmap.h
+++ b/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/locale/programs/config.h b/locale/programs/config.h
index 6f9bfde..2f66997 100644
--- a/locale/programs/config.h
+++ b/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/locale/programs/ld-address.c b/locale/programs/ld-address.c
index dac8551..6343b3c 100644
--- a/locale/programs/ld-address.c
+++ b/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/locale/programs/ld-collate.c b/locale/programs/ld-collate.c
index 56f3180..09237ea 100644
--- a/locale/programs/ld-collate.c
+++ b/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
@@ -989,7 +990,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);
@@ -1384,7 +1386,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);
@@ -1935,6 +1938,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 ((wchar_t *) runp->wcs,
+ (wchar_t *)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 ((wchar_t *) runp->wcs,
+ (wchar_t *)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,
@@ -2292,132 +2426,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;
-
- collidx_table_add (&tablewc, ch,
- -(obstack_object_size (&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 ((wchar_t *) runp->wcs,
- (wchar_t *)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 ((wchar_t *) runp->wcs,
- (wchar_t *)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);
-
- 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 (&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);
- }
- }
+ atwc.weightpool = &weightpool;
+ atwc.extrapool = &extrapool;
+ atwc.indpool = &indirectpool;
+ atwc.collate = collate;
+ atwc.tablewc = &tablewc;
- tablewc.p = 6;
- tablewc.q = 10;
- collidx_table_init (&tablewc);
+ wchead_table_iterate (&collate->wcheads, add_to_tablewc);
- wchead_table_iterate (&collate->wcheads, add_to_tablewc);
+ memset (&atwc, 0, sizeof (atwc));
- collidx_table_finalize (&tablewc);
- }
+ collidx_table_finalize (&tablewc);
/* Now add the four tables. */
assert (cnt == _NL_ITEM_INDEX (_NL_COLLATE_TABLEWC));
diff --git a/locale/programs/ld-ctype.c b/locale/programs/ld-ctype.c
index 0e4b96d..d4474bf 100644
--- a/locale/programs/ld-ctype.c
+++ b/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
@@ -648,7 +649,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;
@@ -749,7 +751,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,
@@ -3469,7 +3471,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,
@@ -4024,7 +4027,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/locale/programs/ld-identification.c b/locale/programs/ld-identification.c
index d050f7a..ae6a606 100644
--- a/locale/programs/ld-identification.c
+++ b/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/locale/programs/ld-measurement.c b/locale/programs/ld-measurement.c
index 6a9b847..8abe38e 100644
--- a/locale/programs/ld-measurement.c
+++ b/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/locale/programs/ld-messages.c b/locale/programs/ld-messages.c
index e98574f..7e41a19 100644
--- a/locale/programs/ld-messages.c
+++ b/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/locale/programs/ld-monetary.c b/locale/programs/ld-monetary.c
index d493a14..b8d291e 100644
--- a/locale/programs/ld-monetary.c
+++ b/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/locale/programs/ld-name.c b/locale/programs/ld-name.c
index c1153fd..9f32882 100644
--- a/locale/programs/ld-name.c
+++ b/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/locale/programs/ld-numeric.c b/locale/programs/ld-numeric.c
index d7ffe75..b1a89e2 100644
--- a/locale/programs/ld-numeric.c
+++ b/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/locale/programs/ld-paper.c b/locale/programs/ld-paper.c
index 38f9af3..eda94f6 100644
--- a/locale/programs/ld-paper.c
+++ b/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/locale/programs/ld-telephone.c b/locale/programs/ld-telephone.c
index 4075a14..108bdc7 100644
--- a/locale/programs/ld-telephone.c
+++ b/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/locale/programs/ld-time.c b/locale/programs/ld-time.c
index 0d19350..30c1353 100644
--- a/locale/programs/ld-time.c
+++ b/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/locale/programs/linereader.c b/locale/programs/linereader.c
index 4b38fd2..8a04e32 100644
--- a/locale/programs/linereader.c
+++ b/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/locale/programs/linereader.h b/locale/programs/linereader.h
index d4d7e83..e0c844e 100644
--- a/locale/programs/linereader.h
+++ b/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/locale/programs/locale-spec.c b/locale/programs/locale-spec.c
index 6ad3d95..6334f4c 100644
--- a/locale/programs/locale-spec.c
+++ b/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/locale/programs/locale.c b/locale/programs/locale.c
index cc3082d..8322fc0 100644
--- a/locale/programs/locale.c
+++ b/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/locale/programs/localedef.c b/locale/programs/localedef.c
index 04dcf8e..3e4d114 100644
--- a/locale/programs/localedef.c
+++ b/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/locale/programs/localedef.h b/locale/programs/localedef.h
index f8cc4ca..bdff9e6 100644
--- a/locale/programs/localedef.h
+++ b/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/locale/programs/locarchive.c b/locale/programs/locarchive.c
index c1242db..9e316d3 100644
--- a/locale/programs/locarchive.c
+++ b/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/locale/programs/locfile-kw.gperf b/locale/programs/locfile-kw.gperf
index efdb9af..936256a 100644
--- a/locale/programs/locfile-kw.gperf
+++ b/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/locale/programs/locfile-kw.h b/locale/programs/locfile-kw.h
index 6ec2134..c883842 100644
--- a/locale/programs/locfile-kw.h
+++ b/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/locale/programs/locfile-token.h b/locale/programs/locfile-token.h
index beb979c..d6db1a7 100644
--- a/locale/programs/locfile-token.h
+++ b/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/locale/programs/locfile.c b/locale/programs/locfile.c
index ae8ce73..17cd020 100644
--- a/locale/programs/locfile.c
+++ b/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/locale/programs/locfile.h b/locale/programs/locfile.h
index f6290f0..6e5341f 100644
--- a/locale/programs/locfile.h
+++ b/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/locale/programs/repertoire.c b/locale/programs/repertoire.c
index b6c0a6a..cc83374 100644
--- a/locale/programs/repertoire.c
+++ b/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/locale/programs/repertoire.h b/locale/programs/repertoire.h
index 7587704..2e1f7ae 100644
--- a/locale/programs/repertoire.h
+++ b/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/locale/programs/simple-hash.c b/locale/programs/simple-hash.c
index de8998c..5bd65f2 100644
--- a/locale/programs/simple-hash.c
+++ b/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/locale/programs/simple-hash.h b/locale/programs/simple-hash.h
index 7261ebc..b41c233 100644
--- a/locale/programs/simple-hash.h
+++ b/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/locale/programs/xmalloc.c b/locale/programs/xmalloc.c
index a95dc5a..a2eeda7 100644
--- a/locale/programs/xmalloc.c
+++ b/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/locale/programs/xstrdup.c b/locale/programs/xstrdup.c
index 12fb3a8..e6e302f 100644
--- a/locale/programs/xstrdup.c
+++ b/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/locale/weightwc.h b/locale/weightwc.h
index 436aa7e..9ea1126 100644
--- a/locale/weightwc.h
+++ b/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;