I've been rewriting pcregrep to use popt instead the last week.
One of the side effects of teaching pcregrep to use popt is
that I've found some time to work on popt as well.
I will merge the patches posted to <[email protected]> before
popt-1.14.
Meanwhile, since the patches have mostly to do with --help column
alignment
using wide characters, as well as obscure conversions from UTF-8 for
GNOME,
and signed characters on Solaris, ... well, popthelp.c has some
additional
changes that are going to need testing, and isprint() is now used to
limit
displays of single character options.
Here's the hacking towards popt-1.14 so far:
1.13 -> 1.14:
- jbj: expose poptSaveLongLong and poptSaveString in the loader
map.
- jbj: add POPT_ARG_ARGV, starting with the poptSaveString()
method.
- jbj: add help for POPT_ARG_LONGLONG.
- jbj: hmmm, POSIXly correct --echo-args needs fixing, disable
for now.
- jbj: poptint.h: typedef's for string and string arrays.
- jbj: add POPT_ARG_LONGLONG, and poptSaveLongLong().
- jbj: poptint.h: add poptSubstituteHelpI18N() to bury the ABI
hack.
- jbj: start using poptArg and poptArgType() where useful.
- jbj: poptint.h: add a poptArgType define for bitfield type
abstraction.
- jbj: poptint.h: add a poptArg union for opt->arg access
without casts.
- jbj: include "-- Terminate options" end-of-options msg in
poptHelpOptions.
- jbj: opt->argDescrip[0] determines "--foo=bar" or "--foo bar".
- jbj: --long always padded for alignment with/without "-X, ".
- jbj: Display shortName iff printable non-space.
- jbj: POPT_AUTOALIAS: if no popt aliases/execs, don't display
the sub-head.
- jbj: add --libdir=/%{_lib} to popt.spec.
- jbj: add .cvsignore to m4 subdirectory.
- jbj: remove duplicate nb locale from ALL_LINGUAS.
- jbj: autogen.sh: on linux, add --libdir=/lib (no /lib64
autodetect yet).
I've got a reproducer for a "--foo=bar" (broken) vs. "--foo
bar" (works) issue
with popt aliases that will take a day or so to figger,
There's also some apparent breakage in the testit.sh script with non-
POSIXLYCORRECT
argument lists that will need some fixing. Dunno when popt broke, but
it appears more than
2 years ago form some quick checks (note "quick", I could easily be
wrong or misinformed or
glibc of gcc or otherwise clueless ...)
Enjoy!
73 de Jeff
______________________________________________________________________
POPT Library http://rpm5.org
Developer Communication List [email protected]