Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3692339
)
Updated hashtable structures.
author
Wayne Davison
<wayned@samba.org>
Mon, 3 Sep 2007 04:59:05 +0000
(
04:59
+0000)
committer
Wayne Davison
<wayned@samba.org>
Mon, 3 Sep 2007 04:59:05 +0000
(
04:59
+0000)
rsync.h
patch
|
blob
|
blame
|
history
diff --git
a/rsync.h
b/rsync.h
index
6da67e8
..
bb530bd
100644
(file)
--- a/
rsync.h
+++ b/
rsync.h
@@
-491,11
+491,26
@@
enum msgcode {
# define SIZEOF_INT64 SIZEOF_OFF_T
#endif
# define SIZEOF_INT64 SIZEOF_OFF_T
#endif
-struct idev_node {
- int64 key;
+struct hashtable {
+ void *nodes;
+ int32 size, entries;
+ uint32 node_size;
+};
+
+struct ht_int32_node {
+ void *data;
+ int32 key;
+};
+
+struct ht_int64_node {
void *data;
void *data;
+ int64 key;
};
};
+#define HT_NODE(tbl, bkts, i) ((void*)((char*)(bkts) + (i)*(tbl)->node_size))
+#define HT_KEY(node, k64) ((k64)? ((struct ht_int64_node*)(node))->key \
+ : (int64)((struct ht_int32_node*)(node))->key)
+
#ifndef MIN
#define MIN(a,b) ((a)<(b)?(a):(b))
#endif
#ifndef MIN
#define MIN(a,b) ((a)<(b)?(a):(b))
#endif