zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@ibmth.df.unipi.it>
To: zsh-workers@sunsite.auc.dk (Zsh hackers list)
Subject: PATCH: 3.0.6-pre-3: parameter fixes
Date: Tue, 01 Jun 1999 13:25:33 +0200	[thread overview]
Message-ID: <9906011125.AA14818@ibmth.df.unipi.it> (raw)

These are the two parameter fixes adapted for 3.0.6:  first, typeset -m
restored unset parameters which hadn't been removed from the table; second,
in fn1() { local foo; unset foo; foo=bar; }, foo is restored at local
level, while if the `unset foo' appeared in a nested function it would have
been restored at global level, which is presumably wrong, depending what
`wrong' means.

--- Src/builtin.c.pm	Tue Jun  1 12:02:43 1999
+++ Src/builtin.c	Tue Jun  1 12:13:26 1999
@@ -2986,6 +2986,8 @@
 	    for (i = 0; i < paramtab->hsize; i++) {
 		for (pm = (Param) paramtab->nodes[i]; pm;
 		     pm = (Param) pm->next) {
+		    if (pm->flags & PM_UNSET)
+			continue;
 		    if (domatch(pm->nam, com, 0))
 			addlinknode(pmlist, pm);
 		}
--- Src/params.c.pm	Thu Apr 29 10:08:40 1999
+++ Src/params.c	Tue Jun  1 12:09:28 1999
@@ -1121,7 +1121,7 @@
 	    unsetparam_pm(altpm, 1);
     }
 
-    if ((locallevel && locallevel == pm->level) || spec) {
+    if ((pm->level && locallevel >= pm->level) || spec) {
 	pm->flags |= PM_UNSET;
 	return;
     }

-- 
Peter Stephenson <pws@ibmth.df.unipi.it>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy


                 reply	other threads:[~1999-06-01 11:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=9906011125.AA14818@ibmth.df.unipi.it \
    --to=pws@ibmth.df.unipi.it \
    --cc=zsh-workers@sunsite.auc.dk \
    /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).