Mail Archives: djgpp/2017/01/29/13:39:13
This is a port of GNU Sed 4.3 to MSDOS/DJGPP.
sed is a stream editor. A stream editor is used to perform basic text
transformations on an input stream (a file or input from a pipeline).
While in some ways similar to an editor which permits scripted edits
(such as ed), sed works by making only one pass over the input(s), and
is consequently more efficient. But it is sed's ability to filter text
in a pipeline which particularly distinguishes it from other types of
editors.
Please, read carefully the NEWS file to see the user visible changes
and read the info or html docs to become familiar with the program.
For beginers the chapter: examples in the info doc may be instructive.
The chapter: Other resources for learning about 'sed' contains pointers
to usefull sed specific urls.
DJGPP specific changes.
=======================
- There are no DJGPP specific user visible changes. Major adjustments were
required to get the new and even more posix centric testsuite working with
MSDOS/DJGPP.
- This is the first port that has been compiled using djdev205. Starting
with this port version I will no longer support neither djdev204 nor djdev203.
- The port has been configured and compiled on WinXP SP3 and Win98SE. There
is no guarantee that this may be possible with any other DOS-like OS. Due
to the massive use of long file names it will not be possible to configure
and compile without LFN support. The port has been compiled using gcc346
and bnu227b.
- The port has been tested by using it. I have used them only on WinXP.
It has worked flawlessly. I do not konw if this will ever be the case on
FreeDOS. I have never used/tested them in that environment.
- To be able to build this port you may need to have LFN support.
As usual, all djgpp specific files (diffs, README files, etc.) are stored in
the /djgpp directory. The sources have been configured to be build in the
"_build" directory. If for some reason it does not work for you, delete it
contents and configure from scratch again.
Please read the docs to become familiar with this product.
Here is an extract of the NEWS file showing the user visible changes from
the last port (GNU Sed 4.2.2) to this one:
-------------------------------------------------------------------------------
* Noteworthy changes in release 4.3 (2016-12-30) [stable]
** Improvements
sed's regular expression matching is now typically 10x faster
sed now uses unlocked-io where available, resulting in faster I/O
operations.
** Bug fixes
sed no longer mishandles anchors ^/$ in multiline regex (s///mg)
with -z option (NUL terminated lines). [Bug introducted in sed-4.2.2
with the initial implementation of -z]
sed no longer accepts a ":" command without a label; before, it would
treat that as defining a label whose name is empty, and subsequent
label-free "t" and "b" commands would use that label. Now, sed emits
a diagnostic and fails for that invalid construct.
sed no longer accesses uninitialized memory when processing certain
invalid multibyte sequences. Demonstrate with this:
echo a | LC_ALL=ja_JP.eucJP valgrind sed/sed 's/a/b\U\xb2c/'
The error appears to have been introduced with the sed-4.0a release.
The 'y' (transliterate) operator once again works with a NUL byte
on the RHS. E.g., sed 'y/b/\x00/' now works like tr b '\0'. GNU sed
has never before recognized \x00 in this context. However, sed-3.02
and prior did accept a literal NUL byte in the RHS, which was possible
only when reading a script from a file. For example, this:
echo abc|sed -f <(printf 'y/b/\x00/\n')|cat -A
is what stopped working. [bug introduced some time after sed-3.02 and
prior to the first sed-4* test release]
When the closed-above line number ranges of N editing commands
overlap (N>1), sed would apply commands 2..N to the line just
beyond the largest range endpoint.
[bug introduced some time after sed-4.09 and prior to release in sed-4.1]
Before, this command would mistakenly modify line 5:
$ seq 6|sed '2,4d;2,3s/^/x/;3,4s/^/y/'
1
yx5
6
Now, it does not:
$ seq 6|sed '2,4d;2,3s/^/x/;3,4s/^/y/'
1
5
6
An erroneous sed invocation like "echo > F; sed -i s//b/ F" no longer
leaves behind a temporary file. Before, that command would create a file
alongside F with a name matching /^sed......$/ and fail to remove it.
sed --follow-symlinks now works again for stdin.
[bug introduced in sed-4.2.2]
sed no longer elides invalid bytes in a substitution RHS.
Now, sed copies such bytes into the output, just as Perl does.
[bug introduced in sed-4.1 -- it was also present prior to 4.0.6]
sed no longer prints extraneous character when a backslash follows \c.
'\c\\' generates control character ^\ (ASCII 0x1C).
Other characters after the second backslash are rejected (e.g. '\c\d').
[bug introduced in the sed-4.0.* releases]
sed no longer mishandles incomplete multibyte sequences in s,y commands
and valid multibyte SHIFT-JIS characters in character classes.
Previously, the following commands would fail:
LC_ALL=en_US.UTF-8 sed $'s/\316/X/'
LC_ALL=ja_JP.shiftjis sed $'/[\203]/]/p'
[bug introduced some time after sed-4.1.5 and before sed-4.2.1]
** Feature removal
The "L" command (format a paragraph like the fmt(1) command would)
has been listed in the documentation as a failed experiment for at
least 10 years. That command is now removed.
** Build-related
"make dist" now builds .tar.xz files, rather than .tar.gz ones.
xz is portable enough and in wide-enough use that distributing
only .tar.xz files is enough. It has been fine for coreutils, grep,
diffutils and parted for a few years.
** New Features
new --sandbox option rejects programs with r/w/e commands.
-------------------------------------------------------------------------------
The port consists of the usual three packages produced using djdev205
that can be downloaded from ftp.delorie.com and mirrors as (time tamp 2017-01-29):
Sed 4.3 binary, info and man format documentation:
ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/sed43b.zip
Sed 4.3 dvi, html, pdf and ps format documentation:
ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/sed43d.zip
Sed 4.3 source:
ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/sed43s.zip
Send Sed specific bug reports to <bug-sed AT gnu DOT org>.
Send suggestions and bug reports concerning the DJGPP port
to comp.os.msdos.djgpp or <djgpp AT delorie DOT com>.
Enjoy.
Guerrero, Juan Manuel <juan DOT guerrero AT igd DOT fhg DOT de>
- Raw text -