Well, nice to know that getopt is not working as advertised :-(
Take a look in main.c, and I have a note in a comment right above getopt()
explaining how it should return the char value of '1' for any argv elements
that are not preceeded by a recognized argument characters. The getopt()
processing loop is written specifically to handle this...
Ok, just did some testing. Apparently the test right below getopt() should be:
if (c == 1)
c = c_prev
Note the removal of the single quotes. The manpage says:
If the first character of optstring is `-', then each
non-option argv-element is handled as if it were the argument
of an option with character code 1. (This is used by programs
that were written to expect options and other argv-elements
in any order and that care about the ordering of the two.)
I figured that this meant '1', the character code *of* 1. But no, just 1 :-P
Aaron
Ilja Booij <[EMAIL PROTECTED]> said:
>
> Ilja Booij wrote:
> > dbmail-smtp -d [EMAIL PROTECTED] -d [EMAIL PROTECTED]
> >
> > I've also put this in the manpage. Seems like logical behaviour to me :)
> Logical behaviour: not the fact that I put it in the manpage, but the
> fact that one can use multiple -d options.. ;)
>
> Ilja
>