changelog shortlog tags branches files raw gz bz2 help

Mercurial > hg > ventivac / changeset: rename Entryrabin to Entryvarblocks.

changeset 60: 63be518910d8
parent 59: 97f506e204f5
child 61: fc315481eafc
author: Mechiel Lukkien <mechiel@ueber.net>
date: Fri, 13 Jul 2007 16:03:48 +0200
files: appl/lib/vac.b module/vac.m
description: rename Entryrabin to Entryvarblocks.

rabin is too specific, other ways of finding block bounderies resulting in variable block sizes may be found.
     1.1--- a/appl/lib/vac.b	Fri Jul 13 15:56:15 2007 +0200
     1.2+++ b/appl/lib/vac.b	Fri Jul 13 16:03:48 2007 +0200
     1.3@@ -183,7 +183,7 @@
     1.4 	i += Scoresize;
     1.5 	if((e.flags & Entryactive) == 0)
     1.6 		return e;
     1.7-	rabin := e.flags&Entryrabin;
     1.8+	rabin := e.flags&Entryvarblocks;
     1.9 	if(!checksize(e.psize) || (rabin && e.dsize != 0 || !rabin && !checksize(e.dsize))){
    1.10 		sys->werrstr(sys->sprint("bad blocksize (%d or %d)", e.psize, e.dsize));
    1.11 		return nil;
    1.12@@ -459,7 +459,7 @@
    1.13 			if(f.dtype & Dirtype)
    1.14 				flags |= Entrydir;
    1.15 			if(f.rabin)
    1.16-				flags |= Entryrabin;
    1.17+				flags |= Entryvarblocks;
    1.18 			d := f.p[i].data();
    1.19 			if(len d == 0)
    1.20 				d = Score.zero().a;
    1.21@@ -715,7 +715,7 @@
    1.22 
    1.23 	coffset := big 0;
    1.24 	esize := Scoresize;
    1.25-	if(s.e.flags&Entryrabin)
    1.26+	if(s.e.flags&Entryvarblocks)
    1.27 		esize += 8;
    1.28 	last := s.e.score;
    1.29 	tlen := s.e.size;
    1.30@@ -785,7 +785,7 @@
    1.31 
    1.32 Vacfile.pread(v: self ref Vacfile, d: array of byte, n: int, offset: big): int
    1.33 {
    1.34-	if(v.s.e.flags&Entryrabin) {
    1.35+	if(v.s.e.flags&Entryvarblocks) {
    1.36 		buf := v.s.oget(offset);
    1.37 		if(buf == nil)
    1.38 			return -1;
     2.1--- a/module/vac.m	Fri Jul 13 15:56:15 2007 +0200
     2.2+++ b/module/vac.m	Fri Jul 13 16:03:48 2007 +0200
     2.3@@ -36,7 +36,7 @@
     2.4 	Entrydepthshift:	con 2;	# shift for pointer depth
     2.5 	Entrydepthmask:	con (16r7<<2);	# mask for pointer depth
     2.6 	Entrylocal:	con (1<<5);	# used for local storage: should not be set for venti blocks
     2.7-	Entryrabin:	con (1<<6);	# xxx look at vac/fossil, perhaps they use more bits as well... also, this bits meaning might change!
     2.8+	Entryvarblocks:	con (1<<7);	# variable block size, e.g. for rabin fingerprinting
     2.9 
    2.10 	Root: adt {
    2.11 		version:	int;