mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-26 00:55:14 +00:00
Unify files/patch-I2Ohash-large-input and files/patch-I2Ohash+src+util.c.
This commit is contained in:
parent
df2df1802f
commit
6d67caaa46
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=313501
@ -1,34 +0,0 @@
|
||||
--- I2Ohash/src/util.c.orig 2008-12-27 21:44:52.000000000 -0500
|
||||
+++ I2Ohash/src/util.c 2008-12-27 21:52:46.000000000 -0500
|
||||
@@ -39,7 +39,8 @@
|
||||
*/
|
||||
loc1 = (key1 + 1) % hashtable->nlist ;
|
||||
loc2 = (key2 + 1) % 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) ;
|
||||
@@ -50,7 +51,7 @@
|
||||
--------------------------------------------------------
|
||||
*/
|
||||
#if MYDEBUG > 0
|
||||
-fprintf(stdout, "\n hashtable->freeI2OP = %p", hashtable->freeI2OP) ;
|
||||
+fprintf(stdout, "\n loc1 = %d, loc2 = %d, loc3 = %ld, loc = %d", loc1, loc2, loc3, loc) ;
|
||||
fflush(stdout) ;
|
||||
#endif
|
||||
if ( (i2op = hashtable->freeI2OP) == NULL ) {
|
||||
@@ -158,9 +159,10 @@
|
||||
#endif
|
||||
loc1 = (key1 + 1) % hashtable->nlist ;
|
||||
loc2 = (key2 + 1) % 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) ;
|
||||
+fprintf(stdout, "\n loc1 = %d, loc2 = %d, loc3 = %ld, loc = %d", loc1, loc2, loc3, loc) ;
|
||||
fflush(stdout) ;
|
||||
#endif
|
||||
/*
|
@ -1,92 +1,29 @@
|
||||
$FreeBSD$
|
||||
--- I2Ohash/src/util.c.orig 2013-03-04 21:21:54.000000000 -0500
|
||||
+++ I2Ohash/src/util.c 2012-10-06 08:28:37.000000000 -0500
|
||||
@@ -39,8 +39,9 @@
|
||||
--- I2Ohash/src/util.c 1998-05-31 07:45:12.000000000 +0900
|
||||
+++ I2Ohash/src/util.c 2013-03-06 14:59:43.000000000 +0900
|
||||
@@ -39,7 +39,9 @@
|
||||
*/
|
||||
loc1 = (key1 + 1) % hashtable->nlist ;
|
||||
loc2 = (key2 + 1) % hashtable->nlist ;
|
||||
-long int loc3 = (long int)loc1*(long int)loc2 % hashtable->nlist ;
|
||||
-loc =(int) loc3;
|
||||
-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) ;
|
||||
@@ -51,7 +52,7 @@
|
||||
--------------------------------------------------------
|
||||
*/
|
||||
#if MYDEBUG > 0
|
||||
-fprintf(stdout, "\n loc1 = %d, loc2 = %d, loc3 = %ld, loc = %d", loc1, loc2, loc3, loc) ;
|
||||
+fprintf(stdout, "\n hashtable->freeI2OP = %p", hashtable->freeI2OP) ;
|
||||
fflush(stdout) ;
|
||||
#endif
|
||||
if ( (i2op = hashtable->freeI2OP) == NULL ) {
|
||||
@@ -159,10 +160,11 @@
|
||||
@@ -158,7 +160,9 @@
|
||||
#endif
|
||||
loc1 = (key1 + 1) % hashtable->nlist ;
|
||||
loc2 = (key2 + 1) % hashtable->nlist ;
|
||||
-long int loc3 = (long int)loc1*(long int)loc2 % hashtable->nlist ;
|
||||
-loc =(int) loc3;
|
||||
-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 = %ld, loc = %d", loc1, loc2, loc3, loc) ;
|
||||
+fprintf(stdout, "\n loc1 = %d, loc2 = %d, loc3 = %d", loc1, loc2, loc) ;
|
||||
fprintf(stdout, "\n loc1 = %d, loc2 = %d, loc3 = %d", loc1, loc2, loc) ;
|
||||
fflush(stdout) ;
|
||||
#endif
|
||||
/*
|
||||
@@ -231,7 +233,9 @@
|
||||
}
|
||||
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
|
||||
--- I2Ohash/src/util.c.orig 2013-03-04 21:21:54.000000000 -0500
|
||||
+++ I2Ohash/src/util.c 2012-10-06 08:28:37.000000000 -0500
|
||||
@@ -39,8 +39,9 @@
|
||||
*/
|
||||
loc1 = (key1 + 1) % hashtable->nlist ;
|
||||
loc2 = (key2 + 1) % hashtable->nlist ;
|
||||
-long int loc3 = (long int)loc1*(long int)loc2 % hashtable->nlist ;
|
||||
-loc =(int) loc3;
|
||||
+/*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) ;
|
||||
@@ -51,7 +52,7 @@
|
||||
--------------------------------------------------------
|
||||
*/
|
||||
#if MYDEBUG > 0
|
||||
-fprintf(stdout, "\n loc1 = %d, loc2 = %d, loc3 = %ld, loc = %d", loc1, loc2, loc3, loc) ;
|
||||
+fprintf(stdout, "\n hashtable->freeI2OP = %p", hashtable->freeI2OP) ;
|
||||
fflush(stdout) ;
|
||||
#endif
|
||||
if ( (i2op = hashtable->freeI2OP) == NULL ) {
|
||||
@@ -159,10 +160,11 @@
|
||||
#endif
|
||||
loc1 = (key1 + 1) % hashtable->nlist ;
|
||||
loc2 = (key2 + 1) % hashtable->nlist ;
|
||||
-long int loc3 = (long int)loc1*(long int)loc2 % hashtable->nlist ;
|
||||
-loc =(int) loc3;
|
||||
+/*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 = %ld, loc = %d", loc1, loc2, loc3, loc) ;
|
||||
+fprintf(stdout, "\n loc1 = %d, loc2 = %d, loc3 = %d", loc1, loc2, loc) ;
|
||||
fflush(stdout) ;
|
||||
#endif
|
||||
/*
|
||||
@@ -231,7 +233,9 @@
|
||||
@@ -229,7 +233,9 @@
|
||||
}
|
||||
loc1 = (key1 + 1) % hashtable->nlist ;
|
||||
loc2 = (key2 + 1) % hashtable->nlist ;
|
||||
|
Loading…
Reference in New Issue
Block a user