mirror of
https://github.com/neovim/neovim.git
synced 2025-10-17 15:21:47 +00:00
*: Make set_vim_var_\* functions have proper argument types
This commit is contained in:
@@ -238,8 +238,8 @@ int main(int argc, char **argv)
|
||||
check_and_set_isatty(¶ms);
|
||||
|
||||
// Get the name with which Nvim was invoked, with and without path.
|
||||
set_vim_var_string(VV_PROGPATH, (char_u *)argv[0], -1);
|
||||
set_vim_var_string(VV_PROGNAME, path_tail((char_u *)argv[0]), -1);
|
||||
set_vim_var_string(VV_PROGPATH, argv[0], -1);
|
||||
set_vim_var_string(VV_PROGNAME, (char *) path_tail((char_u *) argv[0]), -1);
|
||||
|
||||
event_init();
|
||||
/*
|
||||
@@ -1141,10 +1141,11 @@ scripterror:
|
||||
/* If there is a "+123" or "-c" command, set v:swapcommand to the first
|
||||
* one. */
|
||||
if (parmp->n_commands > 0) {
|
||||
p = xmalloc(STRLEN(parmp->commands[0]) + 3);
|
||||
sprintf((char *)p, ":%s\r", parmp->commands[0]);
|
||||
set_vim_var_string(VV_SWAPCOMMAND, p, -1);
|
||||
xfree(p);
|
||||
const size_t swcmd_len = STRLEN(parmp->commands[0]) + 3;
|
||||
char *const swcmd = xmalloc(swcmd_len);
|
||||
snprintf(swcmd, swcmd_len, ":%s\r", parmp->commands[0]);
|
||||
set_vim_var_string(VV_SWAPCOMMAND, swcmd, -1);
|
||||
xfree(swcmd);
|
||||
}
|
||||
TIME_MSG("parsing arguments");
|
||||
}
|
||||
|
Reference in New Issue
Block a user