Simple Line Editor

Till Straumann strauman at slac.stanford.edu
Wed Mar 3 13:47:31 UTC 2010


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.
That's right. tecla is certainly adding some weight even though you 
don't have to use all
features (e.g., history or command line completion).
> 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.
How about defining an interface that could be implemented using tecla if 
more
features are desired as well as by a minimal line editor if space is an 
issue.

If either editor is wrapped into a common interface then this helps 
modularity.

-- Till
>
> Chris




More information about the users mailing list