summaryrefslogtreecommitdiff
path: root/src/misc2.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-01-26 21:36:34 +0100
committerBram Moolenaar <Bram@vim.org>2017-01-26 21:36:34 +0100
commit52c0de1de196120976fef82cbbaaeafbedd9c62f (patch)
tree65c1c343ccaa03c1674fde48c9bde5fc069690f1 /src/misc2.c
parent4f7090b93d9b2c2e1724466a2e069e97a5e91808 (diff)
downloadvim-git-52c0de1de196120976fef82cbbaaeafbedd9c62f.tar.gz
patch 8.0.0241: fallback implementation of mch_memmove is unusedv8.0.0241
Problem: Vim defines a mch_memmove() function but it doesn't work, thus is always unused. Solution: Remove the mch_memmove implementation. (suggested by Dominique Pelle)
Diffstat (limited to 'src/misc2.c')
-rw-r--r--src/misc2.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/src/misc2.c b/src/misc2.c
index 26d5970f9..dd0e69464 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -1740,34 +1740,6 @@ vim_memset(void *ptr, int c, size_t size)
}
#endif
-/* skipped when generating prototypes, the prototype is in vim.h */
-#ifdef VIM_MEMMOVE
-/*
- * Version of memmove() that handles overlapping source and destination.
- * For systems that don't have a function that is guaranteed to do that (SYSV).
- */
- void
-mch_memmove(void *src_arg, void *dst_arg, size_t len)
-{
- /*
- * A void doesn't have a size, we use char pointers.
- */
- char *dst = dst_arg, *src = src_arg;
-
- /* overlap, copy backwards */
- if (dst > src && dst < src + len)
- {
- src += len;
- dst += len;
- while (len-- > 0)
- *--dst = *--src;
- }
- else /* copy forwards */
- while (len-- > 0)
- *dst++ = *src++;
-}
-#endif
-
#if (!defined(HAVE_STRCASECMP) && !defined(HAVE_STRICMP)) || defined(PROTO)
/*
* Compare two strings, ignoring case, using current locale.