bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gengetopt, anyone?


From: Reuben Thomas
Subject: gengetopt, anyone?
Date: Tue, 27 Sep 2011 13:16:25 +0100

I've just been playing with gengetopt. There's a lot to like: it gives
me (potentially multi-language) options handling for one line per
option (plus any extra text I want) in a simple .ggo file, and half a
dozen lines of code (four of which really should be redundant as they
test the help and version flags and call the relevant display
routine). All the necessary variables to signal which options are set
and their values are defined for me.

The only thing really not to like is that for my simple six-option
program it generates 565 lines of C. My program is only 140 lines,
representing a roughly 500-line net addition when I use gengetopt. I'm
not inclined to worry that much, but it does seem a lot.

There's also a slew of minor issues, mostly cosmetic, and all easy to
fix, for which I've filed a dizaine of bug reports and offered to fix
myself.

It should not go unremarked that gengetopt is big on gnulib (though
one of the bugs I filed is that its manual overenthusiastically
documents how to add gnulib to a project!).

Has anyone else any experience with it? It would seem to have
applications in, for example, coreutils, though its use would
obviously be a fair amount of work and the quantity of code it
generates might be more of a concern.

-- 
http://rrt.sc3d.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]