tg
d57a033057
• no longer use <stdbool.h> even if it’s available
...
• ensure that bool/true/false are cpp macros, overriding any pre-defined
• document the requirement that tobool(x) must map any-type 'x' into bool
• document the requirement that a bool must only be true or false, and
that it (tobool() rather) must have an identity mapping to 'short'
• possibly fix ksh_func for/and fpFUNCTf – maybe spotted by cnuke@
2011-04-09 15:14:55 +00:00
tg
2dbf82a737
no // style comments in my source code!
2011-04-09 15:05:44 +00:00
tg
63a08586be
easier debugging with HAVE_STDBOOL_H=0 for if bool is indeed built-in
2011-04-09 14:58:53 +00:00
tg
e4e5229513
shut up valgrind, thanks wbx@ for prodding
2011-04-02 13:55:35 +00:00
tg
7d3643d7b4
skip the UTF-8 BOM early, then check the magic (ELF, a.out, COFF, …)
2011-04-02 10:30:11 +00:00
tg
a7091123aa
Add “-C regress:no-ctty” option to test.sh for Fedora chroots
...
STRONGLY DISCOURAGED
2011-03-28 21:58:06 +00:00
tg
b91b037e6a
we got a decision on pathnames with exactly two leading slashes
...
thanks, Eric and David!
2011-03-28 21:31:01 +00:00
tg
6fddfc009b
I made a mistake in the tests; this stuff works always (and can be tested)
...
but triggers only for /bin/sh if MKSH_BINSHREDUCED (otherwise needs -o sh)
2011-03-28 21:18:00 +00:00
tg
6784af6dbd
• use mksh getopts to parse options in test.sh, collapse multiple -C args
...
• sort arguments
2011-03-28 21:15:05 +00:00
tg
19e128c4e1
add testcases, bump vsn
2011-03-28 08:40:42 +00:00
tg
e19d8612ad
another Debian workaround for /bin/sh: don’t pattern in trims
2011-03-28 08:27:09 +00:00
tg
e8ea9954aa
• Implement http://austingroupbugs.net/view.php?id=367 and align things
...
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)…
2011-03-27 18:50:06 +00:00
tg
ad3707d17d
don’t leak memory (pdksh did), and forgot a hunk
2011-03-27 01:30:38 +00:00
tg
5f31b8c97a
• bring back test -H ifdef S_ISCDF (for HP-UX)
...
• whitespace, etc.
• bump version for tonight, I’m not gonna hack on c_cd,
all this pathname stuff is mind-boggling…
2011-03-26 21:46:06 +00:00
tg
a55de5f840
• rewrite simplify_path() to keep more in line with do_realpath()
...
• add regression test to ensure that //foo pathnames are never simplified
2011-03-26 21:09:09 +00:00
tg
7d86eaba8c
simplify code to use existing $PWD
2011-03-26 19:43:49 +00:00
tg
e3ed074981
use existing code
2011-03-26 19:35:35 +00:00
tg
c2333a7dbd
simplify_path: we CANNOT simplify pathnames beginning with //
...
since they’re implementation-defined and *not absolute*!
2011-03-26 19:29:41 +00:00
tg
79862cc1f4
one more from Austin ML
2011-03-26 16:19:29 +00:00
tg
84f7055f8f
special-case another bizarre POSIX corner case
...
after david korn agreed to change ksh93 to match
2011-03-26 16:11:43 +00:00
tg
b1d97ea44e
temporary patch for Cygwin against cd breaking UNC pathnames
...
from Chris “ironhead” Sutcliffe
2011-03-26 15:37:19 +00:00
tg
2dffc771ac
new (some possible) testcases from Austin ML, and one fix
2011-03-26 15:32:37 +00:00
tg
803c51914b
• move funcs.c:do_realpath() to misc.c and make it global
...
⇒ 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
2011-03-24 19:05:49 +00:00
tg
8d8ee0cc6a
ironhead reported in IRC that some Cygwin guys (not he, he’s just the
...
packager) complain that mksh collapses two leading slashes; IIRC POSIX
has a clause for UNC pathnames, so stop doing that, plus add a test
2011-03-23 18:47:07 +00:00
tg
bc4c3b9af0
• save/restore here document pointer during yyrecursive(), fixes crash
...
• add mirbsd/openbsd (omalloc rules!) specific testcase for the above
• $__progname must be used quoted, fix in comsub-torture testcase (my bad)
2011-03-21 21:57:35 +00:00
tg
3c41d2b063
fix cast; bump version
2011-03-17 22:09:23 +00:00
tg
2f2fe89157
• write a pattern optimiser and call it before invoking do_gmatch(),
...
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
2011-03-17 22:00:45 +00:00
tg
a1a5922fc6
• make misc.c(gmatch.c):pat_scan() static and fix int → bool
2011-03-17 21:59:30 +00:00
tg
d4e19b6624
• make DEBUG:dumpchar() not static (consider rolling into shf?)
2011-03-17 21:58:40 +00:00
tg
d07bacd44a
• fix check for empty pattern in ${foo/bar/baz} expansion: the
...
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
2011-03-17 21:57:50 +00:00
tg
5239e8ea4c
actually, we need the android lsmod to be a builtin not an alias…
2011-03-16 20:56:33 +00:00
tg
1c22b3cc48
oops
2011-03-16 20:43:34 +00:00
tg
b7824978ad
RCSID sync with openbsd, one we had already, one Okan Demirmen stole
...
from mksh (but attributed, so it’s okay, considering the amount of
patch is not large enough to warrant copyright stuff)
2011-03-16 20:31:33 +00:00
tg
79c6d6043e
• introduce a virtual TARGET_OS=Android that just sets a check category
...
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
2011-03-16 20:26:36 +00:00
tg
750ad16f3d
“__attribute__((format (printf, 1, 2)))” and “#define printf printfoo”
...
don’t play well with each other – Bionic uses the former, unlike most…
2011-03-16 20:03:21 +00:00
tg
fd0d60b71b
testsuite for mksh-small needs adjusting
2011-03-13 17:07:08 +00:00
tg
e4b0313044
sync with oksh (nop, RCS IDs only)
2011-03-13 16:35:54 +00:00
tg
4e7d9bdb33
we need not only store into the retrace buffers recursively but also ungetsc
2011-03-13 16:20:45 +00:00
tg
91ec264cb8
fix/sync comments
2011-03-13 16:07:36 +00:00
tg
af53a7d16a
• speed optimisation: drop SF_FIRST flag, factor out skipping the
...
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
2011-03-13 16:03:54 +00:00
tg
e66eaab861
let SLETARRAY use SRETRACE, too
2011-03-13 15:57:23 +00:00
tg
f16386954d
drop dead code
2011-03-13 15:31:46 +00:00
tg
68162acef7
if DEBUG, abort() on rogue pointers
2011-03-13 10:50:44 +00:00
tg
2a3d4db123
lint is your friend
2011-03-13 01:20:25 +00:00
tg
5710e78857
implement better SASPAREN handling (actually, reusable very good for the
...
case where SASPAREN→COMSUB downgrading is done) by “logging” input and
restarting from there if needed
2011-03-13 01:11:58 +00:00
tg
9b8fafb757
correct documentation
2011-03-12 23:16:51 +00:00
tg
a3c79ad771
now fix that segfault and other bug from yesternight
...
do it like ksh93 though, not like bash and zsh
2011-03-12 23:06:43 +00:00
tg
75db4cdb56
• back out the EXPRSUB change
...
• optimise some code
• split testcase into two, one with expected-fail
2011-03-12 23:04:48 +00:00
tg
ff0a3c8a8a
SASPAREN changes have the same problem, revert too for now
2011-03-12 22:44:28 +00:00
tg
fc42105199
revert SLETARRAY changes for now, this introduces problems
2011-03-12 22:40:02 +00:00