bogofilter-0.93.3.1

David Relson relson at osagesoftware.com
Mon Dec 27 06:07:05 CET 2004


On Sun, 26 Dec 2004 23:55:18 -0500
Clint Adams wrote:

> > bogoutil's help and usage messages have been cleaned up.
> 
> More complaining:
> 
> In src/bogoutil.c,
>         fprintf(stderr, "Option -%c requires an argument.\n", optopt);
> prints garbage when using a long option.
> 
> (f.ex.)
> % bogoutil --db-verify 
> Option -___requires an argument.

Try this fix:

diff -u -r1.155 bogoutil.c
--- bogoutil.c	26 Dec 2004 13:34:23 -0000	1.155
+++ bogoutil.c	27 Dec 2004 05:00:31 -0000
@@ -685,7 +685,7 @@
 	break;
 
     case ':':
-	fprintf(stderr, "Option -%c requires an argument.\n", optopt);
+	fprintf(stderr, "Option %s requires an argument.\n", name);
 	exit(EX_ERROR);
 
     case 'h':



> Also, if I run --db-verify with a directory instead of the .db file,
> % bogoutil --db-verify .bogofilter
> zsh: 27557 bus error  bogoutil --db-verify .bogofilter

Works for me:

[relson at osage relson]$ bogoutil --db-verify .bogofilter
bogoutil: database .bogofilter does not verify: Is a directory

[relson at osage src]$ bogoutil --db-verify 1226.d/wordlist.db

[relson at osage src]$ bogoutil --db-verify 1226.d
bogoutil: database 1226.d does not verify: Is a directory

[relson at osage src]$ bogoutil --db-verify 1226.d/
bogoutil: database 1226.d/ does not verify: Is a directory

[relson at osage src]$ bogoutil --db-verify=1226.d/
bogoutil: database 1226.d/ does not verify: Is a directory

What's special about your environment?  Can you do a debug build
(without the -O2 in src/Makefile), run under gdb and send me a stack
backtrace?

> in contrast to
> % db4.3_verify .bogofilter
> db_verify: read: 0xeffff968, 512: Is a directory
> db_verify: Metadata page 0 cannot be read: Is a directory
> db_verify: .bogofilter: Is a directory
> 
> I do like the usage output of "bogoutil" even though it's missing
> options that are present in --help.

Too many options to easily list them all in the usage message :-<

> I'll refine the zsh completion function for bogoutil further in the near
> future.

I don't recally your mentioning this before.  What is it?



More information about the bogofilter-dev mailing list