www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-announce/2014/06/19/18:20:58

Message-Id: <201406192218.s5JMIS2F019700@delorie.com>
Date: Fri, 20 Jun 2014 01:21:02 +0200
From: Juan Manuel Guerrero <juan DOT guerrero AT gmx DOT de>
To: djgpp-announce AT delorie DOT com
Subject: ANNOUNCE: DJGPP port of GNU grep 2.20 uploaded.
Reply-To: djgpp AT delorie DOT com

This is a port of GNU grep 2.20 to MSDOS/DJGPP.


This is GNU grep, the "fastest grep in the west".
GNU grep is based on a fast lazy-state deterministic matcher (about
twice as fast as stock Unix egrep) hybridized with a Boyer-Moore-Gosper
search for a fixed string that eliminates impossible text from being
considered by the full regexp matcher without necessarily having to
look at every character. The result is typically many times faster
than Unix grep or egrep. (Regular expressions containing backreferencing
will run more slowly, however.)



DJGPP specific changes.
=======================

DJGPP specific changes are those required to implement colorization support
for this port. If grep is called with the command line option --color and
the output is directed to the screen then the default colors will be used
to mark matches, file names and line numbers. If the output does not go to
the screen then colorization is automatically suppressed. Read the docs to
learn how to control the color using the environment variable GREP_COLORS.
As usual all changes are documented in the diffs file that is stored in the
/djgpp directory.

Starting with grep-2.20, multi-byte character support is required to build
the binaries. It was necessary to provide DJGPP specific implementations
of the iswctype and wctype functions to be able to compile the grep sources
at all. Please note that although multi-byte character support is assumed
to be available to compile grep, neither the DJGPP port nor DJGPP itself
do support multi-byte character encoding like UTF-8 or similiar.
All this means that if future sources require even more multi-byte support
this will be the last grep version ported to DOS using DJGPP. Except if
someone volunteers to implement full featured UTF-8 support for DJGPP.

Please note that to run the test suite produced with autoconf 2.64 and later
you must install mktmp17br2 or later. Because the test suite also tries to
test multibyte patterns but multibyte strings are not fully supported by
DJGPP some tests will be skipped or fail. The yesno test is known to fail,
so please do not report it. Before starting the test suite, please make sure
to unset the GREP_OPTIONS in djgpp.env or the test suite may not work as
expected.

The grep program uses a new method called fts to traverse a file tree. This
code is very posix centric, especially it uses gnulib functions like openat,
openat-proc and fdopendir that try to access directories using file descriptors
with open(). This is only supported by djdev204 but not by djdev203. This
means that if grep is compiled using djdev203, the program will no longer be
able neither to recurse directories nor will be able to follow symlinks.
This is because djdev203 only produces symlinks for programs. In both cases
grep will always terminated with ENOSYS. grep211 was probably the last DJGPP
port of grep compiled with djdev203.

Please also note that there is a function name clash between gnulib's and
grep's gettext wrapper and djgpp's old BORLAND compatibility gettext
function declared in conio.h. This issue has been solved in djdev204.
To solve the problem for djdev203, I provide the patch /djgpp/conio.patch
that will change djdev203's conio.h accordingly to djdev204 conio.h. After
this change the name clash will be solved in the same way as it has been
solved for djdev204. The patch only concerns this name clash.

This port has been configured with perl-regexp (pcre) support enabled.
This means that you will have to install pcre libray available as:
ftp://ftp.delorie.com/pub/djgpp/current/v2tk/pcre835b.zip
or
ftp://ftp.delorie.com/pub/djgpp/beta/v2tk/pcre835b.zip
if you decide to compile the the preconfigured sources. If you prefer to
disable the pcre support you will have to reconfigure and recompile the
suorces again, but this time passing the "no-pcre" command line option to
config.bat. The grep220b.zip file contains only the one build with
perl-regexp support enabled.

This port has no wide character/multi byte support at all.

To build this port and run the test suite you will need LFN support.

The source package is configured to be build in the "_build.204" directory.

The port has been configured and compiled with NLS support enabled using the
latest ports of libiconv, libunistring and gettext.
ftp://ftp.delorie.com/pub/djgpp/beta/v2gnu/licv114b.zip
ftp://ftp.delorie.com/pub/djgpp/beta/v2gnu/luns093b.zip
ftp://ftp.delorie.com/pub/djgpp/beta/v2gnu/gtxt191b.zip


