Less Optimized Curses

Ken Weaverling weave at brahms.udel.edu
Wed Nov 14 05:42:59 AEST 1990


In article <1990Nov13.090732 at mathcs.emory.edu> km at mathcs.emory.edu (Ken Mandelberg) writes:
>This is an expansion on a problem I posted earlier about curses screen
>update optimization. The issue concerns how clever curses is in updating
>a screen to a new screen whoose contents are vertically displaced one
>line. What I notice is that almost all versions of curses don't notice
>the relationshsip between the screens, and repaint everything. One version
>of curses does notice the relationship, and updates the screen using
>scrolling.
>
I have a SYS V 3.1 box and below is a portion of the man page for curses...
It's warning about being "visually annoying" should be heeded. I used 
idlok() in a program I write and users complained so much that I had to
make a command line option to allow people to choose what method is used.
 

          idlok(win, bf)

If enabled (bf  is  TRUE),  curses  will
consider     using     the      hardware
``insert/delete-line'' feature of termi-
nals so equipped.  If  disabled  (bf  is
FALSE), curses will very seldom use this
feature.      (The      ``insert/delete-
character''    feature     is     always
considered.)   This  option  should   be
enabled only if your  application  needs
``insert/delete-line'', for example, for
a screen  editor.   It  is  disabled  by
default  because  ``insert/delete-line''
tends to be visually annoying when  used
in applications where  it  isn't  really
needed.  If ``insert/delete-line''  can-
not be  used,  curses  will  redraw  the
changed portions of all lines.  Not cal-
ling idlok() saves  approximately  5000
bytes of memory.



-- 

Ken Weaverling (insert any job title here, except for official spokesperson)
Delaware Technical & Community College --- weave at brahms.udel.edu



More information about the Comp.unix.questions mailing list