Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: return from function terminates loop
- X-seq: zsh-workers 2837
- From: Zoltan Hidvegi <hzoli@xxxxxxxxxx>
- To: daniel@xxxxxxxxxx (Daniel Dignam)
- Subject: Re: return from function terminates loop
- Date: Wed, 29 Jan 1997 00:30:18 +0100 (MET)
- Cc: zsh-workers@xxxxxxxxxxxxxxx
- In-reply-to: <32EE34E7.FF6@xxxxxxxxxx> 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);
Messages sorted by:
Reverse Date,
Date,
Thread,
Author