From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by coral.primenet.com.au (8.7.5/8.7.3) with ESMTP id QAA01957 for ; Mon, 12 Aug 1996 16:48:50 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id CAA02139; Mon, 12 Aug 1996 02:33:50 -0400 (EDT) Resent-Date: Mon, 12 Aug 1996 02:33:50 -0400 (EDT) From: "Bart Schaefer" Message-Id: <960811233447.ZM5572@candle.brasslantern.com> Date: Sun, 11 Aug 1996 23:34:47 -0700 In-Reply-To: "Bart Schaefer" "Re: sh compatibility again :->" (Aug 11, 11:01pm) References: <9940.199608120500@stone.dcs.warwick.ac.uk> <960811230122.ZM5212@candle.brasslantern.com> Reply-To: schaefer@nbn.com X-Mailer: Z-Mail (4.0b.729 29jul96) To: zsh-workers@math.gatech.edu Subject: Re: sh compatibility again :-> Cc: borsenkow.msk@sni.de MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"9KjCY2.0.MX.E1j3o"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/1945 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu } The only way to resolve this would be with yet another option, SH_QUOTES } or some such. Worth it? Dunno. This is a ridiculously simple patch, so in case anybody wants it ... note that this makes live the DPUTS(!*str, "Oops ...") error in the walk-off- end-of-a-string loop for which I sent a patch last week, so you probably want that earlier patch as well. The only question about this patch is whether + int shq = (endchar == '"' && isset(SHQUOTES)); ought to be + int shq = ((endchar == '\0' || endchar == '"') && isset(SHQUOTES)); I actually think perhaps it should. --- Src/globals.h.0 Sun Aug 4 21:15:43 1996 +++ Src/globals.h Sun Aug 11 23:20:21 1996 @@ -764,6 +764,7 @@ {"shinstdin", 's', 's', OPT_SPECIAL}, {"shoptionletters", 0, 0, OPT_EMULATE|OPT_BOURNE}, {"shortloops", 0, 0, OPT_ALL}, + {"shquotes", 0, 0, OPT_EMULATE|OPT_SH}, {"shwordsplit", 'y', 0, OPT_EMULATE|OPT_BOURNE}, {"singlecommand", 't', 't', OPT_SPECIAL}, {"singlelinezle", 'M', 0, OPT_KSH}, --- Src/lex.c.0 Sun Aug 4 23:09:29 1996 +++ Src/lex.c Sun Aug 11 23:16:28 1996 @@ -1000,10 +1000,11 @@ int c; int math = endchar == ')' || endchar == ']'; int zlemath = math && cs > ll + addedx - inbufct; + int shq = (endchar == '"' && isset(SHQUOTES)); while (((c = hgetc()) != endchar || bct || (math && ((pct > 0) || (brct > 0))) || - intick) && !lexstop) { + (intick && !shq)) && !lexstop) { cont: switch (c) { case '\\': --- Src/zsh.h.0 Sun Aug 4 21:15:44 1996 +++ Src/zsh.h Sun Aug 11 23:17:10 1996 @@ -1146,6 +1146,7 @@ SHINSTDIN, SHOPTIONLETTERS, SHORTLOOPS, + SHQUOTES, SHWORDSPLIT, SINGLECOMMAND, SINGLELINEZLE, -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.nbn.com/people/lantern New male in /home/schaefer: >N 2 Justin William Schaefer Sat May 11 03:43 53/4040 "Happy Birthday"