Simple Line Editor

Joel Sherrill joel.sherrill at
Wed Mar 3 15:10:57 UTC 2010

On 03/02/2010 05:49 PM, Chris Johns wrote:
> Joel Sherrill wrote:
>> On 03/02/2010 09:59 AM, Till Straumann wrote:
>>> Eric Norum wrote:
>>>> This looks like an interesting project.  As the web page says,
>>>> functionality somewhat like readline would be very useful.
>>>> 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.
>>> You can build 'tecla' without using curses, ncurses or termcap and you
>>> get a
>>> very nice, re-entrant line editor (assumes/supports an ANSI terminal
>>> only).
>>> FWIW
>> That looks like a nice alternative. Any idea on how big the
>> resulting library is?
> It does look like a nice library.
>> (1) verify this meets our technical requirements,
> I think size is a very important issue. The shell could do with a weight loss
> program now and adding a line editor that is the same size as the shell is not
> going to help those users with memory constraints.
> I see the need for a fully featured line editor and it appears tecla offers
> that but I also see the need for a light weight very basic line editor. The
> project as it exists in the Wiki calls for a refactoring of the existing code
> and I think that project should exist as is. If we want to support other line
> editors in the shell then that is a different project and the shell should be
> modified to do this. A confdefs.h setting could set the line editor used.
Could the current GSOC project have a second phase to implement
the alternate use of tecla?

I am just thinking since this project is primarily refactoring and
documenting the existing line editor, it shouldn't add a lot of work
to be able to use an alternate "line entry" system.  And one could
be a very simple fgets() which would be no history, no real editing,
etc.  Even lighter.

So at the end, we would have shell with support for multiple
line entry subsystems and a way to configure them.

> Chris

Joel Sherrill, Ph.D.             Director of Research&  Development
joel.sherrill at        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
    Support Available             (256) 722-9985

More information about the users mailing list