RPM Community Forums

Mailing List Message of <popt-devel>

Handling CSV's as a POPT option argument type

From: Jeff Johnson <n3npq@mac.com>
Date: Mon 14 Jun 2010 - 16:47:15 CEST
Message-id: <FF1A8CD5-4DD6-4F46-A9CE-D336E8E543BB@mac.com>
The POPT_ARG_BITSET Bloom filter's in popt-1.16 already implicitly
are assuming that option values are a (literally) CSV.

And POPT_ARG_ARGV in popt-1.13 (when an option is used multiple times)
already are storing a tuple.

So I think its time to commit to some conventions (like CSV with ',' or
more generally a set of characters for splitting a string into a tuple)
so that a tuple can be passed as a single argument and/or with multiple
occurrences of an option in a unified and transparent fashion.

The pending event is how to deal with a "foo=bar" data mapping, like a symbol table
or a python dict. Note that the Bloom filter implementation _ALREADY_
uses Bob Jenkins lookup3.c hash function, all that would remain
to implement a mapping in POPT 2.0 is to add hash buckets and a poptHash data type.

But I will proceed slowly and carefully to "mappings" in POPT 2.0.

73 de Jeff
Received on Mon Jun 14 16:47:37 2010
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.