remove unused code, leftover -f flag documentation - bmf - bmf (Bayesian Mail F… | |
git clone git://git.codemadness.org/bmf | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit ed1d073e8b0ab5ad0745d7d9a75ee978b460659a | |
parent 8c2b855490c62d2b8f20a0dcbb85ed1dc7686155 | |
Author: Hiltjo Posthuma <[email protected]> | |
Date: Sat, 29 Sep 2018 12:52:58 +0200 | |
remove unused code, leftover -f flag documentation | |
Diffstat: | |
M .gitignore | 1 - | |
M Makefile | 4 ++-- | |
M bmf.1 | 3 --- | |
M config.h | 3 --- | |
D dbdb.c | 68 -----------------------------… | |
D dbdb.h | 13 ------------- | |
M dbh.c | 1 - | |
7 files changed, 2 insertions(+), 91 deletions(-) | |
--- | |
diff --git a/.gitignore b/.gitignore | |
@@ -1,4 +1,3 @@ | |
*.o | |
*.core | |
bmf | |
-bmfconv | |
diff --git a/Makefile b/Makefile | |
@@ -5,8 +5,8 @@ VERSION=0.9.4 | |
all: bmf | |
-bmf: bmf.o dbg.o dbdb.o dbh.o dbtext.o filt.o lex.o str.o vec.o | |
- $(CC) -o $@ bmf.o filt.o dbdb.o dbtext.o dbh.o lex.o vec.o str.o dbg.o… | |
+bmf: bmf.o dbg.o dbh.o dbtext.o filt.o lex.o str.o vec.o | |
+ $(CC) -o $@ bmf.o filt.o dbtext.o dbh.o lex.o vec.o str.o dbg.o $(LDFL… | |
bmf.o: bmf.c | |
$(CC) $(CFLAGS) -DPACKAGE=\"bmf\" -DVERSION=\"$(VERSION)\" -c $< | |
diff --git a/bmf.1 b/bmf.1 | |
@@ -56,9 +56,6 @@ Without command-line options, bmf processes the input, regist… | |
\fB-S\fR Register the input as spam and undo a prior registration as non-spam. | |
.PP | |
-\fB-f fmt\fR Specify database format. Valid formats are text, db, and mysql. T… | |
- | |
-.PP | |
\fB-d db\fR Specify database or directory for loading and saving word lists. T… | |
.PP | |
diff --git a/config.h b/config.h | |
@@ -59,9 +59,6 @@ typedef enum { detect, mbox, maildir } mbox_t; | |
* Tweakables | |
*/ | |
-/* If you have the mysql client libs installed and wish to use them... */ | |
-/* #define HAVE_MYSQL */ | |
- | |
#define MSGCOUNT_KEY ".MSGCOUNT" | |
#define MSGCOUNT_KEY_LEN (sizeof(MSGCOUNT_KEY)-1) | |
diff --git a/dbdb.c b/dbdb.c | |
@@ -1,68 +0,0 @@ | |
-/* $Id: dbdb.c,v 1.22 2002/10/19 09:59:35 tommy Exp $ */ | |
- | |
-/* | |
- * Copyright (c) 2002 Tom Marshall <[email protected]> | |
- * | |
- * This program is free software. It may be distributed under the terms | |
- * in the file LICENSE, found in the top level of the distribution. | |
- * | |
- * dbdb.c: berkeley database handler | |
- */ | |
- | |
-#include "config.h" | |
-#include "dbg.h" | |
-#include "str.h" | |
-#include "lex.h" | |
-#include "vec.h" | |
- | |
-#include "dbh.h" | |
-#include "dbdb.h" | |
- | |
-dbh_t * | |
-dbdb_db_open(cpchar dbhost, cpchar dbname, cpchar dbuser, cpchar dbpass) | |
-{ | |
- return NULL; | |
-} | |
- | |
-#ifdef UNIT_TEST | |
-int | |
-main(int argc, char **argv) | |
-{ | |
- dbh_t *pdb; | |
- veciter_t iter; | |
- str_t *pstr; | |
- uint n; | |
- | |
- if (argc != 2) { | |
- fprintf(stderr, "usage: %s <file>\n", argv[0]); | |
- return 1; | |
- } | |
- for (n = 0; n < 100; n++) { | |
- pdb = dbh_open("testlist", true); | |
- | |
- vec_first(&db, &iter); | |
- while ((pstr = veciter_get(&iter)) != NULL) { | |
- char buf[MAXWORDLEN + 32]; | |
- char *p; | |
- | |
- if (pstr->len > 200) { | |
- fprintf(stderr, "str too long: %u chars\n", ps… | |
- break; | |
- } | |
- p = buf; | |
- strcpy(buf, "str: "); | |
- p += 6; | |
- memcpy(p, pstr->p, pstr->len); | |
- p += pstr->len; | |
- sprintf(p, " %u", pstr->count); | |
- puts(buf); | |
- | |
- veciter_next(&iter); | |
- } | |
- | |
- dbh_close(&db); | |
- } | |
- | |
- return 0; | |
-} | |
-#endif /* def UNIT_TEST */ | |
diff --git a/dbdb.h b/dbdb.h | |
@@ -1,13 +0,0 @@ | |
-/* $Id: dbdb.h,v 1.7 2002/10/14 22:17:19 tommy Exp $ */ | |
- | |
-/* | |
- * Copyright (c) 2002 Tom Marshall <[email protected]> | |
- * | |
- * This program is free software. It may be distributed under the terms | |
- * in the file LICENSE, found in the top level of the distribution. | |
- */ | |
- | |
-#ifndef _DBDB_H | |
-#define _DBDB_H | |
- | |
-#endif /* ndef _DBDB_H */ | |
diff --git a/dbh.c b/dbh.c | |
@@ -17,7 +17,6 @@ | |
#include "dbh.h" | |
#include "dbtext.h" | |
-#include "dbdb.h" | |
/* | |
* get count for new (incoming) word. there may be duplicate entries for the |