Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Mar 2002 13:30:01 -0800 (PST)
From:      Peter Pentchev <roam@ringlet.net>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/35505: [PATCH] Feature enhancement for sed(1)
Message-ID:  <200203032130.g23LU1458762@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/35505; it has been noted by GNATS.

From: Peter Pentchev <roam@ringlet.net>
To: "Matthew D.Fuller" <fullermd@over-yonder.net>
Cc: bug-followup@FreeBSD.org
Subject: Re: bin/35505: [PATCH] Feature enhancement for sed(1)
Date: Sun, 3 Mar 2002 23:21:35 +0200

 On Sun, Mar 03, 2002 at 11:10:01AM -0800, Peter Pentchev wrote:
 > The following reply was made to PR bin/35505; it has been noted by GNATS.
 > 
 > From: Peter Pentchev <roam@ringlet.net>
 > To: "Matthew D.Fuller" <fullermd@over-yonder.net>
 > Cc: FreeBSD-gnats-submit@freebsd.org
 > Subject: Re: bin/35505: [PATCH] Feature enhancement for sed(1)
 > Date: Sun, 3 Mar 2002 21:05:05 +0200
 > 
 >  On Sun, Mar 03, 2002 at 12:27:40AM -0600, Matthew D.Fuller wrote:
 >  >=20
 >  > >Number:         35505
 >  > >Category:       bin
 >  > >Synopsis:       [PATCH] Feature enhancement for sed(1)
 >  > >Originator:     Matthew D. Fuller
 >  [snip]
 >  > >Fix:
 >  [patch snipped]
 >  
 >  I think that something like the attached would befit style(9) more.
 >  Other than a few style nits, your patch looks great, and the functionality
 >  is something that I really do like :)
 >  
 >  Now let us see how this goes down with the src committers..
 
 Come to think of it, a manual page update might also be in order.
 The attached patch adds a brief description of 'esed' to the manual
 page, as well as converts spaces to tabs in the Makefile.
 
 G'luck,
 Peter
 
 -- 
 Peter Pentchev	roam@ringlet.net	roam@FreeBSD.org
 PGP key:	http://people.FreeBSD.org/~roam/roam.key.asc
 Key fingerprint	FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
 This inert sentence is my body, but my soul is alive, dancing in the sparks of your brain.
 
 Index: src/usr.bin/sed/Makefile
 ===================================================================
 RCS file: /home/ncvs/src/usr.bin/sed/Makefile,v
 retrieving revision 1.4
 diff -u -r1.4 Makefile
 --- src/usr.bin/sed/Makefile	8 Feb 2002 23:07:35 -0000	1.4
 +++ src/usr.bin/sed/Makefile	3 Mar 2002 21:17:59 -0000
 @@ -4,5 +4,7 @@
  PROG=	sed
  SRCS=	compile.c main.c misc.c process.c
  
 +LINKS=	${BINDIR}/sed ${BINDIR}/esed
 +MLINKS=	sed.1 esed.1
  
  .include <bsd.prog.mk>
 Index: src/usr.bin/sed/main.c
 ===================================================================
 RCS file: /home/ncvs/src/usr.bin/sed/main.c,v
 retrieving revision 1.14
 diff -u -r1.14 main.c
 --- src/usr.bin/sed/main.c	12 Dec 2001 23:20:16 -0000	1.14
 +++ src/usr.bin/sed/main.c	3 Mar 2002 19:01:05 -0000
 @@ -114,9 +114,17 @@
  	char *argv[];
  {
  	int c, fflag;
 -	char *temp_arg;
 +	char *progname, *temp_arg;
  
  	(void) setlocale(LC_ALL, "");
 +
 +	progname = strrchr(*argv, '/');
 +	if (progname != NULL)
 +		progname++;
 +	else
 +		progname = *argv;
 +	if (*progname=='e')
 +		rflags = REG_EXTENDED;
  
  	fflag = 0;
  	while ((c = getopt(argc, argv, "Eae:f:n")) != -1)
 Index: src/usr.bin/sed/sed.1
 ===================================================================
 RCS file: /home/ncvs/src/usr.bin/sed/sed.1,v
 retrieving revision 1.19
 diff -u -r1.19 sed.1
 --- src/usr.bin/sed/sed.1	15 Aug 2001 09:09:43 -0000	1.19
 +++ src/usr.bin/sed/sed.1	3 Mar 2002 21:16:38 -0000
 @@ -39,7 +39,8 @@
  .Dt SED 1
  .Os
  .Sh NAME
 -.Nm sed
 +.Nm sed ,
 +.Nm esed
  .Nd stream editor
  .Sh SYNOPSIS
  .Nm
 @@ -76,6 +77,11 @@
  The
  .Xr re_format 7
  manual page fully describes both formats.
 +When
 +.Nm
 +is invoked as
 +.Nm esed ,
 +it treats regular expressions as extended by default.
  .It Fl a
  The files listed as parameters for the
  .Dq w

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200203032130.g23LU1458762>