Trimmed grep 2.4.2

This commit is contained in:
Andrey A. Chernov 2004-03-01 08:24:49 +00:00
parent 7898cc4c8d
commit 7a39f4da90
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/vendor/misc-GNU/dist1/; revision=126432
14 changed files with 136 additions and 45 deletions

View File

@ -1,3 +1,70 @@
2000-03-08 Alain Magloire
* configure.in: version 2.4.2
2000-03-07 Paul Eggert
* Make intl subdirectory match fileutils, tar, etc.;
see intl/ChangeLog for details.
* src/getpagesize.h: Reformat to match latest fileutils.
* src/savedir.c (savedir): Work even if directory size is
negative; this can happen with some NFS screwups.
2000-03-03 Jim Meyering
* regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
2000-03-02 Alain Magloire
* 2.4.1 Release
2000-02-25 Paul Eggert
* configure.in (LIBOBJS): Work around automake 1.4 bug:
regex.c wasn't being passed through ansi2knr on pre-ANSI hosts.
(ac_use_included_regex): Fix typo in warning.
* src/Makefile.am (EXTRA_DIST): Remove regex.c, as the LIBOBJS
workaround means that automake now puts regex.c into DIST_COMMON.
2000-02-25 Alain Magloire
* po/*.po: update of the PO files.
2000-02-22 Eli Zaretskii
* doc/grep.1: Two small glitches(typos).
2000-02-18 Eli Zaretskii
* djgpp/config.site (prefix, INSTALL): Use /dev/env/DJDIR instead
of ${DJDIR}, so that the produced Makefile's work on any DJGPP
installation.
2000-01-30 Alain Magloire
* doc/grep.1: corrected typo.
Noted by Ruslan Ermilob.
2000-01-30 Alain Magloire
* vms/Makefile.am: added config_vms.h to EXTRA_DIST.
* vms/config_vms.h: New File, contains macros specific to VMS and
avoid namespace collision with operating system supplied C library.
* vms/make.com: Better compiler auto-detection; information for builds
on pre-OpenVMS 7.x systems; general overhaul.
* src/getpagesize.h: Reinstate support for different pagesizes on
VAX and Alpha. Work around problem with DEC C compiler.
* src/vms_fab.c: Cast to some assigments; fixed typo argcp vs. argp.
* src/vms_fab.h: Added new include files to avoid warnings about
undefined function prototypes.
Those patches were provided by Martin P.J. Zinser (zinser@decus.de).
2000-01-30 Paul Eggert
* src/grep.c (main): Update copyright notice.
2000-01-28 Alain Magloire
* src/grep.c (usage): The example "%s -i 'hello.*world' could
@ -6,14 +73,14 @@
* configure.in: Reenable, jm_INCLUDE_REGEX() since we now
track GNU lib C.
* src/Makefile.am: EXTRA_DIST new macros with regex.c regex.h.
* src/Makefile.am: EXTRA_DIST new macros with regex.c regex.h.
Requested By Ulrich Drepper.
2000-01-25 Paul Eggert
* src/grep.c (grep): If the final byte of an input file is not
a newline, grep now silently supplies one.
* doc/grep.texi, NEWS: Likewise.
* doc/grep.texi, NEWS: Likewise.
2000-01-25 Paul Eggert
@ -121,6 +188,10 @@
name_size is zero and the directory is empty.
Reported by Dima Barsky <dima@pwd.hp.com>.
1999-12-03 Alain Magloire
* 2.4 Release.
1999-11-18 Paul Eggert
* m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a

View File

@ -1,3 +1,8 @@
Version 2.4.2
- Added more check in configure to default the grep-${version}/src/regex.c
instead of the one in GNU Lib C.
Version 2.4.1
- If the final byte of an input file is not a newline, grep now silently

View File

@ -25,6 +25,7 @@ Kazuro Furukawa <furukawa@apricot.kek.jp>
Keith Bostic <bostic@bsdi.com>
Krishna Sethuraman <krishna@sgihub.corp.sgi.com>
Mark Waite <markw@mddmew.fc.hp.com>
Martin P.J. Zinser <zinser@decus.de>
Martin Rex <martin.rex@sap-ag.de>
Michael Aichlmayr <mikla@nx.com>
Miles Bader <miles@ccs.mt.nec.co.jp>

View File

@ -1,5 +1,5 @@
/* dfa.c - deterministic extended regexp routines for GNU
Copyright (C) 1988, 1998 Free Software Foundation, Inc.
Copyright 1988, 1998, 2000 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -35,7 +35,7 @@ Published by the Free Software Foundation,
59 Temple Place - Suite 330
Boston, MA 02111-1307, USA
Copyright 1999 Free Software Foundation, Inc.
Copyright 2000 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
@ -68,7 +68,7 @@ by the Foundation.
@page
@vskip 0pt plus 1filll
Copyright @copyright{} 1999 Free Software Foundation, Inc.
Copyright @copyright{} 2000 Free Software Foundation, Inc.
@sp 2
Published by the Free Software Foundation, @*

View File

@ -1,3 +1,3 @@
@set UPDATED 27 January 2000
@set EDITION 2.4d
@set VERSION 2.4d
@set UPDATED 2 February 2000
@set EDITION 2.4.2
@set VERSION 2.4.2

View File

@ -2,34 +2,40 @@
#ifndef HAVE_GETPAGESIZE
#ifdef VMS
#define getpagesize() 512
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
# include <unistd.h>
#endif
#ifdef _SC_PAGESIZE
#define getpagesize() sysconf(_SC_PAGESIZE)
#else
#if !defined getpagesize && defined _SC_PAGESIZE
# if !(defined VMS && __VMS_VER < 70000000)
# define getpagesize() sysconf (_SC_PAGESIZE)
# endif
#endif
#include <sys/param.h>
#if !defined getpagesize && defined VMS
# ifdef __ALPHA
# define getpagesize() 8192
# else
# define getpagesize() 512
# endif
#endif
#ifdef EXEC_PAGESIZE
#define getpagesize() EXEC_PAGESIZE
#else
#ifdef NBPG
#define getpagesize() NBPG * CLSIZE
#ifndef CLSIZE
#define CLSIZE 1
#endif /* no CLSIZE */
#else /* no NBPG */
#ifdef NBPC
#define getpagesize() NBPC
#endif /* NBPC */
#endif /* no NBPG */
#endif /* no EXEC_PAGESIZE */
#endif /* no _SC_PAGESIZE */
#ifndef getpagesize
# include <sys/param.h>
# ifdef EXEC_PAGESIZE
# define getpagesize() EXEC_PAGESIZE
# else
# ifdef NBPG
# ifndef CLSIZE
# define CLSIZE 1
# endif
# define getpagesize() (NBPG * CLSIZE)
# else
# ifdef NBPC
# define getpagesize() NBPC
# endif
# endif
# endif
#endif
#endif /* not HAVE_GETPAGESIZE */

