From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: zsh-users@zsh.org
Subject: Re: ${(s::)VAR} vs "${(s::)VAR}"
Date: Sun, 29 Apr 2012 19:22:26 +0100 [thread overview]
Message-ID: <20120429192226.7701b9cf@pws-pc.ntlworld.com> (raw)
In-Reply-To: <120427195048.ZM10479@torch.brasslantern.com>
On Fri, 27 Apr 2012 19:50:48 -0700
Bart Schaefer <schaefer@brasslantern.com> wrote:
> } for (; (c = findsep(&s, sep, 0)) >= 0; s += sl)
> } - if ((c && *(s + sl)) || mul)
> } + if ((c || mul) && *(s + sl))
> } r++;
>
> Does it matter that the changed line dereferences s+sl in cases where
> the original line does not?
That's true only if c is 0 and mul is 1 (before c had to be 1). c is 0
if we're already at a separator, so I think dereferencing s+sl is still
OK.
--
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/
next prev parent reply other threads:[~2012-04-29 18:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-26 20:48 Kynn Jones
2012-04-27 20:38 ` Peter Stephenson
2012-04-28 2:50 ` Bart Schaefer
2012-04-29 18:22 ` Peter Stephenson [this message]
2012-04-29 18:41 ` Peter Stephenson
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=20120429192226.7701b9cf@pws-pc.ntlworld.com \
--to=p.w.stephenson@ntlworld.com \
--cc=zsh-users@zsh.org \
/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).