Curses + ANSI? 
Author Message
 Curses + ANSI?

I recently got re{*filter*}ed to one of the best muds out there
(sneezy.stanford.edu:7900)...  but when I started shopping around for
clients, I realized that none of them seem to support both a separate
command area (like tintin's #split option) and ANSI moveto controls.  Not
their fault, just seems to be that it's too hard to do both at once.
Anyway, since I couldn't find what I wanted to do in any available
clients, I decided to write my own.  Curses rock.  I love the instant
control they give me over the screen (I tried Term::Screen but couldn't
figure out how to make it scroll)..   However, I can't seem to get it to
display control characters as-is, without converting them to the ^X type
notation, which is a big hindrance when I want/need to support ANSI
colors.

Has anyone out there ever been able to get this to work?  You'd think
there would be a flag to turn of this feature for those of us who really
do want to transmit our OWN control characters to the terminal...

Any help will be much appreciated

-Chris



Sat, 15 May 2004 06:08:40 GMT  
 Curses + ANSI?

Quote:

>I recently got re{*filter*}ed to one of the best muds out there
>(sneezy.stanford.edu:7900)...  but when I started shopping around for
>clients, I realized that none of them seem to support both a separate
>command area (like tintin's #split option) and ANSI moveto controls.  Not
>their fault, just seems to be that it's too hard to do both at once.
>Anyway, since I couldn't find what I wanted to do in any available
>clients, I decided to write my own.  Curses rock.  I love the instant
>control they give me over the screen (I tried Term::Screen but couldn't
>figure out how to make it scroll)..   However, I can't seem to get it to
>display control characters as-is, without converting them to the ^X type
>notation, which is a big hindrance when I want/need to support ANSI
>colors.

It's too bad that curses and termcap out lasted Hazeltine, Televideo
and the Volker-Craig 404. It would be more obvious why curses is
the way it is if all the myriad of terminal types still existed.
As it is now ANSI sequences are just about a universal language
for this kind of thing.

If you want to "pass" escape sequences to the display you'll
need to intercept and tokenize them as if they were commands
then make the right API call to update the display.
--
    This space intentionally left blank



Sat, 15 May 2004 07:56:45 GMT  
 Curses + ANSI?
Not to ask a stupid question, but how might I go about doing that?  Are
there better things than curses for handling multiple scrolling regions
on the screen, that would also allow for ansi color?
Quote:



>>I recently got re{*filter*}ed to one of the best muds out there
>>(sneezy.stanford.edu:7900)...  but when I started shopping around for
>>clients, I realized that none of them seem to support both a separate
>>command area (like tintin's #split option) and ANSI moveto controls. Not
>>their fault, just seems to be that it's too hard to do both at once.
>>Anyway, since I couldn't find what I wanted to do in any available
>>clients, I decided to write my own.  Curses rock.  I love the instant
>>control they give me over the screen (I tried Term::Screen but couldn't
>>figure out how to make it scroll)..   However, I can't seem to get it to
>>display control characters as-is, without converting them to the ^X type
>>notation, which is a big hindrance when I want/need to support ANSI
>>colors.

> It's too bad that curses and termcap out lasted Hazeltine, Televideo and
> the Volker-Craig 404. It would be more obvious why curses is the way it
> is if all the myriad of terminal types still existed. As it is now ANSI
> sequences are just about a universal language for this kind of thing.

> If you want to "pass" escape sequences to the display you'll need to
> intercept and tokenize them as if they were commands then make the right
> API call to update the display.



Sat, 15 May 2004 16:03:30 GMT  
 Curses + ANSI?

Quote:

>Not to ask a stupid question, but how might I go about doing that?  Are
>there better things than curses for handling multiple scrolling regions
>on the screen, that would also allow for ansi color?

Despite my derisive comments earlier, Curses is a pretty good library for
doing this kind of screen management on unixoid operating systems.  It has
lots of useful features.  I'd not recommend looking much further unless
you want to move to a GUI style interface.

Good Luck
--
    This space intentionally left blank



Sun, 16 May 2004 05:17:27 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Curses + ANSI?

2. Curses.pm support for line draw chars and/or ANSI color

3. SVR4 curses on SunOS, or coraperl w/ BSD curses

4. curses and curses::forms

5. ls quirk when called from a CGI script (and (ansi) color escape-code question)

6. K&R -> ANSI translator

7. Fix for problems with DynaLoader when compiling with SunPro ANSI-C compiler

8. ANSI-fying Perl script, please (Q)

9. perl CGI for displaying text encoded with ANSI display sequences

10. ANSI C function prototype extracting perl script wanted

11. Formmail CGI-script in Ansi-C ?!

12. ANSI NT W2K

 

 
Powered by phpBB® Forum Software