Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Augmenting a Sticky Emulation Mode
- X-seq: zsh-workers 31364
- From: Russell Harmon <russ@xxxxxxxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: Augmenting a Sticky Emulation Mode
- Date: Mon, 29 Apr 2013 22:34:54 -0700
- Cc: zsh-workers@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=GPaTgBr2BTD2JRwY5KnIdzef+NpfxeyEdwH5EFqQnW8=; b=VKeaTvJPMHwmZFkQGrkevsnWEfAbtPbMhV0MVRXjcWgUstMrA/fSPkP15ZCI25qsy7 ckRutJxqTx74xCTJOIky/ZAKvkZ9N4BSzMzBUxhkwBlaS2cnhMHfVkNnyPGorVQGieaQ rkf5bzdWSMFiLoV3LpKccuCSVASFgYuUIX8qgG/2jLDipZJ9Nuc57PKiL5hG56thfIrn zAzNUMyRuFPWTlekT/NE9NvgKwCBNpka/kmzOlC793PAbJpj/0V40lPs4ajObsbmjWwY Q+pYzQjx5AVijxFrUAwgs3ARP142rIcYKzdGBed2LtzdD19ux6YCIPuUqgZ4dXmeOSA6 hYGA==
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eatnumber1.com; s=google; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=GPaTgBr2BTD2JRwY5KnIdzef+NpfxeyEdwH5EFqQnW8=; b=ksDiRci9Ch8hPu7ci9XtdkR2DpG1+jxjFUh1KVeIaARhNgPN95nvSYkknDU23IKgRt 7vhozBKVHBWDYrRLCf24CefKqRHoY+viDg/ysAq5lVLY5zeQ55J4p4WgLHgkAyry8MvX ntbQHrYhmuCjyhln+Lv5Ipth6tCFZtSDHyUss=
- In-reply-to: <130429141717.ZM16337@torch.brasslantern.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CA+zrezRfVDfTHYMMj2HpeyrUJvyuTQ=p+PL0tV6u3hcZ1nOfAw@mail.gmail.com> <130426180127.ZM18989@torch.brasslantern.com> <CA+zrezROkjsD5mum5TCZ02h5Z+MTWiHC59cyuAyt1J0xpgUG+g@mail.gmail.com> <CA+zrezTCVO58URokScwT45VHa_MkgpvnEuNbvzB+Uk97+WpQRQ@mail.gmail.com> <20130429094700.6c8db4a9@pwslap01u.europe.root.pri> <CA+zrezT4Xn6sUPciVd=6m2M=gfTavnA8MzcjL11AzxmAGUfowA@mail.gmail.com> <CA+zrezS4X+=rkp42WWqcYC3eFZL95DgPHmKkGaEJj+R6ZB2BNg@mail.gmail.com> <130429111141.ZM16086@torch.brasslantern.com> <130429114756.ZM16140@torch.brasslantern.com> <130429141717.ZM16337@torch.brasslantern.com>
- Sender: eatnumber1@xxxxxxxxx
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@xxxxxxxxxxxxxxxx>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
>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author