box-drawing: use enum constants in draw_sextant() instead of #define

Both are functionally equivalent here, but the former is also properly
scoped, can be naturally indented and has a less repetitive syntax.
This commit is contained in:
Craig Barnes 2021-01-15 16:07:51 +00:00
parent c0a3f89775
commit dad0549f2e

View file

@ -1765,12 +1765,14 @@ draw_sextant(wchar_t wc, struct buf *buf)
* 4 middle right * 4 middle right
* 5 lower right * 5 lower right
*/ */
#define UPPER_LEFT (1 << 0) enum {
#define MIDDLE_LEFT (1 << 1) UPPER_LEFT = 1 << 0,
#define LOWER_LEFT (1 << 2) MIDDLE_LEFT = 1 << 1,
#define UPPER_RIGHT (1 << 3) LOWER_LEFT = 1 << 2,
#define MIDDLE_RIGHT (1 << 4) UPPER_RIGHT = 1 << 3,
#define LOWER_RIGHT (1 << 5) MIDDLE_RIGHT = 1 << 4,
LOWER_RIGHT = 1 << 5,
};
static const uint8_t matrix[60] = { static const uint8_t matrix[60] = {
/* U+1fb00 - U+1fb0f */ /* U+1fb00 - U+1fb0f */