vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit 8b5df9b8c2df2861a957e4a561f7906f3fef365a parent 8df415ab570f8740b13dbb2cb2c6b134fc0e5b49 Author: Marc André Tanner <mat@brain-dump.org> Date: Fri, 17 Mar 2017 12:22:07 +0100 ui: fix vt100 compilation Diffstat:
| M | ui-terminal-vt100.c | | | 20 | ++++++++++---------- |
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/ui-terminal-vt100.c b/ui-terminal-vt100.c @@ -51,15 +51,15 @@ #define ui_term_backend_new ui_vt100_new #define ui_term_backend_free ui_vt100_free -#define CELL_COLOR_BLACK (CellColor){ .index = 0 } -#define CELL_COLOR_RED (CellColor){ .index = 1 } -#define CELL_COLOR_GREEN (CellColor){ .index = 2 } -#define CELL_COLOR_YELLOW (CellColor){ .index = 3 } -#define CELL_COLOR_BLUE (CellColor){ .index = 4 } -#define CELL_COLOR_MAGENTA (CellColor){ .index = 5 } -#define CELL_COLOR_CYAN (CellColor){ .index = 6 } -#define CELL_COLOR_WHITE (CellColor){ .index = 7 } -#define CELL_COLOR_DEFAULT (CellColor){ .index = 9 } +#define CELL_COLOR_BLACK { .index = 0 } +#define CELL_COLOR_RED { .index = 1 } +#define CELL_COLOR_GREEN { .index = 2 } +#define CELL_COLOR_YELLOW { .index = 3 } +#define CELL_COLOR_BLUE { .index = 4 } +#define CELL_COLOR_MAGENTA { .index = 5 } +#define CELL_COLOR_CYAN { .index = 6 } +#define CELL_COLOR_WHITE { .index = 7 } +#define CELL_COLOR_DEFAULT { .index = 9 } #define CELL_ATTR_NORMAL 0 #define CELL_ATTR_UNDERLINE (1 << 0) @@ -113,7 +113,7 @@ static void ui_vt100_blit(UiTerm *tui) { CellStyle *style = &cell->style; if (style->attr != attr) { - static struct { + static const struct { CellAttr attr; char on[4], off[4]; } cell_attrs[] = {