* Yikes! Missing Patches in zsh-2.6-beta14...
@ 1996-04-16 19:16 Eskandar Ensafi
1996-04-16 19:57 ` Zoltan Hidvegi
0 siblings, 1 reply; 4+ messages in thread
From: Eskandar Ensafi @ 1996-04-16 19:16 UTC (permalink / raw)
To: zsh-workers
Hello,
Zoltan submitted some patches when zsh-2.6 was in beta12 and beta13.
Neither made it into beta13 or beta14. Here are the patches (one is
slightly modified). They address two problems:
(1) Call init_term() if ``print -P'' is being used (otherwise,
escape sequences of the form '%B...%b' do not work in shell
scripts or noninteractive shells.
(2) Fix crashes when using PROMPT_SUBST. Recall the following
from Zoltan's message of 01-Mar-96:
"[... after !! history expansion] lex.c calls the spell
checker on [a command] before the alias stack is popped.
The spell checker sees that [a misspelled command] should
be corrected, and prints the spelling correction prompt,
which then calls lexsave/lexrestore [...]. And the later
lexrestore calls clearalstack() which coredumps because of
the NULL entry that history expansion put there [...]"
The patches are included below.
- Eskandar
*** builtin.c.orig Tue Apr 16 10:14:49 1996
--- builtin.c Tue Apr 16 10:16:30 1996
***************
*** 4080,4087 ****
if (ops['D'])
fprintdir(arg, fout);
else {
! if (ops['P'])
arg = putprompt(arg, &len, NULL, 0);
fwrite(arg, len, 1, fout);
if(ops['P'])
free(arg);
--- 4080,4090 ----
if (ops['D'])
fprintdir(arg, fout);
else {
! if (ops['P']) {
! if (!termok && (isset(INTERACTIVE) || !init_term()))
! return 1;
arg = putprompt(arg, &len, NULL, 0);
+ }
fwrite(arg, len, 1, fout);
if(ops['P'])
free(arg);
*** lex.c.orig Sun Apr 14 22:33:32 1996
--- lex.c Tue Apr 16 10:20:07 1996
***************
*** 52,58 ****
int histdone;
int spaceflag;
int stophist;
- int alstackind;
int hlinesz;
char *hline;
char *hptr;
--- 52,57 ----
***************
*** 83,88 ****
--- 82,93 ----
{
struct lexstack *ls;
+ #ifdef DEBUG
+ if (alstackind) {
+ fprintf(stdout, "BUG: lexsave called with alstackind != 0\n");
+ fflush(stdout);
+ }
+ #endif
ls = (struct lexstack *)malloc(sizeof(struct lexstack));
ls->incmdpos = incmdpos;
***************
*** 91,97 ****
ls->dbparens = dbparens;
ls->in_brace_param = in_brace_param;
ls->alstat = alstat;
- ls->alstackind = alstackind;
ls->isfirstln = isfirstln;
ls->isfirstch = isfirstch;
ls->histremmed = histremmed;
--- 96,101 ----
***************
*** 155,161 ****
chwordlen = lstack->chwordlen;
chwordpos = lstack->chwordpos;
clearalstack();
- alstackind = lstack->alstackind;
hlinesz = lstack->hlinesz;
lexstop = errflag = 0;
--- 159,164 ----
***************
*** 917,923 ****
hwget(&yytext);
s = yytext;
if (interact && isset(SHINSTDIN) && !strin && !incasepat && tok == STRING &&
! (isset(CORRECTALL) || (isset(CORRECT) && incmdpos)) && !nocorrect)
spckword(&tokstr, &s, incmdpos, 1);
if (zleparse && !alstackind) {
int zp = zleparse;
--- 920,926 ----
hwget(&yytext);
s = yytext;
if (interact && isset(SHINSTDIN) && !strin && !incasepat && tok == STRING &&
! (isset(CORRECTALL) || (isset(CORRECT) && incmdpos)) && !nocorrect && !alstackind)
spckword(&tokstr, &s, incmdpos, 1);
if (zleparse && !alstackind) {
int zp = zleparse;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Yikes! Missing Patches in zsh-2.6-beta14...
1996-04-16 19:16 Yikes! Missing Patches in zsh-2.6-beta14 Eskandar Ensafi
@ 1996-04-16 19:57 ` Zoltan Hidvegi
1996-04-16 20:04 ` Eskandar Ensafi
0 siblings, 1 reply; 4+ messages in thread
From: Zoltan Hidvegi @ 1996-04-16 19:57 UTC (permalink / raw)
To: Eskandar Ensafi; +Cc: zsh-workers
Eskandar wrote:
> Zoltan submitted some patches when zsh-2.6 was in beta12 and beta13.
> Neither made it into beta13 or beta14. Here are the patches (one is
> slightly modified). They address two problems:
[...]
There are much more patches missing from beta14 from me and from other
people. About the init_term patch you included from me, I did not put it
into my release I used your patch doing the same in zle_misc.c in
putprompt(). I think that's a better placs for that. That was in atricle
791.
But promptsubst could cause other severe problems without the patch I
posted in article 792 and some other patches I did not posted yet since
they probably do not apply cleanly to the baseline.
I'll make a new release based on beta14 this weekend.
Bye,
Zoltan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Yikes! Missing Patches in zsh-2.6-beta14...
1996-04-16 19:57 ` Zoltan Hidvegi
@ 1996-04-16 20:04 ` Eskandar Ensafi
1996-04-17 0:18 ` Richard J. Coleman
0 siblings, 1 reply; 4+ messages in thread
From: Eskandar Ensafi @ 1996-04-16 20:04 UTC (permalink / raw)
To: zsh-workers
Hello,
> There are much more patches missing from beta14 from me and from other
> people. About the init_term patch you included from me, I did not put it
> into my release I used your patch doing the same in zle_misc.c in
> putprompt(). I think that's a better placs for that. That was in atricle
> 791.
Thanks for reminding me...
I actually checked to see if my zle_misc.c patch was included. It was not.
I simply reposted your patch instead -- after all, a working patch is better
than no patch at all...
- Eskandar
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Yikes! Missing Patches in zsh-2.6-beta14...
1996-04-16 20:04 ` Eskandar Ensafi
@ 1996-04-17 0:18 ` Richard J. Coleman
0 siblings, 0 replies; 4+ messages in thread
From: Richard J. Coleman @ 1996-04-17 0:18 UTC (permalink / raw)
To: zsh-workers
> > There are much more patches missing from beta14 from me and from other
> > people. About the init_term patch you included from me, I did not put it
> > into my release I used your patch doing the same in zle_misc.c in
> > putprompt(). I think that's a better placs for that. That was in atricle
> > 791.
>
> Thanks for reminding me...
Yes, I realized that there are patches missing. I'm getting back into zsh
work after a little rest (which I needed). I decided to go ahead and make
a beta14 release anyway, since I told everyone I would.
> I actually checked to see if my zle_misc.c patch was included. It was not.
> I simply reposted your patch instead -- after all, a working patch is better
> than no patch at all...
This is where our opinions differ. I will not put a patch in the baseline
until
I'm sure it is the right way to fix the problem.
rc
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~1996-04-17 0:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-04-16 19:16 Yikes! Missing Patches in zsh-2.6-beta14 Eskandar Ensafi
1996-04-16 19:57 ` Zoltan Hidvegi
1996-04-16 20:04 ` Eskandar Ensafi
1996-04-17 0:18 ` Richard J. Coleman
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).