Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: SHLVL not updated in environment
- X-seq: zsh-workers 20394
- From: Peter Stephenson <pws@xxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: PATCH: SHLVL not updated in environment
- Date: Mon, 20 Sep 2004 15:30:31 +0100
- In-reply-to: <Pine.LNX.4.61.0409200710120.3533@xxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <200409201309.i8KD9QuP007197@xxxxxxxxxxxxxx> <Pine.LNX.4.61.0409200710120.3533@xxxxxxxxxxxxxxxxxx>
Bart Schaefer wrote:
> I think it's right, but it begs the question: What changed from 4.2.0
> to make this fix necessary?
The code changed from "right" to "wrong". It used to look like this.
pm = (Param) paramtab->getnode(paramtab, "SHLVL");
if (!(pm->flags & PM_EXPORTED))
pm->flags |= PM_EXPORTED;
sprintf(buf, "%d", (int)++shlvl);
pm->env = addenv("SHLVL", buf, pm->flags);
I rationalised addenv and in my zeal I probably didn't notice that the
shlvl code wanted rationalising in a slightly different way from the
others. The PM_EXPORTED flag is now handled within addenv(). So it
looks like the patch is correct.
--
Peter Stephenson <pws@xxxxxxx> Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK Tel: +44 (0)1223 692070
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
www.mimesweeper.com
**********************************************************************
Messages sorted by:
Reverse Date,
Date,
Thread,
Author