From owner-svn-src-all@freebsd.org Tue May 22 04:46:09 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08D96EE665D; Tue, 22 May 2018 04:46:09 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id AC49282860; Tue, 22 May 2018 04:46:06 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id KzBLfxm3TuYopKzBNfeJSe; Mon, 21 May 2018 22:45:59 -0600 X-Authority-Analysis: v=2.3 cv=GopsBH9C c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=VUJBJC2UJ8kA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=LcHKg_ejYAhpDSSuxu0A:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 1636622A3; Mon, 21 May 2018 21:45:55 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id w4M4jsjA019559; Mon, 21 May 2018 21:45:54 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id w4M4jroR019550; Mon, 21 May 2018 21:45:53 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201805220445.w4M4jroR019550@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: "O. Hartmann" cc: Jilles Tjoelker , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r334008 - head/bin/sh In-Reply-To: Message from "O. Hartmann" of "Tue, 22 May 2018 06:13:45 +0200." <20180522061339.2149763e@freyja.zeit4.iv.bundesimmobilien.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 21 May 2018 21:45:53 -0700 X-CMAE-Envelope: MS4wfBpKdSZNILZ6c08K2CTNv9j3ggC9bGGb0MZwZlsLhAvRscpCmte5Bn+79Cfmvn8chLodgnojLXi1ZqiHIor8HpfuCLc+PANr0bEPPUo2YrzI2sQBFUAe yw/hT/phXohvEsjCnt3cSyACdqsWFqD8ftiraJk0x64mBLkeWPi5d5mKezCX3baIH3FcXgtb4wloLJMR8mz4DYOoPdjPo6/90ycHK4yoeIhKFTM8Sm6G8fsY QG72zGLSJZN2lZv2WMfx/U7x2b2WfyDOLpF6nfPsQEXaX0xfIuVEtJLnBLic081/eGYYyTcfvGT3H2NB2WkkQg== X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 04:46:09 -0000 In message <20180522061339.2149763e@freyja.zeit4.iv.bundesimmobilien.de> , "O. H artmann" writes: > On Mon, 21 May 2018 21:52:48 +0000 (UTC) > Jilles Tjoelker wrote: > > > Author: jilles > > Date: Mon May 21 21:52:48 2018 > > New Revision: 334008 > > URL: https://svnweb.freebsd.org/changeset/base/334008 > > > > Log: > > sh: Split CNL syntax category to avoid a check on state[level].syntax > > > > No functional change is intended. > > > > Modified: > > head/bin/sh/mksyntax.c > > head/bin/sh/parser.c > > > > Modified: head/bin/sh/mksyntax.c > > =========================================================================== > === > > --- head/bin/sh/mksyntax.c Mon May 21 21:44:47 2018 (r334007) > > +++ head/bin/sh/mksyntax.c Mon May 21 21:52:48 2018 (r334008) > > @@ -65,6 +65,7 @@ struct synclass { > > static const struct synclass synclass[] = { > > { "CWORD", "character is nothing special" }, > > { "CNL", "newline character" }, > > + { "CQNL", "newline character in quotes" }, > > { "CBACK", "a backslash character" }, > > { "CSBACK", "a backslash character in single quotes" }, > > { "CSQUOTE", "single quote" }, > > @@ -185,7 +186,7 @@ main(int argc __unused, char **argv __unused) > > fputs("\n/* syntax table used when in double quotes */\n", cfile); > > init("dqsyntax"); > > add_default(); > > - add("\n", "CNL"); > > + add("\n", "CQNL"); > > add("\\", "CBACK"); > > add("\"", "CENDQUOTE"); > > add("`", "CBQUOTE"); > > @@ -198,7 +199,7 @@ main(int argc __unused, char **argv __unused) > > fputs("\n/* syntax table used when in single quotes */\n", cfile); > > init("sqsyntax"); > > add_default(); > > - add("\n", "CNL"); > > + add("\n", "CQNL"); > > add("\\", "CSBACK"); > > add("'", "CENDQUOTE"); > > /* ':/' for tilde expansion, '-^]' for [a\-x] pattern ranges */ > > @@ -208,7 +209,7 @@ main(int argc __unused, char **argv __unused) > > fputs("\n/* syntax table used when in arithmetic */\n", cfile); > > init("arisyntax"); > > add_default(); > > - add("\n", "CNL"); > > + add("\n", "CQNL"); > > add("\\", "CBACK"); > > add("`", "CBQUOTE"); > > add("\"", "CIGN"); > > > > Modified: head/bin/sh/parser.c > > =========================================================================== > === > > --- head/bin/sh/parser.c Mon May 21 21:44:47 2018 (r334007) > > +++ head/bin/sh/parser.c Mon May 21 21:52:48 2018 (r334008) > > @@ -1434,9 +1434,10 @@ readtoken1(int firstc, char const *initialsyntax, co > ns > > > > switch(synentry) { > > case CNL: /* '\n' */ > > - if (level == 0 && > > - state[level].syntax == BASESYNTAX) > > + if (level == 0) > > goto endword; /* exit outer > > loop */ > > + /* FALLTHROUGH */ > > + case CQNL: > > USTPUTC(c, out); > > plinno++; > > if (doprompt) > > _______________________________________________ > > svn-src-head@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/svn-src-head > > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > > > Have this been tested? Doesn't compile for me: > > [...] > Building /usr/obj/usr/src/amd64.amd64/kerberos5/libexec/hprop/hprop > --- all_subdir_rescue --- > --- parser.o --- > /usr/src/bin/sh/parser.c:1440:9: error: use of undeclared identifier 'CQNL' > case CQNL: > ^ > --- all_subdir_gnu --- > Building /usr/obj/usr/src/amd64.amd64/gnu/usr.bin/gdb/libgdb/amd64bsd-nat.o > --- all_subdir_rescue --- > 1 error generated. > *** [parser.o] Error code 1 > > make[6]: stopped in /usr/src/bin/sh > CQNL is defined in /usr/obj/opt/src/svn-current/amd64.amd64/bin/sh/synta x.h, generated by mksyntax. slippy$ ag -s CQNL /export/obj/opt/src/svn-current/amd64.amd64/bin/sh/*. h /export/obj/opt/src/svn-current/amd64.amd64/bin/sh/syntax.h 11:#define CQNL 2 /* newline character in quotes */ slippy$ Remove the file if it's not defined in your syntax.h. Just out of interest, do you use meta mode? -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few.