Improve readability of enum members

The 'left shift from one' notation of power of two integers is more
expressive than the result.

Signed-off-by: Alexander Huemer <alexander.huemer@xx.vu>
Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
master
Alexander Huemer 10 years ago committed by Roberto E. Vargas Caballero
parent e5f6736ee0
commit 83dea7fd7b
  1. 64
      st.c

64
st.c

@ -88,17 +88,17 @@ char *argv0;
enum glyph_attribute { enum glyph_attribute {
ATTR_NULL = 0, ATTR_NULL = 0,
ATTR_BOLD = 1, ATTR_BOLD = 1 << 0,
ATTR_FAINT = 2, ATTR_FAINT = 1 << 1,
ATTR_ITALIC = 4, ATTR_ITALIC = 1 << 2,
ATTR_UNDERLINE = 8, ATTR_UNDERLINE = 1 << 3,
ATTR_BLINK = 16, ATTR_BLINK = 1 << 4,
ATTR_REVERSE = 32, ATTR_REVERSE = 1 << 5,
ATTR_INVISIBLE = 64, ATTR_INVISIBLE = 1 << 6,
ATTR_STRUCK = 128, ATTR_STRUCK = 1 << 7,
ATTR_WRAP = 256, ATTR_WRAP = 1 << 8,
ATTR_WIDE = 512, ATTR_WIDE = 1 << 9,
ATTR_WDUMMY = 1024, ATTR_WDUMMY = 1 << 10,
}; };
enum cursor_movement { enum cursor_movement {
@ -113,27 +113,27 @@ enum cursor_state {
}; };
enum term_mode { enum term_mode {
MODE_WRAP = 1, MODE_WRAP = 1 << 0,
MODE_INSERT = 2, MODE_INSERT = 1 << 1,
MODE_APPKEYPAD = 4, MODE_APPKEYPAD = 1 << 2,
MODE_ALTSCREEN = 8, MODE_ALTSCREEN = 1 << 3,
MODE_CRLF = 16, MODE_CRLF = 1 << 4,
MODE_MOUSEBTN = 32, MODE_MOUSEBTN = 1 << 5,
MODE_MOUSEMOTION = 64, MODE_MOUSEMOTION = 1 << 6,
MODE_REVERSE = 128, MODE_REVERSE = 1 << 7,
MODE_KBDLOCK = 256, MODE_KBDLOCK = 1 << 8,
MODE_HIDE = 512, MODE_HIDE = 1 << 9,
MODE_ECHO = 1024, MODE_ECHO = 1 << 10,
MODE_APPCURSOR = 2048, MODE_APPCURSOR = 1 << 11,
MODE_MOUSESGR = 4096, MODE_MOUSESGR = 1 << 12,
MODE_8BIT = 8192, MODE_8BIT = 1 << 13,
MODE_BLINK = 16384, MODE_BLINK = 1 << 14,
MODE_FBLINK = 32768, MODE_FBLINK = 1 << 15,
MODE_FOCUS = 65536, MODE_FOCUS = 1 << 16,
MODE_MOUSEX10 = 131072, MODE_MOUSEX10 = 1 << 17,
MODE_MOUSEMANY = 262144, MODE_MOUSEMANY = 1 << 18,
MODE_BRCKTPASTE = 524288, MODE_BRCKTPASTE = 1 << 19,
MODE_PRINT = 1048576, MODE_PRINT = 1 << 20,
MODE_MOUSE = MODE_MOUSEBTN|MODE_MOUSEMOTION|MODE_MOUSEX10\ MODE_MOUSE = MODE_MOUSEBTN|MODE_MOUSEMOTION|MODE_MOUSEX10\
|MODE_MOUSEMANY, |MODE_MOUSEMANY,
}; };

Loading…
Cancel
Save