Mercurial > vim
comparison src/highlight.c @ 27752:c1d1639b52dd v8.2.4402
patch 8.2.4402: missing parenthesis may cause unexpected problems
Commit: https://github.com/vim/vim/commit/ae6f1d8b14c2f63811ee83ef14e32086fb3e9b83
Author: kylo252 <59826753+kylo252@users.noreply.github.com>
Date: Wed Feb 16 19:24:07 2022 +0000
patch 8.2.4402: missing parenthesis may cause unexpected problems
Problem: Missing parenthesis may cause unexpected problems.
Solution: Add more parenthesis is macros. (closes https://github.com/vim/vim/issues/9788)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 16 Feb 2022 20:30:03 +0100 |
parents | 18cafa092e8d |
children | 62cc3b60493b |
comparison
equal
deleted
inserted
replaced
27751:c9330d10419b | 27752:c1d1639b52dd |
---|---|
27 static char *(hl_name_table[]) = | 27 static char *(hl_name_table[]) = |
28 {"bold", "standout", "underline", "undercurl", | 28 {"bold", "standout", "underline", "undercurl", |
29 "italic", "reverse", "inverse", "nocombine", "strikethrough", "NONE"}; | 29 "italic", "reverse", "inverse", "nocombine", "strikethrough", "NONE"}; |
30 static int hl_attr_table[] = | 30 static int hl_attr_table[] = |
31 {HL_BOLD, HL_STANDOUT, HL_UNDERLINE, HL_UNDERCURL, HL_ITALIC, HL_INVERSE, HL_INVERSE, HL_NOCOMBINE, HL_STRIKETHROUGH, 0}; | 31 {HL_BOLD, HL_STANDOUT, HL_UNDERLINE, HL_UNDERCURL, HL_ITALIC, HL_INVERSE, HL_INVERSE, HL_NOCOMBINE, HL_STRIKETHROUGH, 0}; |
32 #define ATTR_COMBINE(attr_a, attr_b) ((((attr_b) & HL_NOCOMBINE) ? attr_b : (attr_a)) | (attr_b)) | 32 #define ATTR_COMBINE(attr_a, attr_b) ((((attr_b) & HL_NOCOMBINE) ? (attr_b) : (attr_a)) | (attr_b)) |
33 | 33 |
34 /* | 34 /* |
35 * Structure that stores information about a highlight group. | 35 * Structure that stores information about a highlight group. |
36 * The ID of a highlight group is also called group ID. It is the index in | 36 * The ID of a highlight group is also called group ID. It is the index in |
37 * the highlight_ga array PLUS ONE. | 37 * the highlight_ga array PLUS ONE. |
2258 // MS-Windows GDI builds. | 2258 // MS-Windows GDI builds. |
2259 # if defined(RGB) && defined(MSWIN) && !defined(FEAT_GUI) | 2259 # if defined(RGB) && defined(MSWIN) && !defined(FEAT_GUI) |
2260 # undef RGB | 2260 # undef RGB |
2261 # endif | 2261 # endif |
2262 # ifndef RGB | 2262 # ifndef RGB |
2263 # define RGB(r, g, b) ((r<<16) | (g<<8) | (b)) | 2263 # define RGB(r, g, b) (((r)<<16) | ((g)<<8) | (b)) |
2264 # endif | 2264 # endif |
2265 | 2265 |
2266 # ifdef VIMDLL | 2266 # ifdef VIMDLL |
2267 static guicolor_T | 2267 static guicolor_T |
2268 gui_adjust_rgb(guicolor_T c) | 2268 gui_adjust_rgb(guicolor_T c) |