[cvs] bogofilter/src bogoconfig.c,1.79,1.80 bogoutil.c,1.35,1.36 globals.c,1.26,1.27 globals.h,1.25,
Fast Bayesian spam filter along lines suggested by Paul Graham
Brought to you by:
m-a
From: <re...@us...> - 2003-07-18 12:49:23
|
Update of /cvsroot/bogofilter/bogofilter/src In directory sc8-pr-cvs1:/tmp/cvs-serv6562 Modified Files: bogoconfig.c bogoutil.c globals.c globals.h Log Message: Implement '-W' switch for toggling wordlists variable. Index: bogoconfig.c =================================================================== RCS file: /cvsroot/bogofilter/bogofilter/src/bogoconfig.c,v retrieving revision 1.79 retrieving revision 1.80 diff -u -d -r1.79 -r1.80 --- bogoconfig.c 17 Jul 2003 19:56:24 -0000 1.79 +++ bogoconfig.c 18 Jul 2003 12:49:09 -0000 1.80 @@ -364,6 +364,7 @@ "\t -C - don't read standard config files.\n" "\t -d path - specify directory for wordlists.\n" "\t -k size - set BerkeleyDB cache size (MB).\n" + "\t -W - use combined wordlist.db for spam and ham tokens.\n" "\t -l - write messages to syslog.\n" "\t -L tag - specify the tag value for log messages.\n" "\t -I file - read message from 'file' instead of stdin.\n" @@ -436,7 +437,7 @@ #define F "f" #endif -#define OPTIONS ":23bBc:Cd:DefFghI:k:lL:m:MnNo:O:pP:qQRrsStTuvVx:y:" G R F +#define OPTIONS ":23bBc:Cd:DefFghI:k:lL:m:MnNo:O:pP:qQRrsStTuvWVx:y:" G R F /** These functions process command line arguments. ** @@ -606,6 +607,10 @@ case 'V': print_version(); exit(0); + + case 'W': + wordlists ^= W_COMBINED ^ W_SEPARATE; + break; case 'x': set_debug_mask( optarg ); Index: bogoutil.c =================================================================== RCS file: /cvsroot/bogofilter/bogofilter/src/bogoutil.c,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- bogoutil.c 17 Jul 2003 23:35:58 -0000 1.35 +++ bogoutil.c 18 Jul 2003 12:49:09 -0000 1.36 @@ -611,7 +611,7 @@ bool prob = false; cmd_t flag = NONE; -#define OPTIONS ":a:c:d:DhI:l:m:np:r:R:s:vVw:x:y:" +#define OPTIONS ":a:c:d:DhI:l:m:np:r:R:s:vVw:Wx:y:" static int process_args(int argc, char **argv) { @@ -682,6 +682,10 @@ case 'V': print_version(); exit(0); + + case 'W': + wordlists ^= W_COMBINED ^ W_SEPARATE; + break; case 'x': set_debug_mask( (char *) optarg ); Index: globals.c =================================================================== RCS file: /cvsroot/bogofilter/bogofilter/src/globals.c,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- globals.c 17 Jul 2003 19:56:25 -0000 1.26 +++ globals.c 18 Jul 2003 12:49:09 -0000 1.27 @@ -36,7 +36,7 @@ bool terse; /* '-t' */ int test = 0; /* '-T' */ int verbose; /* '-v' */ -wl_t wordlists = W_SEPARATE; /* '-w', '-W' */ +wl_t wordlists = W_SEPARATE; /* '-W' */ /* config file options */ int max_repeats; Index: globals.h =================================================================== RCS file: /cvsroot/bogofilter/bogofilter/src/globals.h,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- globals.h 17 Jul 2003 19:56:25 -0000 1.25 +++ globals.h 18 Jul 2003 12:49:09 -0000 1.26 @@ -33,7 +33,7 @@ extern bool terse; /* '-t' */ extern int test; /* '-T' */ extern int verbose; /* '-v' */ -extern wl_t wordlists; /* '-w', '-W' */ +extern wl_t wordlists; /* '-W' */ /* config file options */ extern int max_repeats; |