dtksh: Upgrade ksh93 to 1.0.0-beta.2 2021-12-28
Patch from current ksh93 maintainer <https://github.com/ksh93/ksh>. cde/programs/dtksh/ksh93/**: - Upgraded. A load of bugs fixed, some minor features added. See NEWS from 2021-02-01 upwards. cde/programs/dtksh/Makefile.am: - Don't cd into ksh93 any more to invoke the package or shtests scripts; they now automatically find their directories. - Pass $(CFLAGS) to build ksh with optimisation. - Remove -D_std_malloc flag as vmalloc is now deprecated and disabled by default. - Add a 'make check' target to Makefile.am that runs the ksh93 regression tests on dtksh to make sure the additions don't interfere with anything. It skips running the tests with shcomp because CDE doesn't use that. The tests all pass here on Slackware 14.2. :-) cde/programs/dtksh/init.patch: - Removed; I've upstreamed it. It was the only one that wasn't upstreamed yet, and more code cleanups are coming, breaking downstream patches. If something needs updating, just email me a diff. cde/programs/dtksh/dtkcmds.h: - Update the ADDBUILTIN macro to remove the __PROTO__ macro use. The proto(1) tool, responsible for all such pre-C89 K&R C compatibility voodoo, has been removed, so that macro is no longer defined. cde/programs/dtksh/setup.sh: - Workaround script removed. I rewrote 'bin/package flat make' in a way that works correctly and changed Makefile.am to use that instead. Hope this helps. Happy new year.
This commit is contained in:
committed by
Jon Trulson
parent
d5e651ecf3
commit
bf00d3b274
@@ -101,7 +101,7 @@ the man page for ksh93 is kept up to date.
|
||||
|
||||
The only major new interactive features are key binding and tab completion.
|
||||
Major new language features are floating point arithmetic,
|
||||
associative arrays, complete ANSI-C printf, name reference
|
||||
associative arrays, complete ANSI C printf, name reference
|
||||
variables, new expansion operators, dynamic loading of
|
||||
built-in commands, active variables, and compound variables.
|
||||
Active and compound variables allow shell variables to
|
||||
@@ -164,7 +164,7 @@ bash compatibility mode.
|
||||
</UL>
|
||||
<LI>
|
||||
<EM>version</EM>--
|
||||
a lower-case letter signifying major release points.
|
||||
a lowercase letter signifying major release points.
|
||||
An optional <STRONG>-</STRONG> following <EM>features</EM> signifies an alpha release.
|
||||
The first stable release has no <STRONG>-</STRONG>.
|
||||
An optional <STRONG>+</STRONG> signifies a stable release with bug patches and minor enhancements.
|
||||
@@ -180,7 +180,7 @@ in a numeric context is an integer that encodes the release
|
||||
<DT>What new features are planned for ksh?<DD>
|
||||
|
||||
We are in the early stage of planning but the likely additions
|
||||
are namespaces, ability to read xml and json object into shell variables,
|
||||
are namespaces, ability to read XML and JSON object into shell variables,
|
||||
and handling of queued signals.
|
||||
Support for multi-threading is also being considered.
|
||||
|
||||
@@ -254,7 +254,7 @@ that supports a subset of the 1988 KornShell language.
|
||||
|
||||
ksh has been written to be portable.
|
||||
It has been ported to virtually run on every known UNIX system.
|
||||
In addition it runs on non-UNIX systems such as IBM's MVS using OpenEdition, and
|
||||
In addition, it runs on non-UNIX systems such as IBM's MVS using OpenEdition, and
|
||||
Microsoft's Windows 9X, Windows NT and Windows 2000.
|
||||
ksh is part of the UWIN (Unix for Windows)</A>
|
||||
software,
|
||||
@@ -389,7 +389,7 @@ If you run
|
||||
kill -l $?
|
||||
</DIV>
|
||||
</PRE>
|
||||
on this signal number, it will give the the name of the signal
|
||||
on this signal number, it will give the name of the signal
|
||||
that caused this exit.
|
||||
|
||||
<DT>When I type builtin, I notice that some of these are full pathnames. What does this mean?<DD>
|
||||
@@ -464,7 +464,7 @@ is to make the command a builtin. On systems in which the cmd
|
||||
library is installed, you can invoke 'builtin -f cmd mv' to make
|
||||
mv a shell builtin in which case the line length limit no longer
|
||||
applies. Another alternative is to use a for loop and invoke
|
||||
the mv command for each file, for exampe,
|
||||
the mv command for each file, for example,
|
||||
'for i in *;do mv $i ../elsewhere;done'.
|
||||
Starting with ksh93o+, a new feature was added to ksh to overcome
|
||||
this limit in some cases. If a command is preceded by
|
||||
@@ -549,9 +549,9 @@ read x
|
||||
The $'...' string literal syntax was added to ksh93 to solve the problem
|
||||
of entering special characters in scripts.
|
||||
It uses
|
||||
ANSI-C rules to translate the string between the '...'.
|
||||
ANSI C rules to translate the string between the '...'.
|
||||
It would have been cleaner to have all "..." strings handle
|
||||
ANSI-C escapes, but that would not be backward compatible.
|
||||
ANSI C escapes, but that would not be backward compatible.
|
||||
|
||||
<DT>What is the -n option used for?<DD>
|
||||
|
||||
@@ -600,7 +600,7 @@ hand side, which removes the special meaning of pattern match
|
||||
characters, then this becomes a string comparison so that
|
||||
[[ "$foo" == "bar" ]] and [[ "$bar" == "$foo" ]] are equivalent.
|
||||
|
||||
<DT>Why does ksh93 have print since echo already exists is is widely used?<DD>
|
||||
<DT>Why does ksh93 have print since echo already exists and is widely used?<DD>
|
||||
|
||||
The behavior of echo varies from system to system.
|
||||
The POSIX standard does not define the behavior of echo when
|
||||
@@ -620,7 +620,7 @@ as if you had invoked it as echo foo | (read bar).
|
||||
<DT>How can I access a substring of a variable?<DD>
|
||||
|
||||
The syntax ${varname:offset:len} can be used to generate
|
||||
the string of length len starting at the the specified
|
||||
the string of length len starting at the specified
|
||||
offset. String offsets start at 0. If :len is omitted,
|
||||
then the remainder of the string will be used. Both offset
|
||||
and len can be arithmetic expressions. A negative offset is
|
||||
@@ -771,9 +771,9 @@ or indexed, use ${!var[@]}.
|
||||
<DT>How do I do global substitutions on the contents of shell variables?<DD>
|
||||
|
||||
Use // instead of / for global substitution, ${var//aa/bb} will
|
||||
expand to the value of with each "aa" replace by "bb".
|
||||
expand to the value of var with each "aa" replaced by "bb".
|
||||
|
||||
<DT>How can I convert %XX values to ascii?<DD>
|
||||
<DT>How can I convert %XX values to ASCII?<DD>
|
||||
|
||||
You can convert this to a sequence of ANSI C strings and then eval that
|
||||
string, for example suppose the variable 'foo' contains %XX strings, then
|
||||
@@ -782,7 +782,7 @@ string, for example suppose the variable 'foo' contains %XX strings, then
|
||||
eval print -r -- "\$'${foo//'%'@(??)/'\x\1"'\$'"}'"
|
||||
</DIV>
|
||||
</PRE>
|
||||
will print out the string in ascii.
|
||||
will print out the string in ASCII.
|
||||
|
||||
<DT>I want to use exec to open a file. How do I prevent the script from exiting if the exec fails?<DD>
|
||||
|
||||
@@ -894,19 +894,19 @@ Alternatively, <# and ># can be followed by a shell pattern. In this
|
||||
case, the file will be positioned to beginning of the next line
|
||||
containing this pattern.
|
||||
|
||||
<DT>What is the the <<< redirection operator?<DD>
|
||||
<DT>What is the <<< redirection operator?<DD>
|
||||
|
||||
It denotes a here-document in which the document is contained the
|
||||
argument that follows <<< and therefore there is no delimiter.
|
||||
|
||||
<DT>What is the the >; redirection operator?<DD>
|
||||
<DT>What is the >; redirection operator?<DD>
|
||||
|
||||
This operator writes the output into a temporary file in the same
|
||||
directory as the file specified after >;. If the command completes
|
||||
successfully, then the the file is replaced. Otherwise, the
|
||||
successfully, then the file is replaced. Otherwise, the
|
||||
original file is unchanged and the temporary file removed.
|
||||
|
||||
<DT>What is the the <>; redirection operator?<DD>
|
||||
<DT>What is the <>; redirection operator?<DD>
|
||||
|
||||
The file is opened for reading and writing as with <>. However,
|
||||
when the file is closed it is truncated to the its current location.
|
||||
|
||||
Reference in New Issue
Block a user