[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

es & readline



(1) I had warned about using es-0.9alpha1 on SunOS with readline.  The
problem appears to be Sun's non-ansi header files (notably, for those
of you who've dealt with this before, the ioctl definitions) combined
with an ANSI preprocessor.  Sigh.  I first hit that in 1987 or so, and
thought it would be long dead by now.

Workarounds include using a more recent version of readline (I was
using something horrifically old, I think), fixing your include files,
or using a non-ansi preprocessor

(2) Soren Dayton <csdayton@midway.uchicago.edu> pointed out that his
es was crashing with multi-line commands.

It turns out that, with readline 2.0, a NULL prompt crashes.  He had a
$prompt which was 1 element long, and es was passing NULL to readline.
A patch to prevent es from doing that follows.

Later versions of readline (e.g., the one out of the current bash
distribution) do not have this problem.  Earlier ones must not have,
either, because otherwise it would have tripped people up before.

Paul

===================================================================
RCS file: RCS/input.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -r1.22 -r1.23
1c1
< /* input.c -- read input from files or strings ($Revision: 1.22 $) */
---
> /* input.c -- read input from files or strings ($Revision: 1.23 $) */
191a192,193
> 	if (prompt == NULL)
> 		prompt = ""; /* bug fix for readline 2.0 */