aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Oliveira Carvalho <felipekde@gmail.com>2014-03-26 03:16:09 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2014-03-26 16:28:13 -0300
commitbd78282940b246bad34c629fa81150d4073cc330 (patch)
tree5543be6d10871d07d708a209b19ea7716f5ce701
parent07dad7acf3d49b3136c5aad2c9fe05abb9aaf032 (diff)
downloadrneovim-bd78282940b246bad34c629fa81150d4073cc330.tar.gz
rneovim-bd78282940b246bad34c629fa81150d4073cc330.tar.bz2
rneovim-bd78282940b246bad34c629fa81150d4073cc330.zip
Use memcmp instead of vim_memcmp
-rw-r--r--src/misc2.c22
-rw-r--r--src/search.c2
-rw-r--r--src/tag.c2
-rw-r--r--src/vim.h11
4 files changed, 2 insertions, 35 deletions
diff --git a/src/misc2.c b/src/misc2.c
index f36eeb8741..20e137ba09 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -1408,28 +1408,6 @@ void vim_free(void *x)
}
}
-#ifdef VIM_MEMCMP
-/*
- * Return zero when "b1" and "b2" are the same for "len" bytes.
- * Return non-zero otherwise.
- */
-int vim_memcmp(b1, b2, len)
-void *b1;
-void *b2;
-size_t len;
-{
- char_u *p1 = (char_u *)b1, *p2 = (char_u *)b2;
-
- for (; len > 0; --len) {
- if (*p1 != *p2)
- return 1;
- ++p1;
- ++p2;
- }
- return 0;
-}
-#endif
-
#if (!defined(HAVE_STRCASECMP) && !defined(HAVE_STRICMP)) || defined(PROTO)
/*
* Compare two strings, ignoring case, using current locale.
diff --git a/src/search.c b/src/search.c
index 5f8dd95af8..cd755e049f 100644
--- a/src/search.c
+++ b/src/search.c
@@ -1366,7 +1366,7 @@ int searchc(cmdarg_T *cap, int t_cmd)
if (p[col] == c && stop)
break;
} else {
- if (vim_memcmp(p + col, bytes, bytelen) == 0 && stop)
+ if (memcmp(p + col, bytes, bytelen) == 0 && stop)
break;
}
stop = TRUE;
diff --git a/src/tag.c b/src/tag.c
index 3fa209e4b9..bb772e47f1 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -1927,7 +1927,7 @@ parse_line:
mfp2 = ((struct match_found **)
(ga_match[mtt].ga_data))[i];
if (mfp2->len == mfp->len
- && vim_memcmp(mfp2->match, mfp->match,
+ && memcmp(mfp2->match, mfp->match,
(size_t)mfp->len) == 0)
break;
line_breakcheck();
diff --git a/src/vim.h b/src/vim.h
index 136cb0bde7..7818855da2 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -1154,17 +1154,6 @@ typedef void *vim_acl_T; /* dummy to pass an ACL to a function */
#define fnamencmp(x, y, n) vim_fnamencmp((char_u *)(x), (char_u *)(y), \
(size_t)(n))
-#ifdef HAVE_MEMCMP
-# define vim_memcmp(p1, p2, len) memcmp((p1), (p2), (len))
-#else
-# ifdef HAVE_BCMP
-# define vim_memcmp(p1, p2, len) bcmp((p1), (p2), (len))
-# else
-int vim_memcmp(void *, void *, size_t);
-# define VIM_MEMCMP
-# endif
-#endif
-
#if defined(UNIX) || defined(FEAT_GUI) || defined(OS2) || defined(VMS) \
|| defined(FEAT_CLIENTSERVER)
# define USE_INPUT_BUF