bmf

bmf (Bayesian Mail Filter) 0.9.4 fork + patches
git clone git://git.codemadness.org/bmf
Log | Files | Refs | README | LICENSE

commit 107ae911553ca8a5885eecaa2da0c37e030c216d
parent e805a804b42a190f0b06d8c495fd0f29011b1329
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Sat, 22 Sep 2018 18:05:42 +0200

small cleanup, remove DB_USER, DB_PASS

Diffstat:
Mbmf.c | 2+-
Mconfig.h | 15++++++---------
2 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/bmf.c b/bmf.c @@ -172,7 +172,7 @@ int main( int argc, char** argv ) } } - pdb = dbh_open( dbfmt, "localhost", dbname, DB_USER, DB_PASS ); + pdb = dbh_open( dbfmt, "localhost", dbname, "", "" ); if( pdb == NULL ) { fprintf( stderr, "%s: cannot open database\n", argv[0] ); diff --git a/config.h b/config.h @@ -10,8 +10,6 @@ #ifndef _CONFIG_H #define _CONFIG_H -#include <err.h> - /************************************** * Standard headers */ @@ -26,13 +24,15 @@ /************************************** * System headers */ -#include <sys/types.h> +#include <err.h> +#include <fcntl.h> #include <limits.h> +#include <time.h> #include <unistd.h> -#include <sys/stat.h> -#include <fcntl.h> + #include <sys/file.h> -#include <time.h> +#include <sys/stat.h> +#include <sys/types.h> /************************************** * For convenience @@ -60,9 +60,6 @@ typedef enum { detect, mbox, maildir } mbox_t; #define MSGCOUNT_KEY ".MSGCOUNT" #define MSGCOUNT_KEY_LEN (sizeof(MSGCOUNT_KEY)-1) -#define DB_USER "username" -#define DB_PASS "password" - #define IOBUFSIZE 4096 /* chunk size for file buffers */ #define MAXWORDLEN 20 /* max word length, inclusive */ #define MAXFREQ 4 /* max times to count word per email */