From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: zsh-workers@math.gatech.edu
Cc: borsenkow.msk@sni.de
Subject: Re: sh compatibility again :->
Date: Sun, 11 Aug 1996 23:34:47 -0700 [thread overview]
Message-ID: <960811233447.ZM5572@candle.brasslantern.com> (raw)
In-Reply-To: "Bart Schaefer" <schaefer@candle.brasslantern.com> "Re: sh compatibility again :->" (Aug 11, 11:01pm)
} 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"
next prev parent reply other threads:[~1996-08-12 6:48 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-07-31 21:11 Announcement draft Zoltan Hidvegi
1996-07-31 22:15 ` Zefram
1996-08-01 6:36 ` Bas V. de Bakker
1996-08-01 8:31 ` Peter Stephenson
1996-08-01 9:04 ` Running zsh as sh (Was: Announcement draft) Bas V. de Bakker
1996-08-01 9:10 ` Announcement draft Andrej Borsenkow
1996-08-01 13:49 ` Here docs Peter Stephenson
1996-08-01 14:07 ` Zoltan Hidvegi
1996-08-01 16:27 ` More Configure problems Peter Stephenson
1996-08-01 17:40 ` Peter Stephenson
1996-08-01 17:55 ` Zoltan Hidvegi
1996-08-01 21:03 ` Zoltan Hidvegi
1996-08-01 23:30 ` Zoltan Hidvegi
1996-08-02 8:32 ` Peter Stephenson
1996-08-02 10:03 ` Andrej Borsenkow
1996-08-02 13:29 ` Zoltan Hidvegi
1996-08-02 1:03 ` Zefram
1996-08-01 14:42 ` Announcement draft Zoltan Hidvegi
1996-08-08 15:13 ` sh compatibility again :-> Andrej Borsenkow
1996-08-12 2:18 ` Zoltan Hidvegi
1996-08-12 4:36 ` Bart Schaefer
1996-08-12 5:00 ` Zefram
1996-08-12 6:01 ` Bart Schaefer
1996-08-12 6:34 ` Bart Schaefer [this message]
1996-08-12 6:20 ` Andrej Borsenkow
1996-08-12 15:29 whukriede
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=960811233447.ZM5572@candle.brasslantern.com \
--to=schaefer@candle.brasslantern.com \
--cc=borsenkow.msk@sni.de \
--cc=schaefer@nbn.com \
--cc=zsh-workers@math.gatech.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).