From 2b3eda694fd3b9623331d764a86c6c8494282005 Mon Sep 17 00:00:00 2001 From: Boris Faure Date: Sat, 19 Sep 2015 16:18:17 +0200 Subject: [PATCH] always support italic --- src/bin/termio.c | 12 ++++-------- src/bin/termpty.h | 10 +++------- src/bin/termptyesc.c | 4 ---- src/bin/termptyops.c | 3 +-- 4 files changed, 8 insertions(+), 21 deletions(-) diff --git a/src/bin/termio.c b/src/bin/termio.c index b416b2d8..6a7a7456 100644 --- a/src/bin/termio.c +++ b/src/bin/termio.c @@ -4712,9 +4712,8 @@ _smart_apply(Evas_Object *obj) tc[x].underline = 0; tc[x].strikethrough = 0; tc[x].bold = 0; -#if defined(SUPPORT_ITALIC) tc[x].italic = 0; -#elif defined(SUPPORT_DBLWIDTH) +#if defined(SUPPORT_DBLWIDTH) tc[x].double_width = 0; #endif } @@ -4733,9 +4732,8 @@ _smart_apply(Evas_Object *obj) tc[x].underline = 0; tc[x].strikethrough = 0; tc[x].bold = 0; -#if defined(SUPPORT_ITALIC) tc[x].italic = 0; -#elif defined(SUPPORT_DBLWIDTH) +#if defined(SUPPORT_DBLWIDTH) tc[x].double_width = 0; #endif tc[x].fg = COL_INVIS; @@ -4770,9 +4768,8 @@ _smart_apply(Evas_Object *obj) tc[x].underline = 0; tc[x].strikethrough = 0; tc[x].bold = 0; -#if defined(SUPPORT_ITALIC) tc[x].italic = 0; -#elif defined(SUPPORT_DBLWIDTH) +#if defined(SUPPORT_DBLWIDTH) tc[x].double_width = cells[x].att.dblwidth; #endif if ((tc[x].double_width) && (tc[x].codepoint == 0) && @@ -4825,9 +4822,8 @@ _smart_apply(Evas_Object *obj) tc[x].underline = cells[x].att.underline; tc[x].strikethrough = cells[x].att.strike; tc[x].bold = cells[x].att.bold; -#if defined(SUPPORT_ITALIC) tc[x].italic = cells[x].att.italic; -#elif defined(SUPPORT_DBLWIDTH) +#if defined(SUPPORT_DBLWIDTH) tc[x].double_width = cells[x].att.dblwidth; #endif tc[x].fg = fg; diff --git a/src/bin/termpty.h b/src/bin/termpty.h index b76d7402..73a0e1db 100644 --- a/src/bin/termpty.h +++ b/src/bin/termpty.h @@ -36,9 +36,6 @@ typedef struct _Termexp Termexp; #define MOUSE_EXT_SGR 2 #define MOUSE_EXT_URXVT 3 -// choose - italic OR double-width support - -//#define SUPPORT_ITALIC 1 #define SUPPORT_DBLWIDTH 1 // Only for testing purpose @@ -53,9 +50,8 @@ struct _Termatt unsigned char fg, bg; unsigned short bold : 1; unsigned short faint : 1; -#if defined(SUPPORT_ITALIC) unsigned short italic : 1; -#elif defined(SUPPORT_DBLWIDTH) +#if defined(SUPPORT_DBLWIDTH) unsigned short dblwidth : 1; #else unsigned short bit_padding_0 : 1; @@ -77,9 +73,9 @@ struct _Termatt unsigned short fraktur : 1; #if defined(SUPPORT_80_132_COLUMNS) unsigned short is_80_132_mode_allowed : 1; - unsigned short bit_padding : 14; + unsigned short bit_padding : 13; #else - unsigned short bit_padding : 15; + unsigned short bit_padding : 14; #endif }; diff --git a/src/bin/termptyesc.c b/src/bin/termptyesc.c index dc64f5d2..5ac55e4d 100644 --- a/src/bin/termptyesc.c +++ b/src/bin/termptyesc.c @@ -449,9 +449,7 @@ _handle_esc_csi_color_set(Termpty *ty, Eina_Unicode **ptr) ty->termstate.att.faint = 1; break; case 3: // italic -#if defined(SUPPORT_ITALIC) ty->termstate.att.italic = 1; -#endif break; case 4: // underline ty->termstate.att.underline = 1; @@ -482,9 +480,7 @@ _handle_esc_csi_color_set(Termpty *ty, Eina_Unicode **ptr) ty->termstate.att.faint = 0; break; case 23: // no italic, not fraktur -#if defined(SUPPORT_ITALIC) ty->termstate.att.italic = 0; -#endif ty->termstate.att.fraktur = 0; break; case 24: // no underline diff --git a/src/bin/termptyops.c b/src/bin/termptyops.c index 0d6d549e..6c41087f 100644 --- a/src/bin/termptyops.c +++ b/src/bin/termptyops.c @@ -325,9 +325,8 @@ termpty_reset_att(Termatt *att) att->bg = COL_DEF; att->bold = 0; att->faint = 0; -#if defined(SUPPORT_ITALIC) att->italic = 0; -#elif defined(SUPPORT_DBLWIDTH) +#if defined(SUPPORT_DBLWIDTH) att->dblwidth = 0; #endif att->underline = 0;