[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Tabular command processing sans AutoOpts

From: Bruce Korb <bkorb_at_cruzio.com>
Date: 2000-11-13 00:59:37 CET

Karl Fogel wrote:
> Re the table: I think it's worse to have lots of empty C files sitting
> around unused for a long time, than to have to tweak four locations
> when adding a new command.

Matter of taste then, so I'll defer to you.

> The getopts_long interface is one familiar to many programmers, ...
>
> If you do know of such an implementation, please point the way.

There _is_ my library. If one doesn't like generated text, one
could always edit the struct by hand. I don't think it is much
worse than the GNU getopt_long struct. It is just more constraining
to not be able to use that information in other contexts
(documentation). Using the struct directly also makes the interface
more rigid. You also would loose the macro interface to the
options. However, these are all losses of features that are not
part of the GNU getopt_long interface anyway. My thesis: AutoOpts
can be used the same way as the getopt_long library with approximately
the same level of difficulty. You even get a few enhancements over
getopt_long (i.e. the loop is handled for you). *I* would not
choose to use that interface, though, because I wrote a generated
wrapper around it that makes it *much* easier to work with. I could
even generate a wrapper around the getopt_long library; I am
disinclined just because it is a substantial subset of functionality.
Received on Sat Oct 21 14:36:14 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.