From: Ulrich Drepper Date: Sun, 13 Feb 2000 07:30:47 +0000 (+0000) Subject: (repertoire_find_value): New function. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=26ddfa273047e15f97d6abf70dd0e4add6b59063;p=thirdparty%2Fglibc.git (repertoire_find_value): New function. (repertoire_read): Remove third parameter from charset_new_char call. --- diff --git a/locale/programs/repertoire.c b/locale/programs/repertoire.c index e7040a0e2c5..7d876ae2011 100644 --- a/locale/programs/repertoire.c +++ b/locale/programs/repertoire.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. @@ -41,6 +41,18 @@ extern void *xmalloc (size_t __n); static const struct keyword_t *repertoiremap_hash (const char *str, int len); +uint32_t +repertoire_find_value (const hash_table *ht, const char *name, size_t len) +{ + void *result; + + if (find_entry ((hash_table *) ht, name, len, &result) < 0) + return ILLEGAL_CHAR_VALUE; + + return (unsigned int) ((unsigned long int) result); +} + + struct repertoire_t * repertoire_read (const char *filename) { @@ -242,7 +254,7 @@ argument to <%s> must be a single character"), } /* We've found a new valid definition. */ - charset_new_char (repfile, &result->char_table, 4, + charset_new_char (repfile, &result->char_table, now->val.charcode.val, from_name, to_name); /* Ignore the rest of the line. */