slang-users mailing list

[2003 Date Index] [2003 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: [slang-users] Strange COLORFGBG feature


Nicolas Schodet <schodet+slang@xxxxxxxx> wrote:
>Why do get_default_colors return -1 if it do not find COLORFGBG or
>DEFAULT_COLOR ? Why not return 0 and fill fg_buf and bg_buf with a
>"default" default value ?

As far as I know, not all color terminals support the default color
escape sequence (ESC[39m), and there is no guarantee that sending a
terminal an escape sequence that it does not support will not have
an undesirable side effect.

Unfortunately, the terminfo database does not specify an escape
sequence to set _just_ the background to its default color.  Instead,
the terminfo database specifies the "op" string which sets both the
foreground and background color to the default:

     Some terminals (for example, most color  terminal  emulators
     for  PCs)  erase areas of the screen with current background
     color.  In such cases, bce (background color  erase)  should
     be  defined.   The  variable  op  (original pair) contains a
     sequence for  setting  the  foreground  and  the  background
     colors  to  what  they  were  at the terminal start-up time.
     Similarly, oc (original colors) contains a control  sequence
     for  setting all colors (for the Tektronix method) or color-
     pairs (for the HP method) to the values they had at the ter-
     minal start-up time.

--John

_______________________________________________
To unsubscribe, visit http://jedsoft.org/slang/mailinglists.html


[2003 date index] [2003 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]