[comp.unix.questions] Curses sucks

smartin@iemisi.UUCP (Stephen Martin) (05/06/89)

Has anyone ever come across the following problem.  It seems that calling
getcap() causes the global variables AL, AM, CE, ... that are set by 
setterm() to be overwritten.  We found that the CE (clear to end of line)
sequence was getting screwed up after a number of calls to getcap() to get
the escape sequences for the arrow keys (ku, kd, kl, kr).  If you print
out the address pointed to by CE and the addresses returned by getcap()
after each call, you will find that the getcap() address eventually stomp
that pointed to by CE.  I realize that you can get the termcap information
from tgetstr() and friends but i would like to know why curses reuses the
memory that it depends upon to do it's screen operations.  We tried this
on an Integrated Solutions 4.3 BSD system and a Sun 3.60 running SunOS 4.0
and got the same results.-- 
   ___  ___  ___ ___  _  _ ___
  /__/ /  / /__   /  /\ / /  _   Stephen Martin, Boeing Canada, Toronto.
 /__/ /__/ /__  _/_ /  / /__/             
                                           Nuke the Raisins
UUCP: smartin@iemisi.UUCP
      {uunet|suncan}!jtsv16!marsal1!iemisi!smartin