From: Russell Harmon <russ@eatnumber1.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: zsh-workers@zsh.org
Subject: Re: Augmenting a Sticky Emulation Mode
Date: Mon, 29 Apr 2013 22:34:54 -0700 [thread overview]
Message-ID: <CA+zrezQv1JxvTp=Yq+bD3Tj1feVqQcWH0y=ojF2QcAjFLT+9kQ@mail.gmail.com> (raw)
In-Reply-To: <130429141717.ZM16337@torch.brasslantern.com>
[-- Attachment #1: Type: text/plain, Size: 1955 bytes --]
It seems as though my crash is also related to this bug. According to the
docs, BRACE_EXPAND is an alias for NO_IGNORE_BRACES.
emulate -R sh +o ignorebraces -c 'foo() { setopt; }'
works and doesn't crash the shell
--
Russell Harmon
On Mon, Apr 29, 2013 at 2:17 PM, Bart Schaefer <schaefer@brasslantern.com>wrote:
> On Apr 29, 11:47am, Bart Schaefer wrote:
> }
> } OK, I found the problem, but I don't know what to do to fix it.
>
> This seems to do it.
>
> diff --git a/Src/init.c b/Src/init.c
> index 8467a73..49ac124 100644
> --- a/Src/init.c
> +++ b/Src/init.c
> @@ -281,9 +281,10 @@ parseargs(char **argv, char **runscript)
>
> /**/
> static void
> -parseopts_insert(LinkList optlist, void *ptr)
> +parseopts_insert(LinkList optlist, void *base, int optno)
> {
> LinkNode node;
> + void *ptr = base + (optno < 0 ? -optno : optno);
>
> for (node = firstnode(optlist); node; incnode(node)) {
> if (ptr < getdata(node)) {
> @@ -390,7 +391,7 @@ parseopts(char *nam, char ***argvp, char *new_opts,
> char **cmdp,
> if (dosetopt(optno, action, !nam, new_opts) && nam) {
> WARN_OPTION("can't change option: %s", *argv);
> } else if (optlist) {
> - parseopts_insert(optlist, new_opts+optno);
> + parseopts_insert(optlist, new_opts, optno);
> }
> }
> break;
> @@ -415,7 +416,7 @@ parseopts(char *nam, char ***argvp, char *new_opts,
> char **cmdp,
> if (dosetopt(optno, action, !nam, new_opts) && nam) {
> WARN_OPTION("can't change option: -%c", **argv);
> } else if (optlist) {
> - parseopts_insert(optlist, new_opts+optno);
> + parseopts_insert(optlist, new_opts, optno);
> }
> }
> }
>
> --
> Barton E. Schaefer
>
prev parent reply other threads:[~2013-04-30 5:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CA+zrezRfVDfTHYMMj2HpeyrUJvyuTQ=p+PL0tV6u3hcZ1nOfAw@mail.gmail.com>
[not found] ` <130426180127.ZM18989@torch.brasslantern.com>
[not found] ` <CA+zrezROkjsD5mum5TCZ02h5Z+MTWiHC59cyuAyt1J0xpgUG+g@mail.gmail.com>
[not found] ` <CA+zrezTCVO58URokScwT45VHa_MkgpvnEuNbvzB+Uk97+WpQRQ@mail.gmail.com>
[not found] ` <20130429094700.6c8db4a9@pwslap01u.europe.root.pri>
[not found] ` <CA+zrezT4Xn6sUPciVd=6m2M=gfTavnA8MzcjL11AzxmAGUfowA@mail.gmail.com>
[not found] ` <CA+zrezS4X+=rkp42WWqcYC3eFZL95DgPHmKkGaEJj+R6ZB2BNg@mail.gmail.com>
2013-04-29 18:11 ` Bart Schaefer
2013-04-29 18:47 ` Bart Schaefer
2013-04-29 21:17 ` Bart Schaefer
2013-04-30 5:34 ` Russell Harmon [this message]
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='CA+zrezQv1JxvTp=Yq+bD3Tj1feVqQcWH0y=ojF2QcAjFLT+9kQ@mail.gmail.com' \
--to=russ@eatnumber1.com \
--cc=schaefer@brasslantern.com \
--cc=zsh-workers@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).