For further information about GNU grep please read the info docs and NEWS file.



This is an verbatim extract of the NEWS file (multi-byte specific features are
not supported by the DJGPP port):
-------------------------------------------------------------------------------
* Noteworthy changes in release 2.20 (2014-06-03) [stable]

** Bug fixes

grep --max-count=N FILE would no longer stop reading after the Nth match.
I.e., while grep would still print the correct output, it would continue
reading until end of input, and hence, potentially forever.
[bug introduced in grep-2.19]

A command like echo aa|grep -E 'a(b$|c$)' would mistakenly
report the input as a matched line.
[bug introduced in grep-2.19]

** Changes in behavior

grep --exclude-dir='FOO/' now excludes the directory FOO.
Previously, the trailing slash meant the option was ineffective.


* Noteworthy changes in release 2.19 (2014-05-22) [stable]

** Improvements

Performance has improved, typically by 10% and in some cases by a
factor of 200. However, performance of grep -P in UTF-8 locales has
gotten worse as part of the fix for the crashes mentioned below.

** Bug fixes

grep no longer mishandles patterns like [a-[.z.]], and no longer
mishandles patterns like [^a] in locales that have multicharacter
collating sequences so that [^a] can match a string of two characters.

grep no longer mishandles an empty pattern at the end of a pattern list.
[bug introduced in grep-2.5]

grep -C NUM now outputs separators consistently even when NUM is zero,
and similarly for grep -A NUM and grep -B NUM.
[bug present since "the beginning"]

grep -f no longer mishandles patterns containing NUL bytes.
[bug introduced in grep-2.11]

Plain grep, grep -E, and grep -F now treat encoding errors in patterns
the same way the GNU regular expression matcher treats them, with respect
to whether the errors can match parts of multibyte characters in data.
[bug present since "the beginning"]

grep -w no longer mishandles a potential match adjacent to a letter that
takes up two or more bytes in a multibyte encoding.
Similarly, the patterns '\<', '\>', '\b', and '\B' no longer
mishandle word-boundary matches in multibyte locales.
[bug present since "the beginning"]

grep -P now reports an error and exits when given invalid UTF-8 data.
Previously it was unreliable, and sometimes crashed or looped.
[bug introduced in grep-2.16]

grep -P now works with -w and -x and backreferences. Before,
echo aa|grep -Pw '(.)\1' would fail to match, yet
echo aa|grep -Pw '(.)\2' would match.

grep -Pw now works like grep -w in that the matched string has to be
preceded and followed by non-word components or the beginning and end
of the line (as opposed to word boundaries before). Before, this
echo a@@a| grep -Pw @@ would match, yet this
echo a@@a| grep -w @@ would not. Now, they both fail to match,
per the documentation on how grep's -w works.

grep -i no longer mishandles patterns containing titlecase characters.
For example, in a locale containing the titlecase character
'Lj' (U+01C8 LATIN CAPITAL LETTER L WITH SMALL LETTER J),
'grep -i Lj' now matches both 'LJ' (U+01C7 LATIN CAPITAL LETTER LJ)
and 'lj' (U+01C9 LATIN SMALL LETTER LJ).


-------------------------------------------------------------------------------


The port has been compiled using stock djdev204 from the /beta directory and
consists of three packages that can be downloaded from ftp.delorie.com and
mirrors as (time stamp 2014-06-19):

grep 2.20 binaries, info and man format documentation:
ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/grep220b.zip

grep 2.20 dvi, html, pdf and ps format documentation:
ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/grep220d.zip

grep 2.20 source:
ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/grep220s.zip


Send grep specific bug reports to <bug-grep AT gnu DOT org>.
Send suggestions and bug reports concerning the DJGPP port to
comp.os.msdos.djgpp or <djgpp AT delorie DOT com>.
If you are not sure if the failure is really a grep failure
or a djgpp specific failure, report it here and *not* to
<bug-grep AT gnu DOT org>.

Enjoy.

Guerrero, Juan Manuel <juan DOT guerrero AT gmx DOT de>

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019