a bit more with POSIX and the other shells
I considered http://austingroupbugs.net/view.php?id=253 but the use
of bi_errorf() is interesting, especially as it’s often enough a
noreturn function, and funnily enough, 'cd -P /foo' returns 0 while
'chdir -P /foo' fails (so idk where to put -e)…
⇒ consider merging simplify_path()
• move funcs.c:c_cd() to misc.c
• make misc.c:make_path() static, c_cd() is its only user
⇒ mark as obsolete
• tweak misc.c:set_current_wd() to drop ksh_get_wd() argument
should be no code change, but the entire path stuff is a mess…
so expect actual implementation changes or even rewrites shortly
to catch several very slow cases (especially “*@(*foo)” busy-loops
– spotted by Jb_boin as usual these days ☺) by converting all @(…)
with one case to drop the enclosing MAGIC(…), and in a second pass
collapsing adjacent asterisk (‘*’) wildcards
character anchoring the pattern (‘#’ or ‘%’) must be skipped
if one was used; fixes “BLA="#test"; echo "${BLA//#/}"” busy
looping (due to null pattern) found by Jb_boin
and switches to the TARGET_OS=Linux
• introduce android as regression test suite category
• add an android specific standard alias
• clean up redundant ‘-o sh’ arg in a few checks
UTF-8 BOM instead (UTFMODE has a separate value now for activated
during BOM skipping)
• parsing a COMSUB now skips UTF-8 BOM, too, but only temporarily
(token stream, lexer output / parser input), EOS terminated, let
SASPAREN use the same lexing as SBASE (e.g. COMSUB recursively)
• make wdstrip recursive
• fix processing of COMSUB in wdstrip
⇒ pass comsub-1 test
• expose another debugging function
• use shf_putc (macro), shf_putchar (function) ipv tputc
• replace shf_putchar(x,y) calls for side-effect-less x with shf_putc
• plug another bug in the tree code – '\' → "\\" (backslashes must be
escaped inside double quotes, too)
• adjust testsuite (and, I _had_ wondered…)
EOF) # works again now, plugging a regression
• rewrite the here document parsing code to be *much* more efficient
(and a bit more readable too!) using goto, while here (no kidding)
① currently: ((cond) ? true : false) but (!!(cond)) and casting to bool,
the latter only if stdbool.h, would also work – which performs best on
(and across) all supported systems?