Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-8]: src/bin/sh Pull up following revision(s) (reques...



details:   https://anonhg.NetBSD.org/src/rev/ae8d4c2fcc85
branches:  netbsd-8
changeset: 318818:ae8d4c2fcc85
user:      martin <martin%NetBSD.org@localhost>
date:      Sun May 06 09:32:57 2018 +0000
description:
Pull up following revision(s) (requested by kre in ticket #804):

        bin/sh/parser.c: revision 1.146

PR bin/53201

Don't synerr on
        ${var-anything
        more}

The newline in the middle of the var expansion is permitted.

Bug reported by Martijn Dekker from his modernish tests.
XXX pullup-8

diffstat:

 bin/sh/parser.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 6254e075eac3 -r ae8d4c2fcc85 bin/sh/parser.c
--- a/bin/sh/parser.c   Sun May 06 09:27:04 2018 +0000
+++ b/bin/sh/parser.c   Sun May 06 09:32:57 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: parser.c,v 1.132.2.3 2017/11/17 20:33:53 snj Exp $     */
+/*     $NetBSD: parser.c,v 1.132.2.4 2018/05/06 09:32:57 martin 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.132.2.3 2017/11/17 20:33:53 snj Exp $");
+__RCSID("$NetBSD: parser.c,v 1.132.2.4 2018/05/06 09:32:57 martin Exp $");
 #endif
 #endif /* not lint */
 
@@ -1636,7 +1636,7 @@
                CHECKSTRSPACE(4, out);  /* permit 4 calls to USTPUTC */
                switch (syntax[c]) {
                case CNL:       /* '\n' */
-                       if (syntax == BASESYNTAX)
+                       if (syntax == BASESYNTAX && varnest == 0)
                                break;  /* exit loop */
                        USTPUTC(c, out);
                        plinno++;



Home | Main Index | Thread Index | Old Index