[cvs] bogofilter/src score.c,1.33,1.34
Matthias Andree
matthias.andree at gmx.de
Wed Dec 1 12:05:26 CET 2004
relson at users.sourceforge.net writes:
> Update of /cvsroot/bogofilter/bogofilter/src
> In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19109
>
> Modified Files:
> score.c
> Log Message:
> Use temp variable to simplify debugging.
There's a trick, in gdb: put a breakpoint on entry of the function (just
"b msg_lookup_and_score"), and then type "finish" when the breakpoint is
hit, it should print the value returned - at least my version of GDB
does that.
> --- score.c 30 Nov 2004 18:01:19 -0000 1.33
> +++ score.c 30 Nov 2004 18:02:31 -0000 1.34
> @@ -142,11 +142,15 @@
>
> static double msg_lookup_and_score(const word_t *token, wordcnts_t *cnts)
> {
> + double prob;
> +
> if (cnts->bad == 0 && cnts->good == 0)
> lookup(token, cnts);
>
> - return calc_prob_pure(cnts->good, cnts->bad,
> - cnts->msgs_good, cnts->msgs_bad, robs, robx);
> + prob = calc_prob_pure(cnts->good, cnts->bad,
> + cnts->msgs_good, cnts->msgs_bad, robs, robx);
> +
> + return prob;
> }
--
Matthias Andree
More information about the bogofilter-dev
mailing list