• make fast character classes even faster by removing the C_SUBOP2 hack
in favour of a separate seldom-used ksh_issubop2 macro (which also
makes ctype() side-effect-safe) which is a slower class (no change there)
• optimise cases of ksh_isalphx followed by a ksh_isalnux loop
(used parsing variable names)
• remove a misleading comment in initctypes() about \0 from pdksh
• rename C_ALPHA to C_ALPHX to make it more clear the underscore is included
• sprinkle a few ord() in there
• add new ksh_isalpha() which tests for [A-Za-z] (slow character class)
• there is no '_:\' drive on OS/2 (which inspired the whole changeset)
• print ulimit -a with the flag, like most other shells do
• move ulimit-1 regression test to ulimit-2 and exclude on Haiku:
it can only set the -n and -V limits AFAICT
• document that some OSes (here: Haiku) can only set the soft limits
(so “ulimit -nS 1024” is okay but -S is required)
• check “ulimit -c 0”, which dot.mkshrc uses, everywhere
(if it errors out, hack around it or stub it out with MKSH_NO_LIMITS)
related to that:
• while AT&T ksh may do it, POSIX says nothing about allowing
declaration commands only without vars and redirections, and
“without vars” especially seems against which commands they are
• fix relationship between forwarders and real declaration commands
• clean up c_builtin vs shcomexec mess
Also, re-run “make repool” with a fixed src/scripts/stringpool.sh,v 1.3
extproc does not pass a full path of a script. To find it, check
the existence of it manually in the current directory before in $PATH.
This is the fix of regression of commit
1b4d572b77.
modified: main.c
A command in a current directory should be executed only if $PATH
contains the directory such as '.'.
This will improve the compatibility with Unix shell script and the
security.
modified: exec.c
This reverts commit 89d461dd83.
To avoid the incompatibility with Unix shell scripts not expecting that
a current directory is searched first and the security problems, let a
user prepend "." to $PATH explicitly if needed.
modified: exec.c