From e660c6e6b09851f802207dcbeea8083a9c4e6803 Mon Sep 17 00:00:00 2001 From: tomo Date: Thu, 28 Aug 2003 16:16:33 +0000 Subject: [PATCH] Include "chise-name.h". (chise_name_table_put): Use instead of for key. (chise_name_table_get): Likewise. --- name.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/name.c b/name.c index 501df93..607f006 100644 --- a/name.c +++ b/name.c @@ -1,16 +1,17 @@ #include +#include "chise-name.h" -typedef struct CHISE_HASH_TABLE_ENTRY +struct CHISE_HASH_TABLE_ENTRY { void *key; void *value; -} CHISE_HASH_TABLE_ENTRY; +}; -typedef struct CHISE_HASH_TABLE +struct CHISE_HASH_TABLE { size_t size; CHISE_HASH_TABLE_ENTRY *data; -} CHISE_HASH_TABLE; +}; CHISE_HASH_TABLE* chise_make_hash_table (size_t size) @@ -63,9 +64,6 @@ chise_hash_c_string (const unsigned char *ptr) } -typedef CHISE_HASH_TABLE CHISE_NAME_TABLE; -typedef CHISE_HASH_TABLE_ENTRY CHISE_NAME_TABLE_ENTRY; - CHISE_NAME_TABLE* chise_make_name_table () { @@ -80,7 +78,7 @@ chise_destroy_name_table (CHISE_NAME_TABLE* table) int chise_name_table_put (CHISE_NAME_TABLE* table, - unsigned char *key, void *value) + const unsigned char *key, void *value) { int i, index; CHISE_NAME_TABLE_ENTRY* entry; @@ -116,7 +114,7 @@ chise_name_table_put (CHISE_NAME_TABLE* table, void * chise_name_table_get (CHISE_NAME_TABLE* table, - unsigned char *key) + const unsigned char *key) { int i, index; CHISE_NAME_TABLE_ENTRY entry; -- 1.7.10.4