Drop wordexp(3), instead unroll via fnmatch(3)..
commit858374bd391fcb8449dc3c049783d347585be992
authorSteffen (Daode) Nurpmeso <steffen@sdaoden.eu>
Mon, 11 Jul 2016 17:13:43 +0000 (11 19:13 +0200)
committerSteffen (Daode) Nurpmeso <steffen@sdaoden.eu>
Thu, 15 Sep 2016 13:57:55 +0000 (15 15:57 +0200)
tree8d31c7b2d025bbc4634c8502fd017c250ddb3a30
parent867033afecfbdefed4d21cd15482eecb5bde233c
Drop wordexp(3), instead unroll via fnmatch(3)..

Yes, some OSs don't have wordexp(3), or implement it with a sh(1)
subprocess, or even (Mac OS X Snow Leopard) perl(1) (there with
memory leaks, too).
We're better off like that.

While here add a PS_EXPAND_MULTIRESULT hack: it would be too
invasive for now to change fexpand() all the way to adjust the
return value for FEXP_MULTIOK, but now that HT expansion is
a regular feature we should improve it at least a bit so that we
don't inject potentially thousands of results onto the line.

So instead indicate through a global pstate hack that fexpand()
produced multiple results (only with FEXP_MULTIOK), and instead of
producing a single, ASCII SPACE separated string, generate an
array of NUL terminate strings that is terminated with NUL NUL,
then.
mk-conf.sh
nail.1
nail.h
nailfuns.h
shexp.c