changelog shortlog tags branches files raw gz bz2 help

Mercurial > hg > ventivac / changeset: remove some debug messages.

changeset 139: 260aaad09159
parent 138: 4a91807ed74a
child 140: 237e0bba7234
author: Mechiel Lukkien <mechiel@ueber.net>
date: Mon, 20 Aug 2007 17:42:16 +0200
files: appl/lib/vac.b
description: remove some debug messages.
     1.1--- a/appl/lib/vac.b	Mon Aug 20 17:38:00 2007 +0200
     1.2+++ b/appl/lib/vac.b	Mon Aug 20 17:42:16 2007 +0200
     1.3@@ -418,9 +418,7 @@
     1.4 		return ref File(array[1] of {p}, Datatype, dsize, big 0, session, varblocks);
     1.5 	}
     1.6 	f := ref File(array[e.depth] of ref Page, Datatype, dsize, big 0, session, varblocks);
     1.7-say(sprint("mkstate, depth=%d", e.depth));
     1.8 	for(i := 0; i < e.depth; i++) {
     1.9-say(sprint("mkstate: reading score=%s", e.score.text()));
    1.10 		t := Pointertype0+e.depth-1-i;
    1.11 		if(f.varblocks)
    1.12 			t |= Pointervarmask;
    1.13@@ -445,7 +443,6 @@
    1.14 			ls = big e.dsize;
    1.15 		f.size = e.size-ls;
    1.16 	}
    1.17-say(sprint("mkstate: have file, size=%bd", f.size));
    1.18 	return f;
    1.19 }
    1.20 
    1.21@@ -564,7 +561,6 @@
    1.22 	d := de.pack();
    1.23 	if(d == nil)
    1.24 		return -1;
    1.25-say(sprint("msink: adding direntry, length %d", len d));
    1.26 	if(Metablocksize+len m.l*Metaentrysize+m.nde + Metaentrysize+len d > len m.de)
    1.27 		if(mflush(m, 0) < 0)
    1.28 			return -1;
    1.29@@ -656,29 +652,22 @@
    1.30 	last := s.e.score;
    1.31 	tlen := s.e.size;
    1.32 
    1.33-say(sprint("source.oget: offset=%bd last=%s tlen=%bd esize=%d", offset, last.text(), tlen, esize));
    1.34-
    1.35 	for(depth := s.e.depth; depth > 0; depth--) {
    1.36 		dtype := Pointertype0+depth-1;
    1.37 		dtype |= Pointervarmask;
    1.38 		buf := vread(s.session, last, dtype, s.e.psize);
    1.39 		if(buf == nil)
    1.40 			return nil;
    1.41-say(sprint("source.oget: coffset=%bd have buf, len=%d", coffset, len buf));
    1.42 
    1.43 		(last, tlen) = (Score(buf[:Scoresize]), g64(buf, Scoresize));
    1.44-say(sprint("source.oget: tmp last=%s tlen=%bd", last.text(), tlen));
    1.45 		for(o := esize; o+esize <= len buf; o += esize) {
    1.46 			if(offset < coffset+tlen)
    1.47 				break;
    1.48 			coffset += tlen;
    1.49 			tlen = g64(buf, o+Scoresize);
    1.50 			last = Score(buf[o:o+Scoresize]);
    1.51-say(sprint("source.oget: tmp last=%s tlen=%bd", last.text(), tlen));
    1.52 		}
    1.53-say(sprint("source.oget: new last=%s tlen=%bd", last.text(), tlen));
    1.54 		if(coffset+tlen < offset || coffset > offset) {
    1.55-say(sprint("source.oget: bad... coffset=%bd offset=%bd", coffset, offset));
    1.56 			sys->werrstr("bad source.oget");
    1.57 			return nil;
    1.58 		}
    1.59@@ -735,7 +724,6 @@
    1.60 		have := v.s.get(big (offset/big dsize), buf := array[dsize] of byte);
    1.61 		if(have <= 0)
    1.62 			return have;
    1.63-	say(sprint("vacfile.read: have=%d dsize=%d", have, dsize));
    1.64 		o := int (offset % big dsize);
    1.65 		have -= o;
    1.66 		if(have > n)
    1.67@@ -825,7 +813,6 @@
    1.68 
    1.69 vfreadentry(vf: ref Vacfile, entry: int): ref Entry
    1.70 {
    1.71-say(sprint("vfreadentry: reading entry=%d", entry));
    1.72 	ebuf := array[Entrysize] of byte;
    1.73 	n := vf.pread(ebuf, len ebuf, big entry*big Entrysize);
    1.74 	if(n < 0)
    1.75@@ -843,13 +830,11 @@
    1.76 		werrstr("entry is local");
    1.77 		return nil;
    1.78 	}
    1.79-say(sprint("vreadentry: have entry, score=%s", e.score.text()));
    1.80 	return e;
    1.81 }
    1.82 
    1.83 Vacdir.open(vd: self ref Vacdir, de: ref Direntry): (ref Entry, ref Entry)
    1.84 {
    1.85-say(sprint("vacdir.open: opening entry=%d", de.entry));
    1.86 	e := vfreadentry(vd.vf, de.entry);
    1.87 	if(e == nil)
    1.88 		return (nil, nil);
    1.89@@ -859,13 +844,11 @@
    1.90 		werrstr("direntry directory bit does not match entry directory bit");
    1.91 		return (nil, nil);
    1.92 	}
    1.93-say(sprint("vacdir.open: have entry, score=%s size=%bd", e.score.text(), e.size));
    1.94 	me: ref Entry;
    1.95 	if(de.mode&Modedir) {
    1.96 		me = vfreadentry(vd.vf, de.mentry);
    1.97 		if(me == nil)
    1.98 			return (nil, nil);
    1.99-say(sprint("vacdir.open: have mentry, score=%s size=%bd", me.score.text(), e.size));
   1.100 	}
   1.101 	return (e, me);
   1.102 }
   1.103@@ -899,12 +882,10 @@
   1.104 
   1.105 Vacdir.readdir(vd: self ref Vacdir): (int, ref Direntry)
   1.106 {
   1.107-say(sprint("vacdir.readdir: ms.e.size=%bd vd.p=%bd vd.i=%d", vd.ms.e.size, vd.p, vd.i));
   1.108 	dsize := vd.ms.e.dsize;
   1.109 	n := vd.ms.get(vd.p, buf := array[dsize] of byte);
   1.110 	if(n <= 0)
   1.111 		return (n, nil);
   1.112-say(sprint("vacdir.readdir: have buf, length=%d e.size=%bd", n, vd.ms.e.size));
   1.113 	mb := Metablock.unpack(buf);
   1.114 	if(mb == nil)
   1.115 		return (-1, nil);
   1.116@@ -916,7 +897,6 @@
   1.117 		vd.p++;
   1.118 		vd.i = 0;
   1.119 	}
   1.120-say("vacdir.readdir: have entry");
   1.121 	return (1, de);
   1.122 }
   1.123