aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoroni-link <knil.ino@gmail.com>2014-04-01 13:27:29 +0200
committerThiago de Arruda <tpadilha84@gmail.com>2014-04-02 18:52:16 -0300
commit38ff389496f91d4b00ea822e44999186b0f62f61 (patch)
tree84b01234e33bcd295042750d1ad8bdeeb67a6980
parentec51b04a89f222d0a5504687dbc4d1d070a19398 (diff)
downloadrneovim-38ff389496f91d4b00ea822e44999186b0f62f61.tar.gz
rneovim-38ff389496f91d4b00ea822e44999186b0f62f61.tar.bz2
rneovim-38ff389496f91d4b00ea822e44999186b0f62f61.zip
remove HAVE_STRPBRK
strpbrk is a C99 standard function.
-rw-r--r--config/config.h.in1
-rw-r--r--src/misc2.c19
-rw-r--r--src/proto.h4
-rw-r--r--src/vim.h2
4 files changed, 0 insertions, 26 deletions
diff --git a/config/config.h.in b/config/config.h.in
index 2d6f39bd52..e6c1f4d929 100644
--- a/config/config.h.in
+++ b/config/config.h.in
@@ -65,7 +65,6 @@
#define HAVE_STRNCASECMP 1
// TODO: add proper cmake check
// #define HAVE_STROPTS_H 1
-#define HAVE_STRPBRK 1
#define HAVE_STRTOL 1
#define HAVE_SVR4_PTYS 1
// TODO: add proper cmake check
diff --git a/src/misc2.c b/src/misc2.c
index c4d93ca1f0..cefcc568cc 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -1411,25 +1411,6 @@ char_u *vim_strrchr(char_u *string, int c)
}
/*
- * Vim's version of strpbrk(), in case it's missing.
- * Don't generate a prototype for this, causes problems when it's not used.
- */
-# ifndef HAVE_STRPBRK
-# ifdef vim_strpbrk
-# undef vim_strpbrk
-# endif
-char_u *vim_strpbrk(char_u *s, char_u *charset)
-{
- while (*s) {
- if (vim_strchr(charset, *s) != NULL)
- return s;
- mb_ptr_adv(s);
- }
- return NULL;
-}
-# endif
-
-/*
* Vim has its own isspace() function, because on some machines isspace()
* can't handle characters above 128.
*/
diff --git a/src/proto.h b/src/proto.h
index c0617ac951..8089d3c02b 100644
--- a/src/proto.h
+++ b/src/proto.h
@@ -42,10 +42,6 @@ vim_snprintf(char *, size_t, char *, ...);
int vim_vsnprintf(char *str, size_t str_m, char *fmt, va_list ap, typval_T *tvs);
-#ifndef HAVE_STRPBRK /* not generated automatically from misc2.c */
-char_u *vim_strpbrk(char_u *s, char_u *charset);
-#endif
-
/* Ugly solution for "BalloonEval" not being defined while it's used in some
* .pro files. */
# define BalloonEval int
diff --git a/src/vim.h b/src/vim.h
index b7ccf4289a..f297ac2dde 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -1071,9 +1071,7 @@ typedef enum {
#define STRCAT(d, s) strcat((char *)(d), (char *)(s))
#define STRNCAT(d, s, n) strncat((char *)(d), (char *)(s), (size_t)(n))
-#ifdef HAVE_STRPBRK
# define vim_strpbrk(s, cs) (char_u *)strpbrk((char *)(s), (char *)(cs))
-#endif
#define MSG(s) msg((char_u *)(s))
#define MSG_ATTR(s, attr) msg_attr((char_u *)(s), (attr))