From: fredrik Date: Fri, 21 Oct 2005 23:58:00 +0000 (+0000) Subject: Add pushtigertree. X-Git-Tag: 0.1~180 X-Git-Url: http://git.dolda2000.com/gitweb/?a=commitdiff_plain;h=695aa5297743cd2c564be551f2659a7f58d0e437;p=doldaconnect.git Add pushtigertree. git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/doldaconnect@395 959494ce-11ee-0310-bf91-de5d638817bd --- 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;