zsh-workers
 help / color / mirror / code / Atom feed
From: Zoltan Hidvegi <hzoli@cs.elte.hu>
To: daniel@UG.EDS.COM (Daniel Dignam)
Cc: zsh-workers@math.gatech.edu
Subject: Re: return from function terminates loop
Date: Wed, 29 Jan 1997 00:30:18 +0100 (MET)	[thread overview]
Message-ID: <199701282330.AAA02076@hzoli.ppp.cs.elte.hu> (raw)
In-Reply-To: <32EE34E7.FF6@UG.EDS.COM> from Daniel Dignam at "Jan 28, 97 05:18:31 pm"

> Returning from a function which s called from a loop appears to
> terminate the loop. Consider the following:

Now I know the reason for that breaks = 0 assignment in doshfunc!
Try this patch.

Zoltan


*** Src/exec.c	1997/01/27 22:03:20	3.1.1.11
--- Src/exec.c	1997/01/28 22:54:56
***************
*** 2520,2525 ****
--- 2520,2526 ----
      char *s, *ou;
      void *xexitfn;
      char saveopts[OPT_SIZE];
+     int obreaks = breaks;
  
      HEAPALLOC {
  	pushheap();
***************
*** 2585,2591 ****
  	zfree(locallist, sizeof(struct linklist));
  
  	locallist = olist;	/* restore the old list of local variables */
! 	retflag = 0;
  	freearray(pparams);
  	if (oargv0) {
  	    zsfree(argzero);
--- 2586,2595 ----
  	zfree(locallist, sizeof(struct linklist));
  
  	locallist = olist;	/* restore the old list of local variables */
! 	if (retflag) {
! 	    retflag = 0;
! 	    breaks = obreaks;
! 	}
  	freearray(pparams);
  	if (oargv0) {
  	    zsfree(argzero);


  reply	other threads:[~1997-01-29  0:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-01-28 17:18 Daniel Dignam
1997-01-28 23:30 ` Zoltan Hidvegi [this message]
1997-01-29 13:43   ` Daniel Dignam

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=199701282330.AAA02076@hzoli.ppp.cs.elte.hu \
    --to=hzoli@cs.elte.hu \
    --cc=daniel@UG.EDS.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).