3 Apr 2009 11:58
Re: [patch] ksh macro fixes for emacs input mode (aka bind -m)
On Fri, 3 Apr 2009, Alexander Hall wrote: > Alexander Hall wrote: > > I believe you missed my latest set of patches at tech@... as > > well as the one I decided to send to PR 6088...(Continue reading)> Hmmm well reading the link I realize you did not in fact miss the latest > set of patches. I believe the last patch do what you want. Hm. I am slightly confused about <at> <at> -1762,8 +1765,10 <at> <at> x_e_getc(void) } else { if (macroptr) { c = *macroptr++; - if (!*macroptr) - macroptr = (char *) 0; + if (!c) { + macroptr = NULL; + c = x_getc(); + } } else c = x_getc(); } but upon reading it a third time or so, I think it handles the _last_ character of the replacement, whereas the rest handles all but the last character, right? - macroptr = (char *) 0;
> Hmmm well reading the link I realize you did not in fact miss the latest
> set of patches. I believe the last patch do what you want.
Hm. I am slightly confused about
<at> <at> -1762,8 +1765,10 <at> <at> x_e_getc(void)
} else {
if (macroptr) {
c = *macroptr++;
- if (!*macroptr)
- macroptr = (char *) 0;
+ if (!c) {
+ macroptr = NULL;
+ c = x_getc();
+ }
} else
c = x_getc();
}
but upon reading it a third time or so, I think it handles the
_last_ character of the replacement, whereas the rest handles
all but the last character, right?
- macroptr = (char *) 0;
RSS Feed