[distcc] Re: yet another C-supporting cmdline scanner

Martin Pool mbp at samba.org
Thu Jul 10 12:07:41 GMT 2003


On 10 Jul 2003, Markus Werle <numerical.simulation at web.de> wrote:
> Hi!
> 
> This one also looks promising if you want to stay with C
> 
> http://argtable.sourceforge.net/doc/html/Tutorial.html

Hi,

I realize there are argument-parsing libraries in C; this looks like a
decent one and I appreciate you bringing it to my attention.

However from my point of view the heart of the problem here is not
parsing the arguments.  It is whether there is a table representation
of the way arguments should be interpreted that would be any simpler
than writing it out in C.  (I think what we're both trying to do is
make the code cleaner, and make it easy to support other compilers --
is that right?)

There are some other problems with using most argv-handling libraries:
most of them don't have good facilities for manipulating and copying
argv[] arrays, and many of them flag errors when unknown arguments are
seen (rather than passing them through).  Both of them are needed for
distcc.

In addition gcc argument handling is a bit idiosyncratic: e.g. the mix
of double-dash and single-dash arguments, complex relationships
between arguments, etc.

--
Martin



More information about the distcc mailing list