Permit arg units (like 100Kb), add getdate?

2008-05-01 Thread Jeff Johnson
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

Named bit fields ala ancient BSD %b format

2008-05-01 Thread Jeff Johnson
While I'm thinking about popt features, here is another: The BSD kernel (iirc) devised a means to map bit files to names using a %b format. A string was used to map bit# - name. E.g. here's an example from some rpmdb code that I use for output purposes static const char * dbtFlags =