Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/gpl2/grep - merge conflicts, enable wide char support.
details: https://anonhg.NetBSD.org/src/rev/521bd22ca90a
branches: trunk
changeset: 342840:521bd22ca90a
user: christos <christos%NetBSD.org@localhost>
date: Sun Jan 10 22:16:40 2016 +0000
description:
- merge conflicts, enable wide char support.
diffstat:
external/gpl2/grep/Makefile | 5 +
external/gpl2/grep/Makefile.inc | 19 +
external/gpl2/grep/bin/Makefile | 42 +++
external/gpl2/grep/dist/doc/grep.1 | 74 ++---
external/gpl2/grep/dist/doc/grep.texi | 6 +-
external/gpl2/grep/dist/lib/getopt.c | 4 +-
external/gpl2/grep/dist/lib/hard-locale.c | 6 +-
external/gpl2/grep/dist/lib/regex.c | 4 +-
external/gpl2/grep/dist/lib/savedir.c | 3 +-
external/gpl2/grep/dist/src/ansi2knr.c | 4 +-
external/gpl2/grep/dist/src/dfa.c | 17 +-
external/gpl2/grep/dist/src/grep.c | 45 +++-
external/gpl2/grep/dist/src/search.c | 118 +++++-----
external/gpl2/grep/grep2netbsd | 74 ++++++
external/gpl2/grep/include/config.h | 341 ++++++++++++++++++++++++++++++
external/gpl2/grep/lib/Makefile | 21 +
external/gpl2/grep/po/cs.gmo | Bin
external/gpl2/grep/po/de.gmo | Bin
external/gpl2/grep/po/el.gmo | Bin
external/gpl2/grep/po/eo.gmo | Bin
external/gpl2/grep/po/es.gmo | Bin
external/gpl2/grep/po/et.gmo | Bin
external/gpl2/grep/po/fr.gmo | Bin
external/gpl2/grep/po/gl.gmo | Bin
external/gpl2/grep/po/hr.gmo | Bin
external/gpl2/grep/po/id.gmo | Bin
external/gpl2/grep/po/it.gmo | Bin
external/gpl2/grep/po/ja.gmo | Bin
external/gpl2/grep/po/ko.gmo | Bin
external/gpl2/grep/po/nl.gmo | Bin
external/gpl2/grep/po/no.gmo | Bin
external/gpl2/grep/po/pl.gmo | Bin
external/gpl2/grep/po/pt_BR.gmo | Bin
external/gpl2/grep/po/ru.gmo | Bin
external/gpl2/grep/po/sl.gmo | Bin
external/gpl2/grep/po/sv.gmo | Bin
36 files changed, 651 insertions(+), 132 deletions(-)
diffs (truncated from 1250 to 300 lines):
diff -r 4a4ae4816ceb -r 521bd22ca90a external/gpl2/grep/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl2/grep/Makefile Sun Jan 10 22:16:40 2016 +0000
@@ -0,0 +1,5 @@
+# $NetBSD: Makefile,v 1.1 2016/01/10 22:16:40 christos Exp $
+
+SUBDIR= lib .WAIT bin
+
+.include <bsd.subdir.mk>
diff -r 4a4ae4816ceb -r 521bd22ca90a external/gpl2/grep/Makefile.inc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl2/grep/Makefile.inc Sun Jan 10 22:16:40 2016 +0000
@@ -0,0 +1,19 @@
+# $NetBSD: Makefile.inc,v 1.1 2016/01/10 22:16:40 christos Exp $
+
+.include <bsd.own.mk>
+
+WARNS= 0
+
+IDIST= ${NETBSDSRCDIR}/external/gpl2/grep/dist
+
+CPPFLAGS+= -DLOCALEDIR=\"/usr/share/locale\" -DHAVE_CONFIG_H \
+ -I${.CURDIR}/../include -I${IDIST}/lib -I${IDIST}/src
+
+DOBJDIR!= cd $(.CURDIR)/../lib && ${PRINTOBJDIR}
+
+LIBGREPUTILS= ${DOBJDIR}/libgreputils.a
+BINDIR= /usr/bin
+
+.if exists(${.CURDIR}/../../Makefile.inc)
+.include "${.CURDIR}/../../Makefile.inc"
+.endif
diff -r 4a4ae4816ceb -r 521bd22ca90a external/gpl2/grep/bin/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl2/grep/bin/Makefile Sun Jan 10 22:16:40 2016 +0000
@@ -0,0 +1,42 @@
+# $NetBSD: Makefile,v 1.1 2016/01/10 22:16:40 christos Exp $
+
+.include "${.CURDIR}/../Makefile.inc"
+
+DIST= ${IDIST}/src
+.PATH: ${DIST} ${IDIST}/doc ${IDIST}/man ${.CURDIR}/../po
+
+PROG= grep
+SRCS= grep.c dfa.c kwset.c search.c grepmat.c
+
+CWARNFLAGS.clang+= -Wno-format-security -Wno-tautological-compare
+
+.ifndef HOSTPROG
+DPADD+= ${LIBGREPUTILS} ${LIBINTL}
+LDADD+= ${LIBGREPUTILS} -lintl
+.else
+.PATH: ${IDIST}/lib
+SRCS+= closeout.c error.c exclude.c hard-locale.c isdir.c \
+ obstack.c quotearg.c regex.c savedir.c stpcpy.c \
+ xmalloc.c xstrtol.c xstrtoumax.c
+.endif
+
+INFOFLAGS= -I${IDIST}/doc -I${.CURDIR}/../include
+TEXINFO= grep.texi
+
+LINKS= ${BINDIR}/grep ${BINDIR}/egrep \
+ ${BINDIR}/grep ${BINDIR}/fgrep
+MLINKS= grep.1 egrep.1 \
+ grep.1 fgrep.1
+
+.if !defined(HOSTPROG) && ${MKNLS} != "no"
+.for F in cs.gmo de.gmo el.gmo eo.gmo es.gmo et.gmo fr.gmo gl.gmo hr.gmo \
+ id.gmo it.gmo ja.gmo ko.gmo nl.gmo no.gmo pl.gmo pt_BR.gmo ru.gmo \
+ sl.gmo sv.gmo
+FILES+= ${F}
+FILESDIR_${F}= /usr/share/locale/${F:.gmo=}/LC_MESSAGES
+FILESNAME_${F}= grep.mo
+.endfor
+.endif
+
+.include <bsd.info.mk>
+.include <bsd.prog.mk>
diff -r 4a4ae4816ceb -r 521bd22ca90a external/gpl2/grep/dist/doc/grep.1
--- a/external/gpl2/grep/dist/doc/grep.1 Sun Jan 10 21:36:14 2016 +0000
+++ b/external/gpl2/grep/dist/doc/grep.1 Sun Jan 10 22:16:40 2016 +0000
@@ -1,21 +1,8 @@
-.\" $NetBSD: grep.1,v 1.1.1.1 2016/01/10 21:36:16 christos Exp $
+.\" $NetBSD: grep.1,v 1.2 2016/01/10 22:16:40 christos Exp $
.\"
.\" grep man page
-.if !\n(.g \{\
-. if !\w|\*(lq| \{\
-. ds lq ``
-. if \w'\(lq' .ds lq "\(lq
-. \}
-. if !\w|\*(rq| \{\
-. ds rq ''
-. if \w'\(rq' .ds rq "\(rq
-. \}
-.\}
-.de Id
-.ds Dt \\$4
-..
-.Id Id: grep.1,v 1.23 2002/01/22 13:20:04 bero Exp
-.TH GREP 1 \*(Dt "GNU Project"
+.\"d Id: grep.1,v 1.23 2002/01/22 13:20:04 bero Exp
+.TH GREP 1 "June 16 2003" "GNU Project"
.SH NAME
grep, egrep, fgrep \- print lines matching a pattern
.SH SYNOPSIS
@@ -81,14 +68,6 @@
.B \-\^\-
between contiguous groups of matches.
.TP
-.BI \-C " NUM" "\fR,\fP \-\^\-context=" NUM
-Print
-.I NUM
-lines of output context.
-Places a line containing
-.B \-\^\-
-between contiguous groups of matches.
-.TP
.BR \-b ", " \-\^\-byte-offset
Print the byte offset within the input file before
each line of output.
@@ -128,10 +107,13 @@
which can have nasty side effects if the output is a terminal and if the
terminal driver interprets some of it as commands.
.TP
-.BI \-\^\-colour[=\fIWHEN\fR] ", " \-\^\-color[=\fIWHEN\fR]
-Surround the matching string with the marker find in
-.B GREP_COLOR
-environment variable. WHEN may be `never', `always', or `auto'
+.BI \-C " NUM" "\fR,\fP \-\^\-context=" NUM
+Print
+.I NUM
+lines of output context.
+Places a line containing
+.B \-\^\-
+between contiguous groups of matches.
.TP
.BR \-c ", " \-\^\-count
Suppress normal output; instead print a count of
@@ -140,6 +122,11 @@
.BR \-v ", " \-\^\-invert-match
option (see below), count non-matching lines.
.TP
+.BI \-\^\-colour[=\fIWHEN\fR] ", " \-\^\-color[=\fIWHEN\fR]
+Surround the matching string with the marker find in
+.B GREP_COLOR
+environment variable. WHEN may be `never', `always', or `auto'
+.TP
.BI \-D " ACTION" "\fR,\fP \-\^\-devices=" ACTION
If an input file is a device, FIFO or socket, use
.I ACTION
@@ -187,16 +174,13 @@
.I PATTERN
as the pattern; useful to protect patterns beginning with
.BR \- .
+May be specified more than once.
.TP
.BR \-F ", " \-\^\-fixed-strings
Interpret
.I PATTERN
as a list of fixed strings, separated by newlines,
any of which is to be matched.
-.BR \-P ", " \-\^\-perl-regexp
-Interpret
-.I PATTERN
-as a Perl regular expression.
.TP
.BI \-f " FILE" "\fR,\fP \-\^\-file=" FILE
Obtain patterns from
@@ -236,6 +220,15 @@
normally have been printed. The scanning will stop
on the first match.
.TP
+.BI \-\^\-label= LABEL
+Displays input actually coming from standard input as input coming from file
+.I LABEL.
+This is especially useful for tools like zgrep, e.g.
+.B "gzip -cd foo.gz |grep --label=foo something"
+.TP
+.BR \-\^\-line-buffered
+Use line buffering, it can be a performance penalty.
+.TP
.BR \-l ", " \-\^\-files-with-matches
Suppress normal output; instead print
the name of each input file from which output
@@ -297,15 +290,12 @@
.BR \-o ", " \-\^\-only-matching
Show only the part of a matching line that matches
.I PATTERN.
-.TP
-.BI \-\^\-label= LABEL
-Displays input actually coming from standard input as input coming from file
-.I LABEL.
-This is especially useful for tools like zgrep, e.g.
-.B "gzip -cd foo.gz |grep --label=foo something"
-.TP
-.BR \-\^\-line-buffering
-Use line buffering, it can be a performance penality.
+.\" NetBSD doesn't support perl regexps
+.\" .TP
+.\" .BR \-P ", " \-\^\-perl-regexp
+.\" Interpret
+.\" .I PATTERN
+.\" as a Perl regular expression.
.TP
.BR \-q ", " \-\^\-quiet ", " \-\^\-silent
Quiet; do not write anything to standard output.
@@ -529,7 +519,7 @@
and
.B \eW
is a synonym for
-.BR [^[:alnum]] .
+.BR [^[:alnum:]] .
.PP
The caret
.B ^
diff -r 4a4ae4816ceb -r 521bd22ca90a external/gpl2/grep/dist/doc/grep.texi
--- a/external/gpl2/grep/dist/doc/grep.texi Sun Jan 10 21:36:14 2016 +0000
+++ b/external/gpl2/grep/dist/doc/grep.texi Sun Jan 10 22:16:40 2016 +0000
@@ -1,5 +1,5 @@
\input texinfo @c -*-texinfo-*-
-@c $NetBSD: grep.texi,v 1.1.1.1 2016/01/10 21:36:16 christos Exp $
+@c $NetBSD: grep.texi,v 1.2 2016/01/10 22:16:40 christos Exp $
@c %**start of header
@setfilename grep.info
@settitle grep, print lines matching a pattern
@@ -27,7 +27,7 @@
@ifinfo
@direntry
-* grep: (grep). print lines matching a pattern.
+* grep: (grep). print lines matching a pattern.
@end direntry
This file documents @command{grep}, a pattern matching engine.
@@ -358,7 +358,7 @@
@item --line-buffered
@opindex --line-buffered
@cindex line buffering
-Set the line buffering policy, this can be a performance penality.
+Set the line buffering policy, this can be a performance penalty.
@item --label=@var{LABEL}
@opindex --label
diff -r 4a4ae4816ceb -r 521bd22ca90a external/gpl2/grep/dist/lib/getopt.c
--- a/external/gpl2/grep/dist/lib/getopt.c Sun Jan 10 21:36:14 2016 +0000
+++ b/external/gpl2/grep/dist/lib/getopt.c Sun Jan 10 22:16:40 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: getopt.c,v 1.1.1.1 2016/01/10 21:36:18 christos Exp $ */
+/* $NetBSD: getopt.c,v 1.2 2016/01/10 22:16:40 christos Exp $ */
/* Getopt for GNU.
NOTE: The canonical source of this file is maintained with the GNU
@@ -431,7 +431,7 @@
else
{
const char *orig_str = __getopt_nonoption_flags;
- int len = nonoption_flags_max_len = strlen (orig_str);
+ size_t len = nonoption_flags_max_len = strlen (orig_str);
if (nonoption_flags_max_len < argc)
nonoption_flags_max_len = argc;
__getopt_nonoption_flags =
diff -r 4a4ae4816ceb -r 521bd22ca90a external/gpl2/grep/dist/lib/hard-locale.c
--- a/external/gpl2/grep/dist/lib/hard-locale.c Sun Jan 10 21:36:14 2016 +0000
+++ b/external/gpl2/grep/dist/lib/hard-locale.c Sun Jan 10 22:16:40 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hard-locale.c,v 1.1.1.1 2016/01/10 21:36:18 christos Exp $ */
+/* $NetBSD: hard-locale.c,v 1.2 2016/01/10 22:16:40 christos Exp $ */
/* hard-locale.c -- Determine whether a locale is hard.
Copyright 1997, 1998, 1999 Free Software Foundation, Inc.
@@ -48,6 +48,10 @@
# include <string.h>
#endif
+#if HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
+
/* Return nonzero if the current CATEGORY locale is hard, i.e. if you
can't get away with assuming traditional C or POSIX behavior. */
int
diff -r 4a4ae4816ceb -r 521bd22ca90a external/gpl2/grep/dist/lib/regex.c
--- a/external/gpl2/grep/dist/lib/regex.c Sun Jan 10 21:36:14 2016 +0000
+++ b/external/gpl2/grep/dist/lib/regex.c Sun Jan 10 22:16:40 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: regex.c,v 1.1.1.1 2016/01/10 21:36:19 christos Exp $ */
+/* $NetBSD: regex.c,v 1.2 2016/01/10 22:16:40 christos Exp $ */
/* Extended regular expression matching and search library,
version 0.12.
@@ -1127,7 +1127,7 @@
int size1;
int size2;
{
- int this_char;
+ ptrdiff_t this_char;
if (where == NULL)
printf ("(null)");
Home |
Main Index |
Thread Index |
Old Index