pike.git
/
src
/
modules
/
_WhiteFish
/
whitefish.c
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/modules/_WhiteFish/whitefish.c:204:
struct object *res, int docid, double *field_c[65], double mc ) { int i, j, k; unsigned char *nhits = malloc( nblobs*2 ); unsigned char *first = nhits+nblobs; int matrix[65]; double accum = 0.0;
-
int base_hit =
0
;
+
int base_hit =
-1
;
MEMSET(matrix, 0, sizeof(matrix) ); for( i = 0; i<nblobs; i++ ) { nhits[i] = wf_blob_nhits( blobs[i] ); first[i] = 0; }
pike.git/src/modules/_WhiteFish/whitefish.c:247:
base_hit = h2 - j; break; } } if( hit == nblobs ) accum += add/mc; } /* Determine which blobs to step forward */
-
if (base_hit > 0) {
+
if (base_hit >
=
0) {
int did_next = 0; for (i = 0; i < nblobs; i++) if (nhits[i]) { int max_hit = wf_blob_hit_raw(blobs[i], nhits[i] - 1); if (max_hit < base_hit + i) { wf_blob_next(blobs[i]); did_next = 1; } } if (!did_next)
-
base_hit =
0
;
+
base_hit =
-1
;
}
-
if (
!
base_hit) {
+
if (base_hit
< 0
) {
for (i = 0; i < nblobs; i++) wf_blob_next(blobs[i]); } free( nhits ); if( accum > 0.0 ) wf_resultset_add( res, docid, (int)(accum*100) ); }