*: Use const char * in set_one_cmd_context

Also renames functions added in master and renamed here.
This commit is contained in:
ZyX
2017-03-28 02:17:51 +03:00
parent 114eaa15f0
commit a1d590a08b
7 changed files with 311 additions and 283 deletions

View File

@@ -3636,7 +3636,6 @@ set_cmd_context (
)
{
int old_char = NUL;
char_u *nextcomm;
/*
* Avoid a UMR warning from Purify, only save the character if it has been
@@ -3645,7 +3644,7 @@ set_cmd_context (
if (col < len)
old_char = str[col];
str[col] = NUL;
nextcomm = str;
const char *nextcomm = (const char *)str;
if (use_ccline && ccline.cmdfirstc == '=') {
// pass CMD_SIZE because there is no real command
@@ -3654,9 +3653,11 @@ set_cmd_context (
xp->xp_context = ccline.xp_context;
xp->xp_pattern = ccline.cmdbuff;
xp->xp_arg = ccline.xp_arg;
} else
while (nextcomm != NULL)
} else {
while (nextcomm != NULL) {
nextcomm = set_one_cmd_context(xp, nextcomm);
}
}
/* Store the string here so that call_user_expand_func() can get to them
* easily. */