From 695aa5297743cd2c564be551f2659a7f58d0e437 Mon Sep 17 00:00:00 2001 From: fredrik Date: Fri, 21 Oct 2005 23:58:00 +0000 Subject: [PATCH] Add pushtigertree. git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/doldaconnect@395 959494ce-11ee-0310-bf91-de5d638817bd --- daemon/tiger.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/daemon/tiger.c b/daemon/tiger.c index 6465dbb..c113aa7 100644 --- a/daemon/tiger.c +++ b/daemon/tiger.c @@ -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; -- 2.11.0