From 336d872fdf9ed4888c9da6fcb4d3da4ea60f2bfd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fran=C3=A7ois=20Pinard?= Date: Wed, 5 Mar 2008 14:54:49 -0500 Subject: [PATCH] prototype of hasher functions --- src/ChangeLog | 6 ++++++ src/combine.c | 8 ++++---- src/html.c | 8 ++++---- src/names.c | 4 ++-- src/recode.c | 4 ++-- src/testdump.c | 4 ++-- 6 files changed, 20 insertions(+), 14 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 4374dbd..675186d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2008-03-05 François Pinard + + * combine.c, html.c, names.c, recode.c, testdump.c: Declare the + various hasher functions according to the prototype in hash.h. + Reported by Bruno Haible. + 2008-02-27 François Pinard * hash.c: Revert last change (2008-02-21). The renaming of symbols diff --git a/src/combine.c b/src/combine.c index d5626ee..5263b6f 100644 --- a/src/combine.c +++ b/src/combine.c @@ -62,8 +62,8 @@ | Initialize for exploding. | `---------------------------*/ -static unsigned -combined_hash (const void *void_data, unsigned table_size) +static size_t +combined_hash (const void *void_data, size_t table_size) { const unsigned short *data = void_data; @@ -262,8 +262,8 @@ struct state | Initialize for combining. | `---------------------------*/ -static unsigned -state_hash (const void *void_data, unsigned table_size) +static size_t +state_hash (const void *void_data, size_t table_size) { const struct state *data = void_data; diff --git a/src/html.c b/src/html.c index f8ba8d8..1808f7c 100644 --- a/src/html.c +++ b/src/html.c @@ -387,8 +387,8 @@ static struct ucs2_to_string translations [] = | Return hash value given TABLE_SIZE. | `-------------------------------------*/ -static unsigned -code_hash (const void *void_data, unsigned table_size) +static size_t +code_hash (const void *void_data, size_t table_size) { struct ucs2_to_string const *data = void_data; @@ -568,8 +568,8 @@ transform_ucs2_html (RECODE_SUBTASK subtask) | Return hash value given TABLE_SIZE. | `-------------------------------------*/ -static unsigned -string_hash (const void *void_data, unsigned table_size) +static size_t +string_hash (const void *void_data, size_t table_size) { struct ucs2_to_string const *data = void_data; diff --git a/src/names.c b/src/names.c index 637c4b8..8fcaa28 100644 --- a/src/names.c +++ b/src/names.c @@ -84,8 +84,8 @@ check_restricted (RECODE_CONST_OUTER outer, | Prepare aliases for initialisation. | `-------------------------------------*/ -static unsigned -alias_hasher (const void *void_alias, unsigned limit) +static size_t +alias_hasher (const void *void_alias, size_t limit) { RECODE_CONST_ALIAS alias = void_alias; diff --git a/src/recode.c b/src/recode.c index e56125e..746da57 100644 --- a/src/recode.c +++ b/src/recode.c @@ -388,8 +388,8 @@ transform_byte_to_ucs2 (RECODE_SUBTASK subtask) | Recode a file from double byte UCS-2 characters to one byte characters. | `-------------------------------------------------------------------------*/ -static unsigned -ucs2_to_byte_hash (const void *void_data, unsigned table_size) +static size_t +ucs2_to_byte_hash (const void *void_data, size_t table_size) { const struct ucs2_to_byte *data = void_data; diff --git a/src/testdump.c b/src/testdump.c index 2f46742..a690774 100644 --- a/src/testdump.c +++ b/src/testdump.c @@ -118,8 +118,8 @@ struct ucs2_to_count unsigned count; /* corresponding count */ }; -static unsigned -ucs2_to_count_hash (const void *void_data, unsigned table_size) +static size_t +ucs2_to_count_hash (const void *void_data, size_t table_size) { const struct ucs2_to_count *data = void_data; -- 2.40.0