X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?p=YACASL2.git;a=blobdiff_plain;f=include%2Fhash.h;h=3c05972890a2264ac26a7042e78559e95c34bca2;hp=caac5f181985fe66a757c3892f486720c9ecc5c9;hb=d1f82970bf7d41db2fea11b08cd8e308f6cb8138;hpb=2b0ff8e75f11c5fb58e16e95d8195d6f1252c97c diff --git a/include/hash.h b/include/hash.h index caac5f1..3c05972 100644 --- a/include/hash.h +++ b/include/hash.h @@ -1,17 +1,17 @@ #ifndef YACASL2_HASH_INCLUDED #define YACASL2_HASH_INCLUDED -#ifndef ARRAYSIZE -#define ARRAYSIZE(array) (sizeof(array)/sizeof(array[0])) -#endif - -/* ハッシュ共用体の型 */ +/** + * ハッシュ共用体の型 + */ typedef enum { CHARS = 0, INT = 1, } UTYPE; -/* ハッシュ共用体 */ +/** + * ハッシュ共用体 + */ typedef struct { UTYPE type; union { @@ -20,10 +20,9 @@ typedef struct { } val; } HKEY; -/* ハッシュ表のサイズを決めるため、引数の数値未満で最大の素数を返す */ -int hashtabsize(int size); - -/* ハッシュ値を取得する */ +/** + * ハッシュ値を取得する + */ unsigned hash(int keyc, HKEY *keyv[], int tabsize); #endif