stats_in_header, again...

David Relson relson at osagesoftware.com
Thu Apr 10 20:20:52 CEST 2003


At 01:54 PM 4/10/03, Bob Bernstein wrote:

>On Thu, Apr 10, 2003 at 07:30:11AM -0400, David Relson wrote:
>
> > The stats_in_header option refers to additional statistics about how
> > bogofilter has classified the message.  If you use one or two "-v"s with
> > the "-p", statistics will be included in the message.
>
>Ah...thanks. But, may I make so bold as to ask whether the connection
>between 'stats_in_header', and the 'v' switch, is anywhere made
>explicit? Short of guessing that somehow "stats" and, say, "histogram"
>might be related to each other, I can't find any mention of their
>inter-relatedness in the man page, or in the sample bogofilter.cf. Or
>did I just make (another) BDM ("big dummy mistake"), and miss
>something obvious? :-)
>
> > Hope this clears it up for you.
>
>Oh yes. Also, it seems a few changes will make the histogram more
>readable on 80 character screens:

As you've probably guessed, I don't use an 80 column screen.  It _is_ a 
reasonable request and I'm working on it.

>In bogoconfig.c:
>
>178     stats_prefix= stats_in_header ? "" : "";

This line certainly didn't travel well from you to me, but I can figure 
something out ...

>and in rstats.c:
>
>214         /* scale histogram to 50 characters */
>215         /* make that: 48 */
>216         if (maxcnt>48) cnt = (cnt * 48 + maxcnt - 1) / maxcnt;

I'm revising the printf() to one space between columns, rather than 
two.  I'll change the count from 50 after I see how that turns out.

>My personal kludges, of course; I'm sure there are more elegant ways
>to get that job done.

I've seen worse.  I've occasionally even written them.





More information about the Bogofilter mailing list