projects
/
YACASL2.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
b673d535f3941c9723c423505b849ad7d3937a56
[YACASL2.git]
/
hash.c
1
/* ハッシュ値を取得する */
2
unsigned hash(const char *key, int size){
3
unsigned hashval;
4
5
for(hashval = 0; *key != '\0'; key++){
6
hashval = *key + 31 * hashval;
7
}
8
return hashval % size;
9
}