* PATCH: noerrs, this time it's for real
@ 1999-03-17 13:04 Peter Stephenson
1999-03-17 16:43 ` Bart Schaefer
0 siblings, 1 reply; 3+ messages in thread
From: Peter Stephenson @ 1999-03-17 13:04 UTC (permalink / raw)
To: Zsh hackers list
Bart's patch to set errflag even if noerrs was caused problems in
createparamtable() if an imported parameter was marked internally as
restricted. The resulting errflag caused matheval() to fail, so my SHLVL
was always being reset to 0 (then incremented to 1, which was the error I
first saw).
It would make sense in this particular case to check for PM_RESTRICTED when
importing and so reject it earlier without creating an error, but the
experience is enough for me to suggest that noerrs have a `really no
errors' mode, used in the main shell code, leaving zle (where the original
problems were) as it was. This patch depends on that one, repeated in
5783 (pass that through sed -e 's/^} //' before patching).
--- Src/init.c.errs Thu Mar 11 11:20:39 1999
+++ Src/init.c Wed Mar 17 13:49:10 1999
@@ -743,7 +743,7 @@
char *s = getsparam("ENV");
if (islogin)
sourcehome(".profile");
- noerrs = 1;
+ noerrs = 2;
if (s && !parsestr(s)) {
singsub(&s);
noerrs = 0;
--- Src/params.c.errs Wed Mar 3 15:13:14 1999
+++ Src/params.c Wed Mar 17 13:48:16 1999
@@ -413,7 +413,7 @@
argvparam = (Param) paramtab->getnode(paramtab, "*");
- noerrs = 1;
+ noerrs = 2;
HEAPALLOC {
/* Add the standard non-special parameters which have to *
--- Src/utils.c.errs Mon Mar 15 10:54:31 1999
+++ Src/utils.c Wed Mar 17 13:49:38 1999
@@ -53,7 +53,8 @@
zerr(const char *fmt, const char *str, int num)
{
if (errflag || noerrs) {
- errflag = 1;
+ if (noerrs < 2)
+ errflag = 1;
return;
}
errflag = 1;
@@ -1308,7 +1309,7 @@
return;
guess = dupstring(guess);
ne = noerrs;
- noerrs = 1;
+ noerrs = 2;
singsub(&guess);
noerrs = ne;
if (!guess)
--
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: PATCH: noerrs, this time it's for real
1999-03-17 13:04 PATCH: noerrs, this time it's for real Peter Stephenson
@ 1999-03-17 16:43 ` Bart Schaefer
1999-03-17 16:44 ` Peter Stephenson
0 siblings, 1 reply; 3+ messages in thread
From: Bart Schaefer @ 1999-03-17 16:43 UTC (permalink / raw)
To: Peter Stephenson; +Cc: Zsh hackers list
Peter Stephenson writes:
> Bart's patch to set errflag even if noerrs was caused problems
You mean Sven's patch, right? The one from some week ago that I noticed
was not in pws-12, and therefore brought up again the other day.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: PATCH: noerrs, this time it's for real
1999-03-17 16:43 ` Bart Schaefer
@ 1999-03-17 16:44 ` Peter Stephenson
0 siblings, 0 replies; 3+ messages in thread
From: Peter Stephenson @ 1999-03-17 16:44 UTC (permalink / raw)
To: Zsh hackers list
Bart Schaefer wrote:
> Peter Stephenson writes:
> > Bart's patch to set errflag even if noerrs was caused problems
>
> You mean Sven's patch, right? The one from some week ago that I noticed
> was not in pws-12, and therefore brought up again the other day.
I suppose so, I only know of one.
--
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1999-03-17 17:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-03-17 13:04 PATCH: noerrs, this time it's for real Peter Stephenson
1999-03-17 16:43 ` Bart Schaefer
1999-03-17 16:44 ` Peter Stephenson
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).