Skip to content

Commit

Permalink
patch 8.0.0774: build failure without the multi-byte feature
Browse files Browse the repository at this point in the history
Problem:    Build failure without the multi-byte feature on HPUX.
Solution:   Move #ifdefs. (John Marriott)
  • Loading branch information
brammool committed Jul 25, 2017
1 parent f80451e commit 8f14bb5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/term.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -4307,16 +4307,17 @@ check_termcode(
|| (tp[0] == CSI && len >= 2)) || (tp[0] == CSI && len >= 2))
&& (VIM_ISDIGIT(*argp) || *argp == '>' || *argp == '?')) && (VIM_ISDIGIT(*argp) || *argp == '>' || *argp == '?'))
{ {
int col = 0;
int semicols = 0;
#ifdef FEAT_MBYTE #ifdef FEAT_MBYTE
int col;
int row_char = NUL; int row_char = NUL;
#endif #endif
j = 0;
extra = 0; extra = 0;
for (i = 2 + (tp[0] != CSI); i < len for (i = 2 + (tp[0] != CSI); i < len
&& !(tp[i] >= '{' && tp[i] <= '~') && !(tp[i] >= '{' && tp[i] <= '~')
&& !ASCII_ISALPHA(tp[i]); ++i) && !ASCII_ISALPHA(tp[i]); ++i)
if (tp[i] == ';' && ++j == 1) if (tp[i] == ';' && ++semicols == 1)
{ {
extra = i + 1; extra = i + 1;
#ifdef FEAT_MBYTE #ifdef FEAT_MBYTE
Expand All @@ -4328,17 +4329,15 @@ check_termcode(
LOG_TR("Not enough characters for CRV"); LOG_TR("Not enough characters for CRV");
return -1; return -1;
} }
#ifdef FEAT_MBYTE
if (extra > 0) if (extra > 0)
col = atoi((char *)tp + extra); col = atoi((char *)tp + extra);
else
col = 0;


#ifdef FEAT_MBYTE
/* Eat it when it has 2 arguments and ends in 'R'. Also when /* 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 * u7_status is not "sent", it may be from a previous Vim that
* just exited. But not for <S-F3>, it sends something * just exited. But not for <S-F3>, it sends something
* similar, check for row and column to make sense. */ * 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) if (row_char == '2' && col >= 2)
{ {
Expand Down Expand Up @@ -4401,7 +4400,7 @@ check_termcode(
if (col > 20000) if (col > 20000)
col = 0; 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 /* Only set 'ttymouse' automatically if it was not set
* by the user already. */ * by the user already. */
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -769,6 +769,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 */
/**/
774,
/**/ /**/
773, 773,
/**/ /**/
Expand Down

0 comments on commit 8f14bb5

Please sign in to comment.