On Sep 3, 2013, at 9:10 PM, Clifford Yapp wrote: > Even if we use popt I imagine we'll eventually hide it behind some > sort of libbu wrapper, so the ideal thing would be to figure that out > and only link popt in through libbu - I'm not sure how or if that > factors in to what your working on Tom, but I thought I'd mention it > in case we need to work out the libbu wrapper API before you > "finalize" your option handling. I haven't added anything for the > purpose to libbu's C code, but I did hook it up to libbu's build > logic.
I think it's definitely in our interest if only from a dependency management perspective to put option parsing underneath LIBBU API. It could be a simple pass-through but would need to define a minimal set of structures and as few functions as possible. The goal should be towards reducing overall lines of code in the (400+) caller applications. That wouldn't be possible if we just provided a bu_getopt_long() similar to getopt_long() -- that just adds lines of code on top of getopt() single-letter option parsing, adds complexity and maintenance cost. If we're going to do something better, it needs to be an improvement. Popt is probably sufficient. Another possibly worth considering is the header-only TCLAP ( http://tclap.sourceforge.net/ ) library. I've also been fond of 'argtable' in the past, but think we should try to get a BSD/MIT option to work first. It might help when defining simple BU API, though. Cheers! Sean ------------------------------------------------------------------------------ Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! Discover the easy way to master current and previous Microsoft technologies and advance your career. Get an incredible 1,500+ hours of step-by-step tutorial videos with LearnDevNow. Subscribe today and save! http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk _______________________________________________ BRL-CAD Developer mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/brlcad-devel
