summaryrefslogtreecommitdiff
path: root/math/spooles/files/patch-I2Ohash-large-input
blob: 2d4d467668f1b9e46b3d1ba174a0d27497cdc156 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
--- I2Ohash/src/util.c.orig	1998-05-30 22:45:12 UTC
+++ I2Ohash/src/util.c
@@ -39,7 +39,9 @@ fflush(stdout) ;
 */
 loc1 = (key1 + 1) % hashtable->nlist ;
 loc2 = (key2 + 1) % hashtable->nlist ;
-loc  = (loc1*loc2) % hashtable->nlist ;
+/*loc  = (loc1*loc2) % hashtable->nlist ;*/
+long int loc3  = (long int)loc1*(long int)loc2 % hashtable->nlist ;
+loc=(int)loc3;
 #if MYDEBUG > 0
 fprintf(stdout, "\n loc1 = %d, loc2 = %d, loc3 = %d", loc1, loc2, loc) ;
 fflush(stdout) ;
@@ -158,7 +160,9 @@ fflush(stdout) ;
 #endif
 loc1 = (key1 + 1) % hashtable->nlist ;
 loc2 = (key2 + 1) % hashtable->nlist ;
-loc  = (loc1*loc2) % hashtable->nlist ;
+/*loc  = (loc1*loc2) % hashtable->nlist ;*/
+long int loc3  = (long int)loc1*(long int)loc2 % hashtable->nlist ;
+loc=(int)loc3;
 #if MYDEBUG > 0
 fprintf(stdout, "\n loc1 = %d, loc2 = %d, loc3 = %d", loc1, loc2, loc) ;
 fflush(stdout) ;
@@ -229,7 +233,9 @@ if ( hashtable == NULL || pvalue == NULL
 }
 loc1 = (key1 + 1) % hashtable->nlist ;
 loc2 = (key2 + 1) % hashtable->nlist ;
-loc  = (loc1*loc2) % hashtable->nlist ;
+/*loc  = (loc1*loc2) % hashtable->nlist ;*/
+long int loc3  = (long int)loc1*(long int)loc2 % hashtable->nlist ;
+loc=(int)loc3;
 /*
    ---------------------------------------------------
    find the location of the first (key1,key2,*) triple