slang-users mailing list

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

[slang-users] underlined string with blank characters



Hi,

When writing a string using the underline attribute and a background color which is the same as the terminal one, the blank characters of the string are not underlined.
But when it's another background color than the terminal one, then the blank characters are well underlined.

So far, I have found no way to solve this problem i.e. to underline blank chars having the same background color as the terminal.
Any idea on how this can be done (I think it might be somewhere in SLtt_smart_puts) ?

Thanks
Regards

Valere Monseur

---

This is a small test program that shows the problem:

#include <stdio.h>
#include <slang.h>

int main (int argc, char **argv)
{
    SLutf8_enable(1);
    SLtt_get_terminfo();
    SLkp_init();
    SLang_init_tty(-1, 1, 0);
    SLsmg_init_smg();
    SLsmg_cls();

    SLtt_set_color(1, NULL, "lightgray", "black");
    SLtt_add_color_attribute(1, SLTT_ULINE_MASK);

    SLsmg_set_color(1);
    SLsmg_write_string("underlined string 1 ");
    SLsmg_refresh();

    SLtt_set_color(2, NULL, "lightgray", "blue");
    SLtt_add_color_attribute(2, SLTT_ULINE_MASK);

    SLsmg_set_color(2);
    SLsmg_write_string("underlined string 2");
    SLsmg_refresh();

    getchar();

    SLsmg_reset_smg();
    SLang_reset_tty();

    return 0;
}

 		 	   		  
_________________________________________________________________
Hotmail: Free, trusted and rich email service.
https://signup.live.com/signup.aspx?id=60969





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