Simple Line Editor

Chris Johns chrisj at rtems.org
Sun Feb 21 03:29:33 UTC 2010


On 21/02/2010 4:07 AM, Eric Norum wrote:
> This looks like an interesting project. As the web page says,
> functionality somewhat like readline would be very useful.

Factoring out the shell code into a generic line editor is a worth while 
project.

> The one big requirement is that the code be reentrant to allow for
> multiple ssh or telnet 'logins' to the RTEMS machine. This is currently
> the major shortcoming in readline (and the similar 'tecla' project)
> since they rely on the termcap library which is non-reentrant.

The line editor in the shell supports more than input stream now with 
separate histories. It does not support searching or completion.

> A way to limit the scope to make the project more tractable would be to
> support only the ANSI terminal control sequences. This isn't that big a
> restriction nowadays when a 'terminal' is likely an emulation program
> running on another computer.

The shell's line editor code is based on a generic line editor I wrote 
in C++ almost 20years ago. It has a table look up to handle different 
terminal types. We should allow users the ability to add specific 
terminal types. The shell's version came from the monitor which came 
from ... from ....  I am about to use the same code again in a host RFS 
image tool.

Chris



More information about the users mailing list