On 23-Jul-2017 04:33, Bram Moolenaar wrote:
Patch 8.0.0748
Problem:    When running Vim in a terminal window it does not detect the right
             number of colors available.
Solution:   Detect the version string that libvterm returns.  Pass the number
             of colors in $COLORS.
Files:      src/term.c, src/os_unix.c


After this patch, my build fails on HPUX with this error if FEAT_MBYTE is disabled:
...
    cc -c -I. -Iproto -DHAVE_CONFIG_H     -O2       -o objects/term.o term.c
cc: "term.c", line 4401: error 1588: "col" undefined.
cc: "term.c", line 4401: error 1563: Expression in if must be scalar.
cc: "term.c", line 4417: error 1563: Expression in if must be scalar.
cc: "term.c", line 4423: error 1563: Expression in if must be scalar.
cc: "term.c", line 4432: error 1563: Expression in if must be scalar.
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.

The attached patch tries to fix it. Please check.
Cheers
John

--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.
--- term.c.orig 2017-07-24 05:41:30.944948200 +1000
+++ term.c      2017-07-25 05:41:14.142505600 +1000
@@ -4307,8 +4307,8 @@
                            || (tp[0] == CSI && len >= 2))
                        && (VIM_ISDIGIT(*argp) || *argp == '>' || *argp == '?'))
            {
-#ifdef FEAT_MBYTE
                int col;
+#ifdef FEAT_MBYTE
                int row_char = NUL;
 #endif
                j = 0;
@@ -4328,12 +4328,13 @@
                    LOG_TR("Not enough characters for CRV");
                    return -1;
                }
-#ifdef FEAT_MBYTE
+
                if (extra > 0)
                    col = atoi((char *)tp + extra);
                else
                    col = 0;
 
+#ifdef FEAT_MBYTE
                /* Eat it when it has 2 arguments and ends in 'R'. Also when
                 * u7_status is not "sent", it may be from a previous Vim that
                 * just exited.  But not for <S-F3>, it sends something

Raspunde prin e-mail lui