Add preliminary blink stubs. Real implementation is still missing.

This commit is contained in:
Christoph Lohmann 2012-09-12 13:08:26 +02:00
parent c092bce366
commit 121d9109e8

9
st.c
View file

@ -77,6 +77,7 @@ enum glyph_attribute {
ATTR_BOLD = 4, ATTR_BOLD = 4,
ATTR_GFX = 8, ATTR_GFX = 8,
ATTR_ITALIC = 16, ATTR_ITALIC = 16,
ATTR_BLINK = 32,
}; };
enum cursor_movement { enum cursor_movement {
@ -1133,7 +1134,7 @@ tsetattr(int *attr, int l) {
switch(attr[i]) { switch(attr[i]) {
case 0: case 0:
term.c.attr.mode &= ~(ATTR_REVERSE | ATTR_UNDERLINE | ATTR_BOLD \ term.c.attr.mode &= ~(ATTR_REVERSE | ATTR_UNDERLINE | ATTR_BOLD \
| ATTR_ITALIC); | ATTR_ITALIC | ATTR_BLINK);
term.c.attr.fg = DefaultFG; term.c.attr.fg = DefaultFG;
term.c.attr.bg = DefaultBG; term.c.attr.bg = DefaultBG;
break; break;
@ -1146,6 +1147,9 @@ tsetattr(int *attr, int l) {
case 4: case 4:
term.c.attr.mode |= ATTR_UNDERLINE; term.c.attr.mode |= ATTR_UNDERLINE;
break; break;
case 5:
term.c.attr.mode |= ATTR_BLINK;
break;
case 7: case 7:
term.c.attr.mode |= ATTR_REVERSE; term.c.attr.mode |= ATTR_REVERSE;
break; break;
@ -1158,6 +1162,9 @@ tsetattr(int *attr, int l) {
case 24: case 24:
term.c.attr.mode &= ~ATTR_UNDERLINE; term.c.attr.mode &= ~ATTR_UNDERLINE;
break; break;
case 25:
term.c.attr.mode &= ~ATTR_BLINK;
break;
case 27: case 27:
term.c.attr.mode &= ~ATTR_REVERSE; term.c.attr.mode &= ~ATTR_REVERSE;
break; break;