# HG changeset patch # User Christian Brabandt # Date 1501013704 -7200 # Node ID 80fa4b0eb0b02310696bb1b9149cdcd4e0daaf6a # Parent 3a49849036d59fb6e870cb60fcc869bab8a1bfaf patch 8.0.0774: build failure without the multi-byte feature commit https://github.com/vim/vim/commit/8f14bb58cb7db31797bc1e5ab5c8080dcbb55b98 Author: Bram Moolenaar Date: Tue Jul 25 22:06:43 2017 +0200 patch 8.0.0774: build failure without the multi-byte feature Problem: Build failure without the multi-byte feature on HPUX. Solution: Move #ifdefs. (John Marriott) diff --git a/src/term.c b/src/term.c --- a/src/term.c +++ b/src/term.c @@ -4307,16 +4307,17 @@ check_termcode( || (tp[0] == CSI && len >= 2)) && (VIM_ISDIGIT(*argp) || *argp == '>' || *argp == '?')) { + int col = 0; + int semicols = 0; #ifdef FEAT_MBYTE - int col; int row_char = NUL; #endif - j = 0; + extra = 0; for (i = 2 + (tp[0] != CSI); i < len && !(tp[i] >= '{' && tp[i] <= '~') && !ASCII_ISALPHA(tp[i]); ++i) - if (tp[i] == ';' && ++j == 1) + if (tp[i] == ';' && ++semicols == 1) { extra = i + 1; #ifdef FEAT_MBYTE @@ -4328,17 +4329,15 @@ check_termcode( 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 , it sends something * similar, check for row and column to make sense. */ - if (j == 1 && tp[i] == 'R') + if (semicols == 1 && tp[i] == 'R') { if (row_char == '2' && col >= 2) { @@ -4401,7 +4400,7 @@ check_termcode( if (col > 20000) col = 0; - if (tp[1 + (tp[0] != CSI)] == '>' && j == 2) + if (tp[1 + (tp[0] != CSI)] == '>' && semicols == 2) { /* Only set 'ttymouse' automatically if it was not set * by the user already. */ diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -770,6 +770,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 774, +/**/ 773, /**/ 772,