tg
9afaf050d8
fix utilities-getopts-1 and utilities-getopts-2
2009-10-15 16:32:50 +00:00
tg
c7a8b367f8
remove regression-44 in favour of utilities-getopts-1 (the former checked
...
the AT&T ksh88 behaviour, the latter the AT&T ksh93 behaviour, which dif-
fer from each other, on the very same thing with the exact same test)
2009-10-15 16:32:23 +00:00
tg
8b4314cbcd
fix exec-function-environment-1 (I hope this doesn’t break anything else!)
2009-10-15 16:25:15 +00:00
tg
0d1ef736c7
modify the oksh-varfunction regression test to reflect that, indeed, a
...
change of a variable inside a Bourne style POSIX function will affect
the current execution environment of the function caller (to be consi-
stent with exec-function-environment-1)
2009-10-15 16:24:49 +00:00
tg
7b8f207cc9
new exec-function-environment-1 replacing exec-simple-1 from posh, after
...
reading SUSv4 throughoutly
cf. Message-ID: <Pine.BSM.4.64L.0910151542460.4645@herc.mirbsd.org>
2009-10-15 16:15:03 +00:00
tg
ce7359ffc5
posh’s utilities-echo-2 is actually incorrect; reason here
...
cf. Message-ID: <Pine.BSM.4.64L.0910151525270.4645@herc.mirbsd.org>
2009-10-15 15:32:34 +00:00
tg
a9ca7a04c8
add two regression tests from Debian posh, adjusted to pass with ksh93
2009-10-15 15:23:41 +00:00
tg
25516ac756
another exit code in substitution questionable thing
...
split this one by set ±o sh
2009-10-15 14:58:51 +00:00
tg
84f8d3191a
make some of these tests more posh-friendly
2009-10-15 14:12:46 +00:00
tg
8f3f520725
AIX {,/usr}/bin/bsh is an SVR3 Bourne Shell, according to Sven Mascheck,
...
so I must not use foo="…`…"…"…`…" at all
2009-10-15 12:58:34 +00:00
tg
620b4446d7
make exit-eval-1 an expected-fail for now, until we can fix this
2009-10-15 12:50:11 +00:00
tg
b694bde402
rename regression-56 into exit-eval-1 and change expected output
...
from what AT&T ksh88 does to what AT&T ksh93 does and POSuX expects
Reported by Clint Adams as Debian #550717 , to be fixed...
2009-10-14 18:06:57 +00:00
tg
888c7befea
group exit-related tests
2009-10-14 18:04:52 +00:00
tg
549888a183
while testing haserl-0.9.26 on MirBSD, I discovered that the echo builtin
...
in FSH mode did in fact, contrary to POSIX and Debian Policy 10.4 behavi-
our (I think), interpret escape sequences; fix and add testsuite for echo
2009-10-10 21:17:31 +00:00
tg
b4a32ff5f7
cygwin seems to force a+x for files beginning with ':\n' so prepend
...
a nop newline to make mksh.exe pass this test
2009-10-10 17:39:48 +00:00
tg
73147a7fe9
fix lazy evaluation of assignments in ternary ops
2009-10-04 13:19:33 +00:00
tg
5f58261287
fix long-standing parenthesēs problem: ((foo) || bar) is now parsed corr.
2009-10-04 12:45:23 +00:00
tg
c2e5737fca
fix dollar quotes in here strings and here documents (regression)
2009-10-04 12:44:19 +00:00
tg
40d11a2066
on the other hand, this is a regression in mksh, apparently
2009-10-04 03:13:06 +00:00
tg
33b9f8b666
* rename "set -o posix" (FPOSIX) to "set -o sh" (FSH) because it's not
...
just a "somewhat more POSIX" but also a "/bin/sh legacy kludge" mode
* consistently capitalise POSIX and SUSv3/SUSv4 (same as AT&T ksh) and
Bourne shell
2009-10-02 18:08:37 +00:00
tg
2ea131ab1f
make another Debian posh bug into a regression test (expected-fail)
2009-10-02 17:05:01 +00:00
tg
c0589fd329
fix typos, From: Clint Adams <schizo@debian.org>
2009-10-02 16:59:53 +00:00
tg
ff8b75f46f
SUSv4 says that there be exit 127; the old code tried but failed, so it
...
was an actual programmatical bug…
2009-09-29 12:28:13 +00:00
tg
c8955138ec
• avoid calling arc4random_pushb for inheritance and other redundant items;
...
call it only if $RANDOM is indeed set (although pool extension would be a
possibility we do have arc4random_atexit which does it nicely too)
• avoid calling setspec for int→str conversion just before execve()
2009-09-27 10:31:06 +00:00
tg
7b7b75b026
* move the utf_* functions to a smaller file, to reduce the pain the
...
CPU has to endure while gcc is crunching on edit.c
* comment on mksh not using _exactly_ OPTU-8/OPTU-16 (XXX)
2009-09-26 04:01:34 +00:00
tg
a59d14b565
further optimise and simplify the handling of $RANDOM, reads and writes
...
to it are now either arc4random or rand/srand, but srand retains the old
state; set +o arc4random is no longer possible, but if it's there we use
arc4random(3), if not, we use rand(3) for $RANDOM reads; optimise special
variable handling too and fix a few consts and other minor things
2009-09-26 03:40:03 +00:00
tg
b50b43e3bf
get rid of "U getenv"
2009-09-26 01:08:27 +00:00
tg
1dfb13b603
change undef/def MKSH_NOVI into 0/1 MKSH_S_NOVI flag (with more to come:
...
MKSH_S_EDIT for small (Emacs) editing mode, MKSH_S_FEAT for all the dis-
abled language features), which can be set to 0 despite MKSH_SMALL being
defined to re-enable the Vi command line editing mode (which I wouldn't,
but fits into the general mastermind scheme)
2009-09-24 17:15:33 +00:00
tg
f00db85c98
SUNWcc related fixes for normal and MKSH_SMALL
2009-09-23 18:22:38 +00:00
tg
1a28786229
* shrink MKSH_SMALL even further by removing functionality like
...
some GNU bash extensions (suggested by cnuke@) and bind macros
* make the random cache more efficient (and the code potentially
smaller, although we have a new implementation of the oaat hash
function, alongside the old one, now) and pushb only if needed
(i.e. state has changed or user has set $RANDOM, but not onfork)
2009-09-23 18:04:58 +00:00
tg
1ea1096a4e
Add a hack input function for VT100-style key sequences; support
...
Ctrl-CurLeft and Ctrl-CurRight (not quite ANSI, but fits the scheme)
2009-09-20 17:23:52 +00:00
tg
08ec9ca3ab
fix (another… *sigh*) inverse logic error
2009-09-20 17:18:53 +00:00
tg
2ef07a6cc9
shrink MKSH_SMALL by removing certain editor functionality (e.g. the tilde
...
hack) and functions (up/down/titlecase words; search history PgUp/PgDn)
2009-09-20 17:00:53 +00:00
tg
588921333e
more of this:
...
• shell flags are now handled in one single place (sh_flags.h)
• sync comments (between enum and array) and manpage with reality
• FMONITOR is now no longer needed for Hartz IV shells
2009-09-20 16:40:58 +00:00
tg
0cf2df79e9
if things need to be in a specific order, use automated means to provide
...
such order, instead of relying on manually retaining it…
2009-09-20 15:38:07 +00:00
tg
f8a84f9b46
optimise
2009-09-20 13:33:48 +00:00
tg
ca8b2b534c
use a slightly different algorithm for arc4random_pushb interfacing:
...
rate-limit calls to CryptGenRandom to every 2‥4 minutes, if the last
call was successful, and operate with hash() on rnd_cache[], so that
it is mixed in a better way
2009-09-20 13:29:18 +00:00
tg
3630e1f7dc
only one digits instance, thank you very much
2009-09-20 13:08:12 +00:00
tg
8a0c68a184
document cid 1004AB55AA4341EC755, printf builtin may use $'...' backslash
...
expansion code instead (and the one from the print builtin for %b), same
as AT&T ksh93 does
2009-09-20 12:12:00 +00:00
tg
01239f35eb
un-do a workaroung for something fixed by 1004AB55BFD3DADFED4
2009-09-19 22:33:10 +00:00
tg
bd3b330477
\x only auto-converts to unicode for $'…' and printf if >0xFF
2009-09-19 22:32:23 +00:00
tg
9fd4b9db41
$'…' functionality, documentation improvements, fixes for backslash
...
expansion in all modes, regression tests for both kinds of backslash
expansion; unbksl() revamp; make CTRL macro available globally
2009-09-19 21:54:46 +00:00
tg
c8eb13a13f
align with C standard (optional C style); document differences to C style
...
for print builtin (align with ksh93 ipv GNU bash)
2009-09-19 19:08:48 +00:00
tg
7806fe510a
allow “function stop () {” (bashism, an evil one)
2009-09-19 18:36:59 +00:00
tg
e0f000fb83
new function unbksl doing "backslash expansion" independent of c_print();
...
also make a separate subsection about it in the manpage
2009-09-19 15:16:05 +00:00
tg
3639137e48
another ksh93 feature: test -o ?foo (almost zero cost)
2009-09-07 17:24:49 +00:00
tg
ce24c5da13
• more on pipelines vs subshells
...
• remove some superfluous spaces
2009-09-06 18:17:51 +00:00
tg
9dd98da40d
Support Dave Korn’s alternative 「'a'」 (or 「'…'」) form for base-one
...
integers in addition to my 「1#a」 (or 「1#…」), which also allows for
finer end-of-character checking. Note that this is locale-dependent in
ksh93, set ±U dependent in mksh, and mksh’s OPTU-16 encoding is used.
2009-09-06 17:55:55 +00:00
tg
9531e12b36
merge the nameref code, using mksh standard scoping as discussed
2009-09-06 17:42:15 +00:00
tg
574d6725aa
document more differences to ksh93; here: static vs dynamic scoping
2009-09-05 17:12:49 +00:00