+- if (verbose > 2) {
+- rprintf(FINFO, "built hash table for entries %ld - %ld\n",
+- (long)start, (long)end - 1);
++ if (tablesize == TRADITIONAL_TABLESIZE) {
++ for (i = 0; i < s->count; i++) {
++ uint32 t = SUM2HASH(s->sums[i].sum1);
++ s->sums[i].chain = hash_table[t];
++ hash_table[t] = i;
++ }
++ } else {
++ for (i = 0; i < s->count; i++) {
++ uint32 t = BIG_SUM2HASH(s->sums[i].sum1);
++ s->sums[i].chain = hash_table[t];
++ hash_table[t] = i;
++ }
+ }
+-
+- return end;
+ }
+
+
+@@ -130,8 +141,8 @@ static void matched(int f, struct sum_st
+ static void hash_search(int f,struct sum_struct *s,
+ struct map_struct *buf, OFF_T len)
+ {
+- OFF_T offset, end, reset = 0;
+- int32 k, want_i, backup, sum_pos = 0;
++ OFF_T offset, end;
++ int32 k, want_i, backup;
+ char sum2[SUM_LENGTH];
+ uint32 s1, s2, sum;
+ int more;
+@@ -169,24 +180,21 @@ static void hash_search(int f,struct sum
+ int done_csum2 = 0;
+ int32 i;
+
+- if (offset >= reset) {
+- sum_pos = build_hash_table(s, sum_pos);
+- if (sum_pos == s->count)
+- reset = len;
+- else
+- reset = sum_pos * s->blength;
+- }
+-
+ if (verbose > 4) {
+ rprintf(FINFO, "offset=%.0f sum=%04x%04x\n",