long options [was: bogoutil.c,1.155,1.156]
David Relson
relson at osagesoftware.com
Tue Dec 28 00:03:02 CET 2004
On Mon, 27 Dec 2004 23:24:19 +0100
Matthias Andree wrote:
> relson at users.sourceforge.net writes:
>
> > Update of /cvsroot/bogofilter/bogofilter/src
> > In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24974
> >
> > Modified Files:
> > bogoutil.c
> > Log Message:
> > Fix error message.
>
> Haven't yet checked who supports long options, but we have more of
> these:
>
> src/bogoconfig.c: fprintf(stderr, "Cannot parse -%c option argument '%s'.\n", opt, arg);
> src/bogoconfig.c: fprintf(stderr, "Option -%c requires an argument.\n", optopt);
> src/bogolexer.c: fprintf(stderr, "Option -%c requires an argument.\n", optopt);
>
> I wonder if we want to look into gengetopt, AutoOpts or popt - these are
> the three better-known option parse helpers.
Hi Matthias,
I'd been thinking of checking for all references to optopt, but you beat
me to it! I've changed the two "Option -%c" to "Option %s" and they work better.
While looking at bogoconfig, I noticed that some long options use
embedded underscores and others use the hyphen. For consistency and
ease of use I'm planning on using hyphens throughout.
Being an optimist, I think we're over the hurdle of implementing long
options and don't need another tool to help us. I just hope I'm right!
David
More information about the bogofilter-dev
mailing list