diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-01-09 15:37:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-09 22:37:34 +0800 |
commit | 50f03773f4b9f4638489ccfd0503dc9e39e5de78 (patch) | |
tree | 2471c7596d233b66cacc36986bea0a31e9ba96ea /src/nvim/ex_docmd.c | |
parent | 9cd7edc6ad884f59b0be9dda3523ff88f4dca705 (diff) | |
download | rneovim-50f03773f4b9f4638489ccfd0503dc9e39e5de78.tar.gz rneovim-50f03773f4b9f4638489ccfd0503dc9e39e5de78.tar.bz2 rneovim-50f03773f4b9f4638489ccfd0503dc9e39e5de78.zip |
refactor: replace char_u with char 18 (#21237)
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
Diffstat (limited to 'src/nvim/ex_docmd.c')
-rw-r--r-- | src/nvim/ex_docmd.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index 7921fe0fc2..e847f74289 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -869,10 +869,10 @@ void handle_did_throw(void) // interrupt message is given elsewhere. switch (current_exception->type) { case ET_USER: - vim_snprintf((char *)IObuff, IOSIZE, + vim_snprintf(IObuff, IOSIZE, _("E605: Exception not caught: %s"), current_exception->value); - p = xstrdup((char *)IObuff); + p = xstrdup(IObuff); break; case ET_ERROR: messages = current_exception->messages; @@ -1445,7 +1445,7 @@ bool parse_cmdline(char *cmdline, exarg_T *eap, CmdParseInfo *cmdinfo, char **er // If the modifier was parsed OK the error must be in the following command char *cmdname = after_modifier ? after_modifier : cmdline; append_command(cmdname); - *errormsg = (char *)IObuff; + *errormsg = IObuff; goto end; } @@ -2038,7 +2038,7 @@ static char *do_one_cmd(char **cmdlinep, int flags, cstack_T *cstack, LineGetter if (!(flags & DOCMD_VERBOSE)) { append_command(cmdname); } - errormsg = (char *)IObuff; + errormsg = IObuff; did_emsg_syntax = true; verify_command(cmdname); } @@ -2307,9 +2307,9 @@ doend: if (errormsg != NULL && *errormsg != NUL && !did_emsg) { if (flags & DOCMD_VERBOSE) { - if (errormsg != (char *)IObuff) { + if (errormsg != IObuff) { STRCPY(IObuff, errormsg); - errormsg = (char *)IObuff; + errormsg = IObuff; } append_command(*ea.cmdlinep); } @@ -2870,8 +2870,8 @@ static void append_command(char *cmd) if (len > IOSIZE - 100) { // Not enough space, truncate and put in "...". - d = (char *)IObuff + IOSIZE - 100; - d -= utf_head_off((char *)IObuff, d); + d = IObuff + IOSIZE - 100; + d -= utf_head_off(IObuff, d); STRCPY(d, "..."); } STRCAT(IObuff, ": "); @@ -3840,7 +3840,7 @@ int expand_filename(exarg_T *eap, char **cmdlinep, char **errormsgp) || vim_strchr(eap->arg, '~') != NULL) { expand_env_esc(eap->arg, NameBuff, MAXPATHL, true, true, NULL); has_wildcards = path_has_wildcard(NameBuff); - p = (char *)NameBuff; + p = NameBuff; } else { p = NULL; } @@ -5089,8 +5089,8 @@ static void ex_tabs(exarg_T *eap) } msg_putchar('\n'); - vim_snprintf((char *)IObuff, IOSIZE, _("Tab page %d"), tabcount++); - msg_outtrans_attr((char *)IObuff, HL_ATTR(HLF_T)); + vim_snprintf(IObuff, IOSIZE, _("Tab page %d"), tabcount++); + msg_outtrans_attr(IObuff, HL_ATTR(HLF_T)); os_breakcheck(); FOR_ALL_WINDOWS_IN_TAB(wp, tp) { @@ -5106,9 +5106,9 @@ static void ex_tabs(exarg_T *eap) if (buf_spname(wp->w_buffer) != NULL) { xstrlcpy(IObuff, buf_spname(wp->w_buffer), IOSIZE); } else { - home_replace(wp->w_buffer, wp->w_buffer->b_fname, (char *)IObuff, IOSIZE, true); + home_replace(wp->w_buffer, wp->w_buffer->b_fname, IObuff, IOSIZE, true); } - msg_outtrans((char *)IObuff); + msg_outtrans(IObuff); os_breakcheck(); } } @@ -5559,7 +5559,7 @@ bool changedir_func(char *new_dir, CdScope scope) #endif // Use NameBuff for home directory name. expand_env("$HOME", NameBuff, MAXPATHL); - new_dir = (char *)NameBuff; + new_dir = NameBuff; } bool dir_differs = pdir == NULL || pathcmp(pdir, new_dir, -1) != 0; @@ -5640,9 +5640,9 @@ static void ex_pwd(exarg_T *eap) } else if (curtab->tp_localdir != NULL) { context = "tabpage"; } - smsg("[%s] %s", context, (char *)NameBuff); + smsg("[%s] %s", context, NameBuff); } else { - msg((char *)NameBuff); + msg(NameBuff); } } else { emsg(_("E187: Unknown")); |