(repertoire_find_value): New function.

(repertoire_read): Remove third parameter from charset_new_char call.
This commit is contained in:
Ulrich Drepper 2000-02-13 07:30:47 +00:00
parent d7a5e01348
commit 26ddfa2730

View File

@ -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 <drepper@cygnus.com>, 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. */