changelog shortlog tags branches files raw gz bz2 help

Mercurial > hg > ventivac / changeset: mask is used by rabin.b, so remove comments about that. also allow testrabin to set min/max block sizes.

changeset 59: 97f506e204f5
parent 58: c68c66838be0
child 60: 63be518910d8
author: Mechiel Lukkien <mechiel@ueber.net>
date: Fri, 13 Jul 2007 15:56:15 +0200
files: appl/cmd/testrabin.b appl/lib/rabin.b
description: mask is used by rabin.b, so remove comments about that. also allow testrabin to set min/max block sizes.
     1.1--- a/appl/cmd/testrabin.b	Fri Jun 22 18:26:45 2007 +0200
     1.2+++ b/appl/cmd/testrabin.b	Fri Jul 13 15:56:15 2007 +0200
     1.3@@ -35,12 +35,12 @@
     1.4 	p := 269;
     1.5 	m := 1<<10;
     1.6 	n := 3;
     1.7-	mask := m-1;	# xxx unused by module for now
     1.8+	mask := m-1;
     1.9 	min := 1024;
    1.10 	max := 32*1024;
    1.11 
    1.12 	arg->init(args);
    1.13-	arg->setusage(arg->progname()+" [-p prime] [-n width] [-m mod] [-k mask] file");
    1.14+	arg->setusage(arg->progname()+" [-p prime] [-n width] [-m mod] [-k mask] [-s min] [-S max] file");
    1.15 	while((c := arg->opt()) != 0)
    1.16 		case c {
    1.17 		'd' =>	dflag++;
    1.18@@ -48,6 +48,8 @@
    1.19 		'n' =>	n = int arg->earg();
    1.20 		'm' =>	m = int arg->earg();
    1.21 		'k' =>	mask = int arg->earg();
    1.22+		's' =>	min = int arg->earg();
    1.23+		'S' =>	max = int arg->earg();
    1.24 		* =>	arg->usage();
    1.25 		}
    1.26 	args = arg->argv();
     2.1--- a/appl/lib/rabin.b	Fri Jun 22 18:26:45 2007 +0200
     2.2+++ b/appl/lib/rabin.b	Fri Jul 13 15:56:15 2007 +0200
     2.3@@ -1,6 +1,3 @@
     2.4-# xxx
     2.5-# - use mask, instead of mod-1
     2.6-
     2.7 implement Rabin;
     2.8 
     2.9 include "sys.m";