[PATCH] bogoutil options
David Relson
relson at osagesoftware.com
Sun Dec 26 08:17:45 EST 2004
On Sun, 26 Dec 2004 13:26:13 +0300
Evgeny Kotsuba wrote:
> Hi,
...[snip]...
> What is
>
> X:\>bogoutil.exe -v
> bogoutil: Exactly one of the -C, -d, -f, -F, -P, -l, -R or -w flags must
> be present.
> But from Usage string it follows that we can use "bogoutil.exe -v"
>
> X:\>bogoutil.exe -m
> X:\bogoutil.exe: option requires an argument -- m
> Option -m requires an argument.
>
> There is no "m" in usage string and there is no argument to "m" in
> online help
>
> May be there are also some other inaccuracies in BogoUtil -h
>
> SY,
> EK
Hi Evgeny,
As you can tell, there was a major reworking of options for bogoutil
with lots of long options being added and several single letter options
changed to long options. In doing that, I missed the usage message and
the required option for -m.
Attached is a patch which is guaranteed to be an improvement, though
there may still be a mistake or two.
Regards,
David
-------------- next part --------------
--- bogoutil.c.orig 2004-12-24 18:48:20.000000000 -0500
+++ bogoutil.c 2004-12-26 08:13:16.283502240 -0500
@@ -1,4 +1,4 @@
-/* $Id: bogoutil.c,v 1.152 2004/12/24 23:48:20 relson Exp $ */
+/* $Id: bogoutil.c,v 1.154 2004/12/25 14:49:04 relson Exp $ */
/*****************************************************************************
@@ -437,8 +437,12 @@
static void usage(void)
{
- fprintf(stderr, "Usage: %s { -d | -l | -w | -p } file%s | { -r | -R | -f | -F | -P } directory | [ -v | -h | -V ]\n",
+ fprintf(stderr, "Usage: %s [ -h | -v | -V ]\n",
+ progname);
+ fprintf(stderr, " or: %s { -d | -l | -m | -w | -p | --db-verify } file%s\n",
progname, DB_EXT);
+ fprintf(stderr, " or: %s { -r | -R | --db-prune --db-recover --db-recover-harder --db-remove-environment } directory\n",
+ progname);
}
static const char *help_text[] = {
@@ -465,7 +469,7 @@
" -x, --debug-flags=list - set flags to display debug information.\n",
"database maintenance:\n",
- " -m - enable maintenance works (expiring tokens).\n",
+ " -m file - enable maintenance works (expiring tokens).\n",
" -n - replace non-ascii characters with '?'.\n",
" -a age - exclude tokens with older ages.\n",
" -c cnt - exclude tokens with lower counts.\n",
@@ -473,12 +477,12 @@
" -y, --timestamp-date=date - set default date (format YYYYMMDD).\n",
"environment maintenance:\n",
- " -k, --db_cachesize=size - set Berkeley DB cache size (MB).\n",
- " --db_verify=file - verify data file.\n",
- " --db_prune=dir - remove inactive log files in dir.\n",
- " --db_recover=dir - run recovery on database in dir.\n",
- " --db_recover-harder=dir - run catastrophic recovery on database.\n",
- " --db_remove-environment - remove environment.\n",
+ " -k, --db-cachesize=size - set Berkeley DB cache size (MB).\n",
+ " --db-verify=file - verify data file.\n",
+ " --db-prune=dir - remove inactive log files in dir.\n",
+ " --db-recover=dir - run recovery on database in dir.\n",
+ " --db-recover-harder=dir - run catastrophic recovery on database.\n",
+ " --db-remove-environment - remove environment.\n",
#ifdef HAVE_DECL_DB_CREATE
" --db_lk_max_locks - set max lock count.\n",
@@ -607,8 +611,8 @@
if (count != 1)
{
- fprintf(stderr, "%s: Exactly one of the -C, -d, -f, -F, -P, -l, -R or -w flags "
- "must be present.\n", progname);
+ usage();
+ fprintf(stderr, "%s: Exactly one of the file or directory commands must be present.\n", progname);
exit(EX_ERROR);
}
More information about the Bogofilter-dev
mailing list