While using popt in another program, I came across 2 usage
cases that might be usefully internalized in popt.

One usage case was an attempt to specify a memory limit as
    --memory 16777216
Adding unit scaling, e.g.
    --memory 16Mb
    --memory 16384Kb
would not be hard to add using something like
    POPT_ARG_INT | POPT_ARGFLAG_UNITS
with the usual Kb/Kib Mb/Mib Gb/Gib tokens to prescale.

Another possible popt-1.15 usage case is getdate.y, which is wonderfully
useful for time/date argument input. While it is
rather easy to use getdate.y through a popt callback, perhaps
its time to push getdate.y into libpopt, and add a
    POPT_ARG_DATE
distinguished method to make it as easy as possible to use getdate.y.

I'm also seeing a need for a KEY=VALUE comma separated list popt
sub-table option parser (there's a mouthful ;-)

I'm starting to see
    --option K1=V1,K2=V2,K3=V3
occurrences more often. I can think of a couple ways to use popt
to recursively parse KEY=VALUE settings, either by keeping track
of a chained popt table that is used iff a specific --option is encountered,
or by overloading the pointer field to be used as a option specific
subtable parse.

Opinions?

73 de Jeff
______________________________________________________________________
POPT Library                                           http://rpm5.org
Developer Communication List                       popt-devel@rpm5.org

Reply via email to