Merge conflicts, upgrade

This commit is contained in:
Andrey A. Chernov 2004-03-01 08:37:20 +00:00
parent cdd3ecb3a1
commit 0416b7503d
8 changed files with 51 additions and 41 deletions

View File

@ -3,7 +3,7 @@
GREP_LIBZ=YES
PROG= grep
SRCS= dfa.c grep.c kwset.c obstack.c savedir.c search.c
SRCS= dfa.c grep.c grepmat.c kwset.c obstack.c savedir.c search.c
CFLAGS+=-I${.CURDIR} -I${DESTDIR}/usr/include/gnu -DHAVE_CONFIG_H

View File

@ -56,7 +56,7 @@
#define PACKAGE "grep"
/* Version number. */
#define VERSION "2.4d"
#define VERSION "2.4.2"
/* Define to `int' if <sys/types.h> doesn't define. */
/* #undef ssize_t */
@ -89,7 +89,7 @@
/* #undef HAVE___ARGZ_STRINGIFY */
/* Define if you have the btowc function. */
/* #undef HAVE_BTOWC */
#define HAVE_BTOWC 1
/* Define if you have the dcgettext function. */
/* #undef HAVE_DCGETTEXT */
@ -140,7 +140,7 @@
#define HAVE_STRERROR 1
/* Define if you have the wctype function. */
/* #undef HAVE_WCTYPE */
#define HAVE_WCTYPE 1
/* Define if you have the <argz.h> header file. */
/* #undef HAVE_ARGZ_H */
@ -188,10 +188,10 @@
#define HAVE_UNISTD_H 1
/* Define if you have the <wchar.h> header file. */
/* #undef HAVE_WCHAR_H */
#define HAVE_WCHAR_H 1
/* Define if you have the <wctype.h> header file. */
/* #undef HAVE_WCTYPE_H */
#define HAVE_WCTYPE_H 1
/* Define if you have the i library (-li). */
/* #undef HAVE_LIBI */
@ -207,3 +207,4 @@
/* Define if compiler has function prototypes */
#define PROTOTYPES 1

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

@ -1,35 +1,43 @@
/* Emulate getpagesize on systems that lack it. */
/* $FreeBSD$ */
#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

@ -13,7 +13,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, zgrep, zegrep, zfgrep,
@ -110,7 +110,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
@ -151,8 +151,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.
@ -178,7 +178,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

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
@ -121,7 +121,6 @@ static struct option long_options[] =
};
/* Define flags declared in grep.h. */
char const *matcher;
int match_icase;
int match_words;
int match_lines;
@ -1492,7 +1491,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

@ -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
@ -16,6 +16,8 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
/* $FreeBSD$ */
/* Written August 1989 by Mike Haertel.
The author may be reached (Email) at the address mike@ai.mit.edu,
or (US mail) as Mike Haertel c/o Free Software Foundation. */

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