refactor: remove bitfields

This commit is contained in:
dundargoc 2024-09-11 14:11:49 +02:00
parent a30afeeb85
commit cf49799a57

View File

@ -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 {