projects
/
YACASL2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
14bcf5f
)
ラベルハッシュ表作成時にhash関数を使用するよう修正
author
j8takagi
<j8takagi@nifty.com>
Fri, 29 Jan 2010 23:52:18 +0000
(08:52 +0900)
committer
j8takagi
<j8takagi@nifty.com>
Fri, 29 Jan 2010 23:52:18 +0000
(08:52 +0900)
include/hash.h
[new file with mode: 0644]
patch
|
blob
diff --git a/include/hash.h
b/include/hash.h
new file mode 100644
(file)
index 0000000..
16f02b2
--- /dev/null
+++ b/
include/hash.h
@@ -0,0
+1,17
@@
+/* ハッシュ共用体の型 */
+typedef enum {
+ CHARS = 0,
+ INT = 1,
+} UTYPE;
+
+/* ハッシュ共用体 */
+typedef struct {
+ UTYPE type;
+ union {
+ char *s;
+ int i;
+ } val;
+} HKEY;
+
+/* ハッシュ値を取得する */
+unsigned hash(int keyc, HKEY *keyv[], int tabsize);