From 43c556e7f5fa602b4371c67d025ddeac54fea2c2 Mon Sep 17 00:00:00 2001 From: gabor Date: Thu, 7 Apr 2011 13:03:35 +0000 Subject: - Adjust a comment to actual behaviour - Makefile nit - Add more CVS/SVN keywords to make it easier to track changes from NetBSD in case they add further improvements Approved by: delphij (mentor) Obtained from: The NetBSD Project --- usr.bin/grep/Makefile | 4 +++- usr.bin/grep/fastgrep.c | 8 +++++--- usr.bin/grep/file.c | 2 ++ usr.bin/grep/grep.1 | 1 + usr.bin/grep/grep.c | 2 ++ usr.bin/grep/grep.h | 1 + usr.bin/grep/queue.c | 3 +++ usr.bin/grep/util.c | 2 ++ 8 files changed, 19 insertions(+), 4 deletions(-) diff --git a/usr.bin/grep/Makefile b/usr.bin/grep/Makefile index 88474d7..98fceeb 100644 --- a/usr.bin/grep/Makefile +++ b/usr.bin/grep/Makefile @@ -1,13 +1,15 @@ +# $NetBSD: Makefile,v 1.4 2011/02/16 01:31:33 joerg Exp $ # $FreeBSD$ # $OpenBSD: Makefile,v 1.6 2003/06/25 15:00:04 millert Exp $ PROG= grep SRCS= fastgrep.c file.c grep.c queue.c util.c + LINKS= ${BINDIR}/grep ${BINDIR}/egrep \ ${BINDIR}/grep ${BINDIR}/fgrep \ ${BINDIR}/grep ${BINDIR}/zgrep \ ${BINDIR}/grep ${BINDIR}/zegrep \ - ${BINDIR}/grep ${BINDIR}/zfgrep \ + ${BINDIR}/grep ${BINDIR}/zfgrep MLINKS= grep.1 egrep.1 \ grep.1 fgrep.1 \ diff --git a/usr.bin/grep/fastgrep.c b/usr.bin/grep/fastgrep.c index 442ff4c..d5c9d31 100644 --- a/usr.bin/grep/fastgrep.c +++ b/usr.bin/grep/fastgrep.c @@ -1,4 +1,6 @@ /* $OpenBSD: util.c,v 1.36 2007/10/02 17:59:18 otto Exp $ */ +/* $NetBSD: fastgrep.c,v 1.4 2011/02/27 17:33:37 joerg Exp $ */ +/* $FreeBSD$ */ /*- * Copyright (c) 1999 James Howard and Dag-Erling Coïdan Smørgrav @@ -112,9 +114,9 @@ fastcomp(fastgrep_t *fg, const char *pat) } /* - * Copy pattern minus '^' and '$' characters as well as word - * match character classes at the beginning and ending of the - * string respectively. + * pat has been adjusted earlier to not include '^', '$' or + * the word match character classes at the beginning and ending + * of the string respectively. */ fg->pattern = grep_malloc(fg->len + 1); memcpy(fg->pattern, pat, fg->len); diff --git a/usr.bin/grep/file.c b/usr.bin/grep/file.c index d19d57c..a6216e5 100644 --- a/usr.bin/grep/file.c +++ b/usr.bin/grep/file.c @@ -1,3 +1,5 @@ +/* $NetBSD: file.c,v 1.5 2011/02/16 18:35:39 joerg Exp $ */ +/* $FreeBSD$ */ /* $OpenBSD: file.c,v 1.11 2010/07/02 20:48:48 nicm Exp $ */ /*- diff --git a/usr.bin/grep/grep.1 b/usr.bin/grep/grep.1 index 1db9516..b3ba21a 100644 --- a/usr.bin/grep/grep.1 +++ b/usr.bin/grep/grep.1 @@ -1,3 +1,4 @@ +.\" $NetBSD: grep.1,v 1.2 2011/02/16 01:31:33 joerg Exp $ .\" $FreeBSD$ .\" $OpenBSD: grep.1,v 1.38 2010/04/05 06:30:59 jmc Exp $ .\" Copyright (c) 1980, 1990, 1993 diff --git a/usr.bin/grep/grep.c b/usr.bin/grep/grep.c index f531c56..0047650 100644 --- a/usr.bin/grep/grep.c +++ b/usr.bin/grep/grep.c @@ -1,3 +1,5 @@ +/* $NetBSD: grep.c,v 1.4 2011/02/16 01:31:33 joerg Exp $ */ +/* $FreeBSD$ */ /* $OpenBSD: grep.c,v 1.42 2010/07/02 22:18:03 tedu Exp $ */ /*- diff --git a/usr.bin/grep/grep.h b/usr.bin/grep/grep.h index 1562930..fe15c17 100644 --- a/usr.bin/grep/grep.h +++ b/usr.bin/grep/grep.h @@ -1,3 +1,4 @@ +/* $NetBSD: grep.h,v 1.5 2011/02/27 17:33:37 joerg Exp $ */ /* $OpenBSD: grep.h,v 1.15 2010/04/05 03:03:55 tedu Exp $ */ /* $FreeBSD$ */ diff --git a/usr.bin/grep/queue.c b/usr.bin/grep/queue.c index b44c0e1..afcb827 100644 --- a/usr.bin/grep/queue.c +++ b/usr.bin/grep/queue.c @@ -1,3 +1,6 @@ +/* $NetBSD: queue.c,v 1.2 2011/02/16 01:31:33 joerg Exp $ */ +/* $FreeBSD$ */ + /*- * Copyright (c) 1999 James Howard and Dag-Erling Coïdan Smørgrav * All rights reserved. diff --git a/usr.bin/grep/util.c b/usr.bin/grep/util.c index 3c0a5a6..dece127 100644 --- a/usr.bin/grep/util.c +++ b/usr.bin/grep/util.c @@ -1,3 +1,5 @@ +/* $NetBSD: util.c,v 1.9 2011/02/27 17:33:37 joerg Exp $ */ +/* $FreeBSD$ */ /* $OpenBSD: util.c,v 1.39 2010/07/02 22:18:03 tedu Exp $ */ /*- -- cgit v1.1