[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: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2000-11-12 22:09:38 CET

> This patch will also add a bazillion stubs:
> [...]
> that were all mechanically generated.

I don't like using mechanically generated C source code when it's
avoidable. It complicates the build system and is generally ugly. (I
also wouldn't want programs to have to read a data file at runtime
just to be able to parse their options, of course, just to head off
that suggestion.)

I've thought about this issue and I can't think of any compelling
reason why any aspect of a table-driven argument handler shouldn't
just be a library. All of the tabular information you need easily
fits into an array of C structures a la the array passed to
getopt_long(). Even if you want your library to handle usage messages
and rc option processing, the same array of structures will do just
fine for those library functions as well.

(I apologize for not having implemented apr_getopt_long after quite
some time; I hope to do it soon. But that's only tangentially
related.)
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.