Yes, it would. Basically it allows you to do screen control and the output
depends on the TERM environment variable.

We either implement a wrapper around pure terminfo which is quite
low-level. You have to make calls that create output strings using the
building blocks described here:
http://pubs.opengroup.org/onlinepubs/7908799/xcurses/terminfo.html

Or, we can interface to curses, which is a higher-level API, providing
calls such as "goto position", "create window [rectanguar work area] here",
etc. The benefit of curses is that it keeps track of the content of the
screen, making things like repaint both optimised and simple. Ther API for
curses can be found here:
http://pubs.opengroup.org/onlinepubs/7908799/xcurses/curses.h.html

As for implementation, creating an APL API for terminfo is obviously
easier. Much less thinking involved. :-)

Regards,
Elias


On 18 August 2014 23:27, Blake McBride <blake1...@gmail.com> wrote:

> I like this!  Will it work in aplwrap and terminal?
>
> Thanks.
>
> Blake
>
>
>
> On Mon, Aug 18, 2014 at 10:25 AM, Elias Mårtenson <loke...@gmail.com>
> wrote:
>
>> I think it's time to create an APL interface to terminfo. I can build
>> that if no one else volunteers.
>>
>> Regards,
>> Elias
>>
>>
>> On 18 August 2014 23:23, Blake McBride <blake1...@gmail.com> wrote:
>>
>>> Greetings,
>>>
>>> Some of my error handling code uses the bell (⎕AV[⎕IO+7]), and my editor
>>> uses some ANSI positioning sequences. I think all I use is clear and go to
>>> top of screen as follows:
>>>
>>>     ∇
>>> [0]   E∆Clear
>>> [1]   ⍞←(⎕UCS 27),'[2J'
>>> [2]   ⍞←(⎕UCS 27),'[1;1H'
>>>     ∇
>>>
>>> Anyway to get that working?
>>>
>>> Thanks.
>>>
>>> Blake
>>>
>>>
>>
>

Reply via email to