3 Fix build on systems that define
popcount().
5 --- _nilsimsa
.c
.orig
2002-06-13 04:15:03.000000000 +0000
10 unsigned int acc
[256],threshold
;
11 -unsigned char tran
[256],popcount
[256];
12 +unsigned char tran
[256],pop_count
[256];
13 struct nsrecord
*selkarbi
,terkarbi
,*rules
,gunma
;
14 int nilselkarbi
,nrules
;
15 char *comparestr
,*rulefile
,*checkrulefile
;
16 @@
-90,10 +90,10 @@
void dumptran()
20 - memset(popcount
,0,256);
21 + memset(pop_count
,0,256);
24 - popcount
[i
]+=1&(i
>>j
);
25 + pop_count
[i
]+=1&(i
>>j
);
28 int defromulate(FILE *file
)
29 @@
-384,7 +384,7 @@
void makecode(struct nsrecord
*a
)
30 int nilsimsa(struct nsrecord
*a
,struct nsrecord
*b
)
32 for (i
=bits
=0;i
<32;i
++)
33 - bits
+=popcount
[255&(a
->code
[i
]^b
->code
[i
])];
34 + bits
+=pop_count
[255&(a
->code
[i
]^b
->code
[i
])];