zsh-workers
 help / color / mirror / code / Atom feed
From: <hzoli@VNET.IBM.COM> (Zoltan T. Hidvegi)
To: zsh-workers@math.gatech.edu (Zsh workers list)
Subject: Re: case $? fails
Date: Fri, 28 Feb 1997 11:23:35 -0500 (EST)	[thread overview]
Message-ID: <9702281623.AA15725@lotto.fishkill.ibm.com> (raw)
In-Reply-To: <970228082002.ZM22732@candle.brasslantern.com> from Bart Schaefer at "Feb 28, 97 08:20:02 am"

Bart Schaefer wrote:
> } prints zero.  The patch below fixes these.  The for syntax is new in
> } zsh-3.1 so the first two hunks should be removed if the patch is applied
> } against zsh-3.0.3-test4.
>
> The first two hunks?  Or the second two hunks?
>
> I've now tried this a couple of different ways and can't get it to apply
> to 3.0.3-test4.  Could you send a patch specifically for that?

It applied cleanly for me after removing the first two hunks.  But here is
the patch for 3.0.3-test4 anyway.

Zoltan


*** loop.c      1996/12/29 01:47:11     3.0.2.1
--- loop.c      1997/02/28 16:16:48
***************
*** 168,178 ****

      olderrexit = noerrexit;
      node = cmd->u.whilecmd;
!     lastval = 0;
      pushheap();
      loops++;
      for (;;) {
-       oldval = lastval;
        list = (List) dupstruct(node->cont);
        noerrexit = 1;
        execlist(list, 1, 0);
--- 168,177 ----

      olderrexit = noerrexit;
      node = cmd->u.whilecmd;
!     oldval = 0;
      pushheap();
      loops++;
      for (;;) {
        list = (List) dupstruct(node->cont);
        noerrexit = 1;
        execlist(list, 1, 0);
***************
*** 196,201 ****
--- 195,201 ----
            lastval = 1;
            break;
        }
+       oldval = lastval;
      }
      popheap();
      loops--;
***************
*** 282,291 ****
      l = node->lists;
      p = node->pats;

-     lastval = 0;
      word = *p++;
      singsub(&word);
      untokenize(word);

      if (node) {
        while (*p) {
--- 282,291 ----
      l = node->lists;
      p = node->pats;

      word = *p++;
      singsub(&word);
      untokenize(word);
+     lastval = 0;

      if (node) {
        while (*p) {


  reply	other threads:[~1997-02-28 16:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-02-27 19:08 Roderick Schertler
1997-02-27 21:50 ` Zoltan T. Hidvegi
1997-02-28 16:20   ` Bart Schaefer
1997-02-28 16:23     ` Zoltan T. Hidvegi [this message]
1997-02-28 17:52       ` Bart Schaefer
     [not found]   ` <hzoli@vnet.ibm.com>
1997-02-28 16:31     ` Bart Schaefer

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=9702281623.AA15725@lotto.fishkill.ibm.com \
    --to=hzoli@vnet.ibm.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).