X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/a4431563e8a1595ea1c4d3b1af3b6128ac005f21..7918f2440534993bdda324da839b2ea9a3884757:/rsync.h diff --git a/rsync.h b/rsync.h index 6da67e81..bb530bd2 100644 --- a/rsync.h +++ b/rsync.h @@ -491,11 +491,26 @@ enum msgcode { # 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; + 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