From owner-svn-src-stable-8@FreeBSD.ORG Thu Sep 23 21:36:10 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 947111065696; Thu, 23 Sep 2010 21:36:10 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 67E358FC16; Thu, 23 Sep 2010 21:36:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8NLaAFx081161; Thu, 23 Sep 2010 21:36:10 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8NLaAjG081157; Thu, 23 Sep 2010 21:36:10 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201009232136.o8NLaAjG081157@svn.freebsd.org> From: Jilles Tjoelker Date: Thu, 23 Sep 2010 21:36:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213087 - in stable/8: bin/sh tools/regression/bin/sh/builtins X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Sep 2010 21:36:10 -0000 Author: jilles Date: Thu Sep 23 21:36:10 2010 New Revision: 213087 URL: http://svn.freebsd.org/changeset/base/213087 Log: MFC r212339: sh: Fix 'read' if all chars before the first IFS char are backslash-escaped. Backslash-escaped characters did not set the flag for a non-IFS character. Added: stable/8/tools/regression/bin/sh/builtins/read4.0 - copied unchanged from r212339, head/tools/regression/bin/sh/builtins/read4.0 stable/8/tools/regression/bin/sh/builtins/read4.0.stdout - copied unchanged from r212339, head/tools/regression/bin/sh/builtins/read4.0.stdout Modified: stable/8/bin/sh/miscbltin.c Directory Properties: stable/8/bin/sh/ (props changed) stable/8/tools/regression/bin/sh/ (props changed) Modified: stable/8/bin/sh/miscbltin.c ============================================================================== --- stable/8/bin/sh/miscbltin.c Thu Sep 23 20:49:33 2010 (r213086) +++ stable/8/bin/sh/miscbltin.c Thu Sep 23 21:36:10 2010 (r213087) @@ -174,6 +174,7 @@ readcmd(int argc __unused, char **argv _ continue; if (backslash) { backslash = 0; + startword = 0; if (c != '\n') STPUTC(c, p); continue; Copied: stable/8/tools/regression/bin/sh/builtins/read4.0 (from r212339, head/tools/regression/bin/sh/builtins/read4.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/bin/sh/builtins/read4.0 Thu Sep 23 21:36:10 2010 (r213087, copy of r212339, head/tools/regression/bin/sh/builtins/read4.0) @@ -0,0 +1,10 @@ +# $FreeBSD$ + +printf '%s\n' '\a\ b c' | { read a b; printf '%s\n' "x${a}x${b}x"; } +printf '%s\n' '\a b\ c' | { read a b; printf '%s\n' "x${a}x${b}x"; } +printf '%s\n' '\a\:b:c' | { IFS=: read a b; printf '%s\n' "x${a}x${b}x"; } +printf '%s\n' '\a:b\:c' | { IFS=: read a b; printf '%s\n' "x${a}x${b}x"; } +printf '%s\n' '\\ a' | { read a b; printf '%s\n' "x${a}x${b}x"; } +printf '%s\n' '\\:a' | { IFS=: read a b; printf '%s\n' "x${a}x${b}x"; } +printf '%s\n' '\\\ a' | { read a b; printf '%s\n' "x${a}x${b}x"; } +printf '%s\n' '\\\:a' | { IFS=: read a b; printf '%s\n' "x${a}x${b}x"; } Copied: stable/8/tools/regression/bin/sh/builtins/read4.0.stdout (from r212339, head/tools/regression/bin/sh/builtins/read4.0.stdout) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/bin/sh/builtins/read4.0.stdout Thu Sep 23 21:36:10 2010 (r213087, copy of r212339, head/tools/regression/bin/sh/builtins/read4.0.stdout) @@ -0,0 +1,8 @@ +xa bxcx +xaxb cx +xa:bxcx +xaxb:cx +x\xax +x\xax +x\ axx +x\:axx