[comp.sys.hp] curses inefficiency

tgl@zog.cs.cmu.edu (Tom Lane) (03/28/90)

I've been trying to use the curses(3) library package for a program
that wants to pop-up an inverse-video window for error messages and
such.  I've found that this works well enough on some terminals, but
the performance *really sucks* when dealing with an HP 360 console or
with the "hpterm" X terminal emulator.  In both of these cases curses
outputs incredibly inefficient sequences to make the window area
become or cease to be inverse video.  (These are "300h" and "hp2622"
terminfo types.)

This seems to be related to use of the "xmc" and "xhp" terminfo
capabilities, but I haven't figured out exactly what the semantics of
these are.  In particular, the manual makes it appear that the
"xmc#0" appearing in the database should be a no-op, but
experimentation proves that it ain't.

I'm running HPUX 6.2.  Does anybody know if this problem has been
repaired in more recent system versions?  Alternately, has anyone
prepared a better terminfo description for these terminal types?

-- 
				tom lane
Internet: tgl@cs.cmu.edu
UUCP: <your favorite internet/arpanet gateway>!cs.cmu.edu!tgl
BITNET: tgl%cs.cmu.edu@cmuccvma
CompuServe: >internet:tgl@cs.cmu.edu

roskuski@mirror.tmc.com (Barry Roskuski) (03/28/90)

In article <8618@pt.cs.cmu.edu> tgl@zog.cs.cmu.edu (Tom Lane) writes:
>I've been trying to use the curses(3) library package for a program
>that wants to pop-up an inverse-video window for error messages and
>such.  I've found that this works well enough on some terminals, but
>the performance *really sucks* when dealing with an HP 360 console or
>with the "hpterm" X terminal emulator.  In both of these cases curses
>outputs incredibly inefficient sequences to make the window area
>become or cease to be inverse video.  (These are "300h" and "hp2622"
>terminfo types.)

   On the 300h and hp2622 terminals (and many other HP terminals), the
   character attributes work differently than on terminals like the
   VT100, which curses deals with much better. Turning on an inverse
   video, for example will turn on the inverse video for any character
   on that line to the right of the character position you are now on,
   until you come to either LF or a inverse video off attribute. On a 
   VT100 turning on the inverse video attribute means all chracters 
   actually written after turning the attribute on will be inverse 
   video, until you turn the attribute off. xhp is a flag to curses
   saying you have HP style attributes. Those incredibly inneficient
   escape sequences are there to guarantee that the terminal will
   behave like a VT100 (which curses knows how to deal with.). What I
   am saying here is that if you want to use attributes and curses on
   HP terminals, you are stuck with this behavior. 

   Sorry the news couldn't be better.


---
Barry J. Roskuski                   Mirror Systems
                                    2067 Massachusetts Ave.
                                    Cambridge, MA 01240
roskuski@mirror.TMC.COM
{mit-eddie, pyramid, harvard!wjh12, xait}!mirror!roskuski