diff options
author | Felipe Oliveira Carvalho <felipekde@gmail.com> | 2014-03-26 02:51:44 -0300 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2014-03-26 16:28:13 -0300 |
commit | 07dad7acf3d49b3136c5aad2c9fe05abb9aaf032 (patch) | |
tree | 97ab0057d5c3cf17d2a2e90862c22432dd11c674 /src/term.c | |
parent | dbc904956a17e6bec1ddeba9330b639167dbb882 (diff) | |
download | rneovim-07dad7acf3d49b3136c5aad2c9fe05abb9aaf032.tar.gz rneovim-07dad7acf3d49b3136c5aad2c9fe05abb9aaf032.tar.bz2 rneovim-07dad7acf3d49b3136c5aad2c9fe05abb9aaf032.zip |
Use memmove instead of mch_memmove
Diffstat (limited to 'src/term.c')
-rw-r--r-- | src/term.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/term.c b/src/term.c index ff0875e17a..4a5a8afdab 100644 --- a/src/term.c +++ b/src/term.c @@ -23,6 +23,8 @@ */ #define tgetstr tgetstr_defined_wrong +#include <string.h> + #include "vim.h" #include "term.h" #include "buffer.h" @@ -4138,22 +4140,22 @@ int check_termcode(int max_offset, char_u *buf, int bufsize, int *buflen) * Careful: del_typebuf() and ins_typebuf() may have reallocated * typebuf.tb_buf[]! */ - mch_memmove(typebuf.tb_buf + typebuf.tb_off + offset, string, + memmove(typebuf.tb_buf + typebuf.tb_off + offset, string, (size_t)new_slen); } else { if (extra < 0) /* remove matched characters */ - mch_memmove(buf + offset, buf + offset - extra, + memmove(buf + offset, buf + offset - extra, (size_t)(*buflen + offset + extra)); else if (extra > 0) { /* Insert the extra space we need. If there is insufficient * space return -1. */ if (*buflen + extra + new_slen >= bufsize) return -1; - mch_memmove(buf + offset + extra, buf + offset, + memmove(buf + offset + extra, buf + offset, (size_t)(*buflen - offset)); } - mch_memmove(buf + offset, string, (size_t)new_slen); + memmove(buf + offset, string, (size_t)new_slen); *buflen = *buflen + extra + new_slen; } return retval == 0 ? (len + extra + offset) : retval; |