View File

@ -12,7 +12,7 @@
.de Id
.ds Dt \\$4
..
.Id $Id: grep.1,v 1.9 2000/01/26 03:42:16 alainm Exp $
.Id $Id: grep.1,v 1.11 2000/02/26 03:18:40 alainm Exp $
.TH GREP 1 \*(Dt "GNU Project"
.SH NAME
grep, egrep, fgrep \- print lines matching a pattern
@ -100,7 +100,7 @@ If
is
.BR without-match ,
.B grep
assumes that a binary file does not match; this is equivalent to the
assumes that a binary file does not match; this is equivalent to the
.B \-I
option.
If
@ -141,8 +141,8 @@ If
.I ACTION
is
.BR recurse ,
.B
grep reads all files under each directory, recursively;
.B grep
reads all files under each directory, recursively;
this is equivalent to the
.B \-r
option.
@ -168,7 +168,7 @@ any of which is to be matched.
Obtain patterns from
.IR FILE ,
one per line.
The empty file contains zero patterns, and therfore matches nothing.
The empty file contains zero patterns, and therefore matches nothing.
.TP
.BR \-G ", " \-\^\-basic-regexp
Interpret
@ -543,7 +543,8 @@ should avoid it.
.B GREP_OPTIONS
This variable specifies default options to be placed in front of any
explicit options. For example, if
.B GREP_OPTIONS is
.B GREP_OPTIONS
is
.BR "'\-\^\-binary-files=without-match \-\^\-directories=skip'" ,
.B grep
behaves as if the two options

View File

@ -1,5 +1,5 @@
/* grep.c - main driver file for grep.
Copyright (C) 1992, 1997, 1998, 1999 Free Software Foundation, Inc.
Copyright 1992, 1997-1999, 2000 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -1378,7 +1378,7 @@ main (int argc, char **argv)
printf (_("%s (GNU grep) %s\n"), matcher, VERSION);
printf ("\n");
printf (_("\
Copyright (C) 1988, 1992-1998, 1999 Free Software Foundation, Inc.\n"));
Copyright 1988, 1992-1999, 2000 Free Software Foundation, Inc.\n"));
printf (_("\
This is free software; see the source for copying conditions. There is NO\n\
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"));

View File

@ -0,0 +1,6 @@
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "system.h"
#include "grep.h"
char const *matcher;

View File

@ -1,5 +1,5 @@
/* kwset.c - search for any of a set of keywords.
Copyright (C) 1989, 1998 Free Software Foundation, Inc.
Copyright 1989, 1998, 2000 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -89,7 +89,8 @@ savedir (const char *dir, off_t name_size)
/* Be sure name_size is at least `1' so there's room for
the final NUL byte. */
name_size += !name_size;
if (name_size <= 0)
name_size = 1;
name_space = (char *) malloc (name_size);
if (name_space == NULL)

View File

@ -1,5 +1,5 @@
/* search.c - searching subroutines using dfa, kwset and regex for grep.
Copyright (C) 1992, 1998 Free Software Foundation, Inc.
Copyright 1992, 1998, 2000 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* Portability cruft. Include after config.h and sys/types.h.
Copyright (C) 1996, 1998, 1999 Free Software Foundation, Inc.
Copyright 1996, 1998, 1999, 2000 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by