aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_cmds.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/ex_cmds.c')
-rw-r--r--src/nvim/ex_cmds.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c
index 7aab27577a..3be8deead1 100644
--- a/src/nvim/ex_cmds.c
+++ b/src/nvim/ex_cmds.c
@@ -194,7 +194,7 @@ void do_ascii(const exarg_T *const eap)
if (utf_iscomposing(c)) {
IObuff[iobuff_len++] = ' '; // Draw composing char on top of a space.
}
- iobuff_len += utf_char2bytes(c, IObuff + iobuff_len);
+ iobuff_len += utf_char2bytes(c, (char *)IObuff + iobuff_len);
dig = (char *)get_digraph_for_char(c);
if (dig != NULL) {
@@ -339,7 +339,7 @@ static int linelen(int *has_tab)
return 0;
}
// find the first non-blank character
- first = (char *)skipwhite((char_u *)line);
+ first = skipwhite(line);
// find the character after the last non-blank character
for (last = first + STRLEN(first);
@@ -609,9 +609,9 @@ void ex_sort(exarg_T *eap)
&nrs[lnum - eap->line1].st_u.num.value, NULL, 0, false);
}
} else {
- s = (char *)skipwhite((char_u *)p);
+ s = skipwhite(p);
if (*s == '+') {
- s = (char *)skipwhite((char_u *)s + 1);
+ s = skipwhite(s + 1);
}
if (*s == NUL) {
@@ -1215,7 +1215,7 @@ void do_bang(int addr_count, exarg_T *eap, bool forceit, bool do_in, bool do_out
// buffername.
char *cmd = (char *)vim_strsave_escaped((char_u *)prevcmd, (char_u *)"%#");
- AppendToRedobuffLit((char_u *)cmd, -1);
+ AppendToRedobuffLit(cmd, -1);
xfree(cmd);
AppendToRedobuff("\n");
bangredo = false;
@@ -2768,7 +2768,7 @@ int do_ecmd(int fnum, char *ffname, char *sfname, exarg_T *eap, linenr_T newlnum
const char *text = (char *)get_cursor_line_ptr();
if (curwin->w_cursor.lnum != orig_pos.lnum
- || curwin->w_cursor.col != (int)(skipwhite((char_u *)text) - (char_u *)text)) {
+ || curwin->w_cursor.col != (int)(skipwhite(text) - text)) {
newlnum = curwin->w_cursor.lnum;
newcol = curwin->w_cursor.col;
}
@@ -3573,7 +3573,7 @@ static buf_T *do_sub(exarg_T *eap, proftime_T timeout, bool do_buf_event, handle
bool save_do_ask = subflags.do_ask; // remember user specified 'c' flag
// check for a trailing count
- cmd = (char *)skipwhite((char_u *)cmd);
+ cmd = skipwhite(cmd);
if (ascii_isdigit(*cmd)) {
i = getdigits_long((char_u **)&cmd, true, 0);
if (i <= 0 && !eap->skip && subflags.do_error) {
@@ -3590,7 +3590,7 @@ static buf_T *do_sub(exarg_T *eap, proftime_T timeout, bool do_buf_event, handle
/*
* check for trailing command or garbage
*/
- cmd = (char *)skipwhite((char_u *)cmd);
+ cmd = skipwhite(cmd);
if (*cmd && *cmd != '"') { // if not end-of-line or comment
eap->nextcmd = (char *)check_nextcmd((char_u *)cmd);
if (eap->nextcmd == NULL) {
@@ -5819,10 +5819,10 @@ static void do_helptags(char *dirname, bool add_help_tags, bool ignore_writeerr)
FreeWild(filecount, (char_u **)files);
}
-static void helptags_cb(char_u *fname, void *cookie)
+static void helptags_cb(char *fname, void *cookie)
FUNC_ATTR_NONNULL_ALL
{
- do_helptags((char *)fname, *(bool *)cookie, true);
+ do_helptags(fname, *(bool *)cookie, true);
}
/// ":helptags"
@@ -5835,7 +5835,7 @@ void ex_helptags(exarg_T *eap)
// Check for ":helptags ++t {dir}".
if (STRNCMP(eap->arg, "++t", 3) == 0 && ascii_iswhite(eap->arg[3])) {
add_help_tags = true;
- eap->arg = (char *)skipwhite((char_u *)eap->arg + 3);
+ eap->arg = skipwhite(eap->arg + 3);
}
if (STRCMP(eap->arg, "ALL") == 0) {