Add pushtigertree.
authorfredrik <fredrik@959494ce-11ee-0310-bf91-de5d638817bd>
Fri, 21 Oct 2005 23:58:00 +0000 (23:58 +0000)
committerfredrik <fredrik@959494ce-11ee-0310-bf91-de5d638817bd>
Fri, 21 Oct 2005 23:58:00 +0000 (23:58 +0000)
git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/doldaconnect@395 959494ce-11ee-0310-bf91-de5d638817bd

daemon/tiger.c

index 6465dbb..c113aa7 100644 (file)
@@ -187,6 +187,15 @@ static void combine(struct tigertreehash *tth)
     restiger(&th, tth->stack[tth->depth - 1]);
 }
 
+void pushtigertree(struct tigertreehash *tth, char *buf)
+{
+    int nb;
+    
+    memcpy(tth->stack[tth->depth++], buf, 24);
+    for(nb = ++tth->blocks; !(nb & 1); nb >>= 1)
+       combine(tth);
+}
+
 static void dotreeblock(struct tigertreehash *tth)
 {
     struct tigerhash th;