diff --git a/src/vterm/vterm.h b/src/vterm/vterm.h index 929418c63a..0f23bbc0e2 100644 --- a/src/vterm/vterm.h +++ b/src/vterm/vterm.h @@ -219,9 +219,9 @@ typedef enum { typedef struct { const char *str; - size_t len : 30; - bool initial : 1; - bool final : 1; + size_t len; + bool initial; + bool final; } VTermStringFragment; typedef union { @@ -293,15 +293,15 @@ typedef enum { typedef struct { const uint32_t *chars; int width; - unsigned int protected_cell:1; /* DECSCA-protected against DECSEL/DECSED */ - unsigned int dwl:1; /* DECDWL or DECDHL double-width line */ - unsigned int dhl:2; /* DECDHL double-height line (1=top 2=bottom) */ + unsigned int protected_cell; /* DECSCA-protected against DECSEL/DECSED */ + unsigned int dwl; /* DECDWL or DECDHL double-width line */ + unsigned int dhl; /* DECDHL double-height line (1=top 2=bottom) */ } VTermGlyphInfo; typedef struct { - unsigned int doublewidth:1; /* DECDWL or DECDHL line */ - unsigned int doubleheight:2; /* DECDHL line (1=top 2=bottom) */ - unsigned int continuation:1; /* Line is a flow continuation of the previous */ + unsigned int doublewidth; /* DECDWL or DECDHL line */ + unsigned int doubleheight; /* DECDHL line (1=top 2=bottom) */ + unsigned int continuation; /* Line is a flow continuation of the previous */ } VTermLineInfo; /* Copies of VTermState fields that the 'resize' callback might have reason to @@ -499,18 +499,18 @@ void vterm_state_send_selection(VTermState *state, VTermSelectionMask mask, VTer // ------------ typedef struct { - unsigned int bold : 1; - unsigned int underline : 2; - unsigned int italic : 1; - unsigned int blink : 1; - unsigned int reverse : 1; - unsigned int conceal : 1; - unsigned int strike : 1; - unsigned int font : 4; /* 0 to 9 */ - unsigned int dwl : 1; /* On a DECDWL or DECDHL line */ - unsigned int dhl : 2; /* On a DECDHL line (1=top 2=bottom) */ - unsigned int small : 1; - unsigned int baseline : 2; + unsigned int bold; + unsigned int underline; + unsigned int italic; + unsigned int blink; + unsigned int reverse; + unsigned int conceal; + unsigned int strike; + unsigned int font; /* 0 to 9 */ + unsigned int dwl; /* On a DECDWL or DECDHL line */ + unsigned int dhl; /* On a DECDHL line (1=top 2=bottom) */ + unsigned int small; + unsigned int baseline; } VTermScreenCellAttrs; enum { diff --git a/test/unit/vterm_spec.lua b/test/unit/vterm_spec.lua new file mode 100644 index 0000000000..7ede4f71ec --- /dev/null +++ b/test/unit/vterm_spec.lua @@ -0,0 +1,19 @@ +local t = require('test.unit.testutil') +local itp = t.gen_itp(it) + +local vterm = t.cimport('./src/vterm/vterm.h') + +-- local function init() +-- -- if(streq(line, "INIT")) { +-- -- if(!vt) +-- local vt = vterm.vterm_new(25, 80); +-- -- +-- -- vterm_output_set_callback(vt, term_output, NULL); +-- -- } +-- end + +describe('vterm', function() + itp('02parser', function() + print('wat') + end) +end)