1
0
forked from aniani/vim

patch 8.1.2391: cannot build when __QNXNTO__ is defined

Problem:    Cannot build when __QNXNTO__ is defined. (Ian Wayne Larson)
Solution:   Move the check for "qansi". (Ken Takata, closes #5317)
This commit is contained in:
Bram Moolenaar
2019-12-05 18:35:44 +01:00
parent 309976ec1f
commit c95e8d6490
2 changed files with 8 additions and 11 deletions

View File

@@ -559,10 +559,12 @@ lookup_color(int idx, int foreground, int *boldp)
{ {
// t_Co is 8: use the 8 colors table // t_Co is 8: use the 8 colors table
#if defined(__QNXNTO__) #if defined(__QNXNTO__)
color = color_numbers_8_qansi[idx]; // On qnx, the 8 & 16 color arrays are the same
#else if (STRNCMP(T_NAME, "qansi", 5) == 0)
color = color_numbers_8[idx]; color = color_numbers_16[idx];
else
#endif #endif
color = color_numbers_8[idx];
if (foreground) if (foreground)
{ {
// set/reset bold attribute to get light foreground // set/reset bold attribute to get light foreground
@@ -1136,13 +1138,6 @@ do_highlight(
{ {
int bold = MAYBE; 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 // reduce calls to STRICMP a bit, it can be slow
off = TOUPPER_ASC(*arg); off = TOUPPER_ASC(*arg);
for (i = (sizeof(color_names) / sizeof(char *)); --i >= 0; ) for (i = (sizeof(color_names) / sizeof(char *)); --i >= 0; )

View File

@@ -742,6 +742,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
2391,
/**/ /**/
2390, 2390,
/**/ /**/