zsh-workers
 help / color / mirror / code / Atom feed
From: Daniel Dignam <daniel@UG.EDS.COM>
To: Zoltan Hidvegi <hzoli@cs.elte.hu>
Cc: zsh-workers@math.gatech.edu
Subject: Re: return from function terminates loop
Date: Wed, 29 Jan 1997 13:43:04 +0000	[thread overview]
Message-ID: <32EF53E8.3F54@UG.EDS.COM> (raw)
In-Reply-To: <199701282330.AAA02076@hzoli.ppp.cs.elte.hu>

Works like a charm, thanks

> > 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);

-- 

Daniel Dignam,                             
mailto:daniel@edsug.com                    
Assemblies Development                       Phone: +44 1223-371591
EDS Unigraphics                                FAX: +44 1223-316931

          http://www-sdl.ug.eds.com/ug_assemblies.html


      reply	other threads:[~1997-01-29 13:56 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
1997-01-29 13:43   ` Daniel Dignam [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=32EF53E8.3F54@UG.EDS.COM \
    --to=daniel@ug.eds.com \
    --cc=hzoli@cs.elte.hu \
    --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).