mirror of
https://github.com/neovim/neovim.git
synced 2025-09-15 15:58:17 +00:00
refactor: replace char_u #18429
Work on https://github.com/neovim/neovim/issues/459
This commit is contained in:
@@ -1357,9 +1357,8 @@ scripterror:
|
||||
char_u *p = vim_strsave((char_u *)argv[0]);
|
||||
|
||||
if (parmp->diff_mode && os_isdir(p) && GARGCOUNT > 0
|
||||
&& !os_isdir(alist_name(&GARGLIST[0]))) {
|
||||
char_u *r = (char_u *)concat_fnames((char *)p,
|
||||
path_tail((char *)alist_name(&GARGLIST[0])), true);
|
||||
&& !os_isdir((char_u *)alist_name(&GARGLIST[0]))) {
|
||||
char_u *r = (char_u *)concat_fnames((char *)p, path_tail(alist_name(&GARGLIST[0])), true);
|
||||
xfree(p);
|
||||
p = r;
|
||||
}
|
||||
@@ -1477,7 +1476,7 @@ static void init_path(const char *exename)
|
||||
/// Get filename from command line, if any.
|
||||
static char_u *get_fname(mparm_T *parmp, char_u *cwd)
|
||||
{
|
||||
return alist_name(&GARGLIST[0]);
|
||||
return (char_u *)alist_name(&GARGLIST[0]);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1502,7 +1501,7 @@ static void handle_quickfix(mparm_T *paramp)
|
||||
{
|
||||
if (paramp->edit_type == EDIT_QF) {
|
||||
if (paramp->use_ef != NULL) {
|
||||
set_string_option_direct("ef", -1, (char_u *)paramp->use_ef, OPT_FREE, SID_CARG);
|
||||
set_string_option_direct("ef", -1, paramp->use_ef, OPT_FREE, SID_CARG);
|
||||
}
|
||||
vim_snprintf((char *)IObuff, IOSIZE, "cfile %s", p_ef);
|
||||
if (qf_init(NULL, (char *)p_ef, p_efm, true, (char *)IObuff, (char *)p_menc) < 0) {
|
||||
@@ -1743,7 +1742,7 @@ static void edit_buffers(mparm_T *parmp, char_u *cwd)
|
||||
// at the ATTENTION prompt close the window.
|
||||
swap_exists_did_quit = false;
|
||||
(void)do_ecmd(0, arg_idx < GARGCOUNT
|
||||
? (char *)alist_name(&GARGLIST[arg_idx])
|
||||
? alist_name(&GARGLIST[arg_idx])
|
||||
: NULL, NULL, NULL, ECMD_LASTL, ECMD_HIDE, curwin);
|
||||
if (swap_exists_did_quit) {
|
||||
// abort or quit selected
|
||||
@@ -1946,9 +1945,7 @@ static bool do_user_initialization(void)
|
||||
if (do_source((char *)user_vimrc, true, DOSO_VIMRC) != FAIL) {
|
||||
do_exrc = p_exrc;
|
||||
if (do_exrc) {
|
||||
do_exrc = (path_full_compare((char_u *)VIMRC_FILE, user_vimrc,
|
||||
false, true)
|
||||
!= kEqualFiles);
|
||||
do_exrc = (path_full_compare(VIMRC_FILE, (char *)user_vimrc, false, true) != kEqualFiles);
|
||||
}
|
||||
xfree(user_vimrc);
|
||||
return do_exrc;
|
||||
@@ -1974,8 +1971,7 @@ static bool do_user_initialization(void)
|
||||
if (do_source(vimrc, true, DOSO_VIMRC) != FAIL) {
|
||||
do_exrc = p_exrc;
|
||||
if (do_exrc) {
|
||||
do_exrc = (path_full_compare((char_u *)VIMRC_FILE, (char_u *)vimrc,
|
||||
false, true) != kEqualFiles);
|
||||
do_exrc = (path_full_compare(VIMRC_FILE, vimrc, false, true) != kEqualFiles);
|
||||
}
|
||||
xfree(vimrc);
|
||||
xfree(config_dirs);
|
||||
|
Reference in New Issue
Block a user