diff options
author | Ulrich Drepper <drepper@redhat.com> | 2000-01-17 08:39:58 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2000-01-17 08:39:58 +0000 |
commit | 3c8333780571c599b97ac94f359c76e5c51434c7 (patch) | |
tree | 450633c50edeea61dbe75ca90d0166906b98ced4 /locale/programs/repertoire.c | |
parent | ebf282c9cfe083f0ace9a05d6aa421b6e32cc2f6 (diff) | |
download | glibc-3c8333780571c599b97ac94f359c76e5c51434c7.tar.gz glibc-3c8333780571c599b97ac94f359c76e5c51434c7.tar.xz glibc-3c8333780571c599b97ac94f359c76e5c51434c7.zip |
Update.
2000-01-17 Ulrich Drepper <drepper@cygnus.com> * locale/programs/repertoire.c (repertoire_read): Don't print error message when repertoire map is missing. (repertoire_complain): Print error message for missing map, but only once. * locale/programs/repertoire.h (repertoire_complain): Add prototype. * locale/programs/linereader.c (get_string): Prefer getting names from charseq entries. Try finding Uxxxxxxxx names in charmap before trying to map from repertoire.
Diffstat (limited to 'locale/programs/repertoire.c')
-rw-r--r-- | locale/programs/repertoire.c | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/locale/programs/repertoire.c b/locale/programs/repertoire.c index 9293c03b7e..91ed41e48a 100644 --- a/locale/programs/repertoire.c +++ b/locale/programs/repertoire.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. @@ -49,6 +49,10 @@ static int repertoire_compare (const void *p1, const void *p2); /* Already known repertoire maps. */ static void *known; +/* List of repertoire maps which are not available and which have been + reported to not be. */ +static void *unavailable; + struct repertoire_t * repertoire_read (const char *filename) @@ -115,10 +119,7 @@ repertoire_read (const char *filename) } if (repfile == NULL) - { - error (0, errno, _("repertoire map file `%s' not found"), filename); - return NULL; - } + return NULL; } /* We don't want symbolic names in string to be translated. */ @@ -333,6 +334,19 @@ argument to <%s> must be a single character"), } +void +repertoire_complain (const char *name) +{ + if (tfind (name, &unavailable, (__compar_fn_t) strcmp) == NULL) + { + error (0, errno, _("repertoire map file `%s' not found"), name); + + /* Remember that we reported this map. */ + tsearch (name, &unavailable, (__compar_fn_t) strcmp); + } +} + + static int repertoire_compare (const void *p1, const void *p2) { |