aboutsummaryrefslogtreecommitdiff
path: root/src/ex_cmds.c
diff options
context:
space:
mode:
authorFelipe Oliveira Carvalho <felipekde@gmail.com>2014-03-26 02:51:44 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2014-03-26 16:28:13 -0300
commit07dad7acf3d49b3136c5aad2c9fe05abb9aaf032 (patch)
tree97ab0057d5c3cf17d2a2e90862c22432dd11c674 /src/ex_cmds.c
parentdbc904956a17e6bec1ddeba9330b639167dbb882 (diff)
downloadrneovim-07dad7acf3d49b3136c5aad2c9fe05abb9aaf032.tar.gz
rneovim-07dad7acf3d49b3136c5aad2c9fe05abb9aaf032.tar.bz2
rneovim-07dad7acf3d49b3136c5aad2c9fe05abb9aaf032.zip
Use memmove instead of mch_memmove
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r--src/ex_cmds.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 51e55b1300..b0919f3b30 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -11,6 +11,8 @@
* ex_cmds.c: some functions for command line commands
*/
+#include <string.h>
+
#include "vim.h"
#include "version_defs.h"
#include "ex_cmds.h"
@@ -625,8 +627,8 @@ void ex_retab(exarg_T *eap)
if (new_line == NULL)
break;
if (start_col > 0)
- mch_memmove(new_line, ptr, (size_t)start_col);
- mch_memmove(new_line + start_col + len,
+ memmove(new_line, ptr, (size_t)start_col);
+ memmove(new_line + start_col + len,
ptr + col, (size_t)(old_len - col + 1));
ptr = new_line + start_col;
for (col = 0; col < len; col++)
@@ -4150,7 +4152,7 @@ void do_sub(exarg_T *eap)
vim_free(new_start);
goto outofmem;
}
- mch_memmove(p1, new_start, (size_t)(len + 1));
+ memmove(p1, new_start, (size_t)(len + 1));
vim_free(new_start);
new_start = p1;
}
@@ -4160,7 +4162,7 @@ void do_sub(exarg_T *eap)
/*
* copy the text up to the part that matched
*/
- mch_memmove(new_end, sub_firstline + copycol, (size_t)copy_len);
+ memmove(new_end, sub_firstline + copycol, (size_t)copy_len);
new_end += copy_len;
(void)vim_regsub_multi(&regmatch,
@@ -5088,16 +5090,16 @@ int find_help_tags(char_u *arg, int *num_matches, char_u ***matches, int keep_la
if (*IObuff == '`') {
if (d > IObuff + 2 && d[-1] == '`') {
/* remove the backticks from `command` */
- mch_memmove(IObuff, IObuff + 1, STRLEN(IObuff));
+ memmove(IObuff, IObuff + 1, STRLEN(IObuff));
d[-2] = NUL;
} else if (d > IObuff + 3 && d[-2] == '`' && d[-1] == ',') {
/* remove the backticks and comma from `command`, */
- mch_memmove(IObuff, IObuff + 1, STRLEN(IObuff));
+ memmove(IObuff, IObuff + 1, STRLEN(IObuff));
d[-3] = NUL;
} else if (d > IObuff + 4 && d[-3] == '`'
&& d[-2] == '\\' && d[-1] == '.') {
/* remove the backticks and dot from `command`\. */
- mch_memmove(IObuff, IObuff + 1, STRLEN(IObuff));
+ memmove(IObuff, IObuff + 1, STRLEN(IObuff));
d[-4] = NUL;
}
}