Module Name: src Committed By: kre Date: Sat Jun 3 18:31:35 UTC 2017
Modified Files: src/bin/sh: parser.c Log Message: When we record an arithmetic expression ($(( ))) as being quoted, what matters is the quoting state just before we switch into arithmetic syntax parsing mode, not the state after... This fixes the regiression introduced earlier today (UTC) where quoted arithmetic expressions were being subjected to word splitting. To generate a diff of this commit: cvs rdiff -u -r1.131 -r1.132 src/bin/sh/parser.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/bin/sh/parser.c diff -u src/bin/sh/parser.c:1.131 src/bin/sh/parser.c:1.132 --- src/bin/sh/parser.c:1.131 Sat Jun 3 10:31:16 2017 +++ src/bin/sh/parser.c Sat Jun 3 18:31:35 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: parser.c,v 1.131 2017/06/03 10:31:16 kre Exp $ */ +/* $NetBSD: parser.c,v 1.132 2017/06/03 18:31:35 kre Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)parser.c 8.7 (Berkeley) 5/16/95"; #else -__RCSID("$NetBSD: parser.c,v 1.131 2017/06/03 10:31:16 kre Exp $"); +__RCSID("$NetBSD: parser.c,v 1.132 2017/06/03 18:31:35 kre Exp $"); #endif #endif /* not lint */ @@ -1919,17 +1919,16 @@ parsearith: { } else #endif { - TS_PUSH(); - syntax = ARISYNTAX; - arinest = 1; - varnest = 0; - USTPUTC(CTLARI, out); if (ISDBLQUOTE()) USTPUTC('"',out); else USTPUTC(' ',out); + TS_PUSH(); + syntax = ARISYNTAX; + arinest = 1; + varnest = 0; } goto parsearith_return; }