]> granicus.if.org Git - vim/commitdiff
patch 8.1.2391: cannot build when __QNXNTO__ is defined v8.1.2391
authorBram Moolenaar <Bram@vim.org>
Thu, 5 Dec 2019 17:35:44 +0000 (18:35 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 5 Dec 2019 17:35:44 +0000 (18:35 +0100)
Problem:    Cannot build when __QNXNTO__ is defined. (Ian Wayne Larson)
Solution:   Move the check for "qansi". (Ken Takata, closes #5317)

src/highlight.c
src/version.c

index 3c0eb199bae0d9c28d08093eba93bf6bf5059ad8..da2bdc6511f6e8bd972936540afec0c332f7ea5e 100644 (file)
@@ -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;
index 12aaf57b42aa507acc252d299e768792e9448684..c9d701ba1c7f12fdf319ba39d717d4d0ea51ad71 100644 (file)
@@ -742,6 +742,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2391,
 /**/
     2390,
 /**/