compile error with 0.16.4

David Relson relson at osagesoftware.com
Wed Mar 10 13:28:05 CET 2004


On Wed, 10 Mar 2004 12:13:22 +0100
Joerg Over Dexia wrote:

> Am 15:00 09.03.2004 -0500 teilte David Relson mir folgendes mit:
> ->Using 0.15.13 for reference, the fix appears to be what's shown
> below. 
> 
> Well, that fix only seems to change the name of the undeclared
> variables... :
> 
> bogoutil.c: In function `display_words':
> bogoutil.c:338: `spam_msgs' undeclared (first use in this
> function)
> bogoutil.c:339: `good_msgs' undeclared (first use in this
> function)

Joerg,

Sorry about that.  The correct names of the variables are msgs_bad and
msgs_good.

[relson at osage src]$ diff -u bogoutil.c.1.91 bogoutil.c
--- bogoutil.c.1.91	2004-01-21 21:13:16.000000000 -0500
+++ bogoutil.c	2004-03-10 07:19:27.000000000 -0500
@@ -335,8 +335,8 @@
 	else
 	{
 #ifdef	ENABLE_DEPRECATED_CODE
-	    double spamness = (double) spam_count / (double) spam_msg_count;
-	    double goodness = (double) good_count / (double) good_msg_count;
+	    double spamness = (double) spam_count / (double) msgs_bad;
+	    double goodness = (double) good_count / (double) msgs_good;
 
 	    gra_prob = (spam_count + good_count <= MINIMUM_FREQ)
 		? UNKNOWN_WORD



> But thx anyway for the hint, I checked the sources of 0.15.1 and
> the fix seems to be:
> 
> @309:
> -    unsigned long spam_count;
> -    unsigned long good_count;
> +    unsigned long spam_count, spam_msg_count = 0 ;
> +    unsigned long good_count, good_msg_count = 0 ;
> 
> ->May I ask why you need the deprecated code?  It's been removed
> from
> ->0.17.0 and subsequent releases.
> 
> Yes, I know, that's why I wanted a most recent 0.16 at last. I
> believe I have answered that a lot before, anyway:
> 
> For some experiments, I want to easily exchange the spam
> databases. Therefore I prefer separate wordlists. I don't mind
> the computing and space overhead as much as I mind the overhead
> of combining these lists s * h.
> 
> And then, there is the spamicity value. Essentially, the chi
> square calculation is dumbing down the robinson value to a
> tri-state-value of 0/0.5/1 (I'm oversimplifying here, I know).

I see your point.  I'd describe the effect more as "squeezing high and
low values towards 1 and 0" with the purpose being to answer the
question of "how sure is bogofilter that this message is really ham or
spam".

> 
> Thanks again for the hint and all your efforts, regards, JO

The two "xxx_msg_count" variables, which are local to bogoutil, are just
duplicates of the two global "msgs_xxx" and probably shouldn't have ever
existed.  Your fix needs more work as the xxx_msg_count variables are
never changed from zero to non-zero.

David




More information about the Bogofilter mailing list