Discussion:
slrline.c: SLang_RLine_Info_Type.root not used?
(too old to reply)
Arjan Opmeer
2004-01-22 02:23:37 UTC
Permalink
Hi,

I was wondering why the SLang_RLine_Info_Type.root pointer is never
initialised.

I imagine it is supposed to point to the start of the linked list of lines
saved with SLang_rline_save_line. It would be useful for maintaining a
history of lines with a fixed number of entries. Each time a new line is
saved to the tail the oldest entry pointed to by root could be discarded.

So I think something like this is missing from SLang_rline_save_line:

if (rli->root == NULL)
{
rli->root = rl;
}

What do you think...?


Arjan
John E. Davis
2004-01-31 20:41:33 UTC
Permalink
Post by Arjan Opmeer
I was wondering why the SLang_RLine_Info_Type.root pointer is never
initialised.
The truth is that the read line interface was never finished because
the changes that I wanted to make to it involved breaking binary
compatibility with previous releases--- something that I was not
willing to do for the 1.X series. For example, one of the things that
I intend to do is to allow the readline routines to invoke interpreter
functions. Version 2 will not have the problem because the readline
structure will made opaque in the public interface.

--John

Loading...