From owner-FreeBSD-tech-jp@jp.freebsd.org  Fri Apr  6 17:52:48 2001
Received: (from daemon@localhost)
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) id RAA91329;
	Fri, 6 Apr 2001 17:52:48 +0900 (JST)
	(envelope-from owner-FreeBSD-tech-jp@jp.FreeBSD.org)
Received: from shiva.tri.asanuma.co.jp (shiva.tri.asanuma.co.jp [210.160.188.2])
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) with ESMTP id RAA91324
	for <FreeBSD-tech-jp@jp.freebsd.org>; Fri, 6 Apr 2001 17:52:46 +0900 (JST)
	(envelope-from mori@tri.asanuma.co.jp)
Received: from yashoda.tri.asanuma.co.jp (yashoda.tri.asanuma.co.jp [172.16.57.11])
	by shiva.tri.asanuma.co.jp (Postfix) with ESMTP id 4B75C542B
	for <FreeBSD-tech-jp@jp.freebsd.org>; Fri,  6 Apr 2001 17:52:42 +0900 (JST)
Received: from kurishna.tri.asanuma.co.jp (kurishna.tri.asanuma.co.jp [2001:218:4dc:1:200:f8ff:fe02:ec60])
	by yashoda.tri.asanuma.co.jp (8.11.0/8.11.0) with ESMTP id f368qet18239
	for <FreeBSD-tech-jp@jp.freebsd.org>; Fri, 6 Apr 2001 17:52:41 +0900 (JST)
To: FreeBSD-tech-jp@jp.freebsd.org
Siganture-File: ~/.signature
MIME-Version: 1.0 (generated by REMI 1.14.2 - =?ISO-8859-4?Q?=22Hokuhoku-=D2?=
 =?ISO-8859-4?Q?shima=22?=)
Content-Type: text/plain; charset=ISO-2022-JP
From: Mori Kouji <mori@tri.asanuma.co.jp>
Date: 06 Apr 2001 17:52:40 +0900
Message-ID: <808zlez9yf.fsf@kurishna.tri.asanuma.co.jp>
Lines: 54
User-Agent: Nana-gnus/7.1.0.23 REMI/1.14.2 (=?ISO-8859-4?Q?Hokuhoku-=D2shi?=
 =?ISO-8859-4?Q?ma?=) Chao/1.14.1 (=?ISO-8859-4?Q?Rokujiz=F2?=) APEL/10.2
 Emacs/21.0.98 (i386--freebsd) MULE/5.0 (SAKAKI)
Reply-To: FreeBSD-tech-jp@jp.freebsd.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+010328
X-Sequence: FreeBSD-tech-jp 3057
Subject: [FreeBSD-tech-jp 3057] sed(1) -- command separater ';' 
Errors-To: owner-FreeBSD-tech-jp@jp.freebsd.org
Sender: owner-FreeBSD-tech-jp@jp.freebsd.org
X-Originator: mori@kurishna.tri.asanuma.co.jp

$B?9$G$9!#$3$s$K$A$O!#(B

# samba-jp $B$+$i;}$C$F$-$?%M%?$G$9!#(B

sed $B$O2~9T$NBe$o$j$K(B ';' $B$r;H$C$FJ#?t$N%3%^%s%I$r(B1$B9T$K$+$1$^$9$,!"(B
$B2~9T$H40A4$K8r492DG=$H$$$&$o$1$G$O$J$$$h$&$G!"FCDj$N%3%^%s%I$N8e$K(B
';' $B$r5-=R$9$k$H%(%i!<$K$J$j$^$9!#(B

[src/usr.bin/sed/POSIX $B$+$i$NH4?h(B]
  Note, the ; command separator is not allowed for the commands
  a, c, i, w, r, :, b, t, # and at the end of a w flag in the s
  command.

$B$,!"%3%^%s%IJ8;zNs$,6u$G$bBLL\$J$h$&$G!"(B

   sed 's/A/B/;'         # O.K.
   sed 's/A/B/;;'        # N.G.
   sed '/C/{s/A/B/;}'    # O.K.
   sed '/C/{;s/A/B/;}'   # N.G.
   sed '/C/{;s/A/B/;};'  # O.K.  $B$&$&$`!D(B

$B$H$J$j$^$9!#6u%3%^%s%I$N8e$K(B `;' $B$,=q$1$F$b$$$$$h$&$J5$$,$7$^$9$,(B
$B$I$&$J$s$G$7$g$&$M(B?  $B$A$J$_$K(B SunOS[45] $B$N(B sed, GNU sed $B$G$O(B
$B%(%i!<$K$J$j$^$;$s!#(BNetBSD $B$N(B sed $B$O(B FreeBSD $B$HF1$8$h$&$G$9!#(B

$B=$@5$O$A$g$C$H$G$9!#(Bsend-pr $B$7$h$&$+$H;W$C$?$N$G$9$,!"1QJ8$r9M$($F$k(B
$BM>M5$,$J$$$N$H!"5^$0OC$G$b$J$5$=$&$J$N$G3P=q$-Be$o$j$K$3$A$i$K(B
$B%]%9%H$7$F$*$-$^$9!#(B

$B>\$7$$OCCN$C$F$?$iC/$+65$($F2<$5$$!#(B

Index: compile.c
===================================================================
RCS file: /opt/cvs/FreeBSD/src/usr.bin/sed/compile.c,v
retrieving revision 1.13.2.1
diff -u -r1.13.2.1 compile.c
--- compile.c	2000/09/20 23:59:22	1.13.2.1
+++ compile.c	2001/04/06 07:13:37
@@ -170,6 +170,10 @@
 semicolon:	EATSPACE();
 		if (p && (*p == '#' || *p == '\0'))
 			continue;
+		if (*p == ';') {
+			p++;
+			goto semicolon;
+		}
 		*link = cmd = xmalloc(sizeof(struct s_command));
 		link = &cmd->next;
 		cmd->nonsel = cmd->inrange = 0;

-- 
$B?9(B $B9@Fs(B	(MORI Kouji)
($B3t(B)$B^I>BAH(B $B5;=Q8&5f=j(B
E-mail: mori@tri.asanuma.co.jp
