summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-12-05 18:35:44 +0100
committerBram Moolenaar <Bram@vim.org>2019-12-05 18:35:44 +0100
commitc95e8d649045add4e77b423bc159dc0d845af559 (patch)
treeb682819dd9c0990dfbae7a9d96d3dff4e66acb8d /src
parent309976ec1f033c68480bbc8cc363db5b5ea944f9 (diff)
patch 8.1.2391: cannot build when __QNXNTO__ is definedv8.1.2391
Problem: Cannot build when __QNXNTO__ is defined. (Ian Wayne Larson) Solution: Move the check for "qansi". (Ken Takata, closes #5317)
Diffstat (limited to 'src')
-rw-r--r--src/highlight.c17
-rw-r--r--src/version.c2
2 files changed, 8 insertions, 11 deletions
diff --git a/src/highlight.c b/src/highlight.c
index 3c0eb199ba..da2bdc6511 100644
--- a/src/highlight.c
+++ b/src/highlight.c
@@ -559,10 +559,12 @@ lookup_color(int idx, int foreground, int *boldp)
{
// t_Co is 8: use the 8 colors table
#if defined(__QNXNTO__)
- color = color_numbers_8_qansi[idx];
-#else
- color = color_numbers_8[idx];
+ // On qnx, the 8 & 16 color arrays are the same
+ if (STRNCMP(T_NAME, "qansi", 5) == 0)
+ color = color_numbers_16[idx];
+ else
#endif
+ color = color_numbers_8[idx];
if (foreground)
{
// set/reset bold attribute to get light foreground
@@ -1136,13 +1138,6 @@ do_highlight(
{
int bold = MAYBE;
-#if defined(__QNXNTO__)
- static int *color_numbers_8_qansi = color_numbers_8;
- // On qnx, the 8 & 16 color arrays are the same
- if (STRNCMP(T_NAME, "qansi", 5) == 0)
- color_numbers_8_qansi = color_numbers_16;
-#endif
-
// reduce calls to STRICMP a bit, it can be slow
off = TOUPPER_ASC(*arg);
for (i = (sizeof(color_names) / sizeof(char *)); --i >= 0; )
@@ -3378,7 +3373,7 @@ highlight_changed(void)
* bold-underlined.
*/
attr = 0;
- for ( ; *p && *p != ','; ++p) // parse upto comma
+ for ( ; *p && *p != ','; ++p) // parse up to comma
{
if (VIM_ISWHITE(*p)) // ignore white space
continue;
diff --git a/src/version.c b/src/version.c
index 12aaf57b42..c9d701ba1c 100644
--- a/src/version.c
+++ b/src/version.c
@@ -743,6 +743,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 2391,
+/**/
2390,
/**/
2389,