Mailing List Archive

getopt_long() for spamc? (was: svn commit: rev 20500 - in incubator/spamassassin/trunk: . spamc)
On Thursday 27 May 2004 20:14 CET Daniel Quinlan wrote:
> mss@apache.org writes:
> > Added often-requested -V switch to spamc. Finally one can check out
> > which version of spamc is installed on his box :)
>
> It would be better if we supported the standard GNU options --version
> and --help in all of our tools. -v vs. -V for version and -h or -? or
> -H for help is too inconsistent from Unix tool to Unix tool.

ACK. But spamc doesn't support getopt_long() at all -- I'd like to see it in
there though. Shall I add it?

Btw: '?' is no option but an error flag from getopt() :)

Cheers,
Malte

--
[SGT] Simon G. Tatham: "How to Report Bugs Effectively"
<http://www.chiark.greenend.org.uk/~sgtatham/bugs.html>
[ESR] Eric S. Raymond: "How To Ask Questions The Smart Way"
<http://www.catb.org/~esr/faqs/smart-questions.html>
Re: getopt_long() for spamc? (was: svn commit: rev 20500 - in incubator/spamassassin/trunk: . spamc) [ In reply to ]
"Malte S. Stretz" <msquadrat.nospamplease@gmx.net> writes:

> ACK. But spamc doesn't support getopt_long() at all -- I'd like to see
> it in there though. Shall I add it?
>
> Btw: '?' is no option but an error flag from getopt() :)

I wasn't proposing we use '?'.

I'm in favor of adding getopt_long, although we might want to make sure
it works on systems that don't have it installed.

I suggest a bug for this one.

Daniel

--
Daniel Quinlan
http://www.pathname.com/~quinlan/
Re: getopt_long() for spamc? (was: svn commit: rev 20500 - in incubator/spamassassin/trunk: . spamc) [ In reply to ]
On Thursday 27 May 2004 21:40 CET Daniel Quinlan wrote:
> I'm in favor of adding getopt_long, although we might want to make sure
> it works on systems that don't have it installed.

We could either include some replace code like we already do for getopt() on
Windows or note that the long options aren't available on all systems. I
prefer the latter for now.

> I suggest a bug for this one.

Will do.

Cheers,
Malte

--
[SGT] Simon G. Tatham: "How to Report Bugs Effectively"
<http://www.chiark.greenend.org.uk/~sgtatham/bugs.html>
[ESR] Eric S. Raymond: "How To Ask Questions The Smart Way"
<http://www.catb.org/~esr/faqs/smart-questions.html>
Re: getopt_long() for spamc? [ In reply to ]
Malte S. Stretz wrote:
> We could either include some replace code like we already do for
> getopt() on Windows or note that the long options aren't available
> on all systems. I prefer the latter for now.

Yes, I used what was easily available when I got it working for Windows.
Whoever hacks this in should be careful not to break the Windows build.
I agree that it may be easier to simply leave getopt_long unimplemented
in Windows for now.

-- sidney