From owner-cvs-src@FreeBSD.ORG Wed Jun 4 08:31:56 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8B4D837B401; Wed, 4 Jun 2003 08:31:56 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2AFC443F93; Wed, 4 Jun 2003 08:31:56 -0700 (PDT) (envelope-from fanf@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h54FVt0U006168; Wed, 4 Jun 2003 08:31:56 -0700 (PDT) (envelope-from fanf@repoman.freebsd.org) Received: (from fanf@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h54FVtOD006167; Wed, 4 Jun 2003 08:31:55 -0700 (PDT) Message-Id: <200306041531.h54FVtOD006167@repoman.freebsd.org> From: Tony Finch Date: Wed, 4 Jun 2003 08:31:55 -0700 (PDT) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/usr.bin/sed process.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jun 2003 15:31:57 -0000 fanf 2003/06/04 08:31:55 PDT FreeBSD src repository Modified files: usr.bin/sed process.c Log: Fix substitution when the regex matches the zero-length string. There are two bugs: in the s///g case, the substitution didn't occur at the end of the line; in the s///N case, the code didn't count forwards along the line properly. See the sg, s3, s4, and s5 tests in src/tools/regression/usr.bin/sed/. Reviewed by: tjr Revision Changes Path 1.30 +6 -5 src/usr.bin/sed/process.c