mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 14:38:32 +00:00
remove HAVE_STRPBRK
strpbrk is a C99 standard function.
This commit is contained in:

committed by
Thiago de Arruda

parent
ec51b04a89
commit
38ff389496
@@ -65,7 +65,6 @@
|
|||||||
#define HAVE_STRNCASECMP 1
|
#define HAVE_STRNCASECMP 1
|
||||||
// TODO: add proper cmake check
|
// TODO: add proper cmake check
|
||||||
// #define HAVE_STROPTS_H 1
|
// #define HAVE_STROPTS_H 1
|
||||||
#define HAVE_STRPBRK 1
|
|
||||||
#define HAVE_STRTOL 1
|
#define HAVE_STRTOL 1
|
||||||
#define HAVE_SVR4_PTYS 1
|
#define HAVE_SVR4_PTYS 1
|
||||||
// TODO: add proper cmake check
|
// TODO: add proper cmake check
|
||||||
|
19
src/misc2.c
19
src/misc2.c
@@ -1410,25 +1410,6 @@ char_u *vim_strrchr(char_u *string, int c)
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* 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()
|
* Vim has its own isspace() function, because on some machines isspace()
|
||||||
* can't handle characters above 128.
|
* can't handle characters above 128.
|
||||||
|
@@ -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);
|
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
|
/* Ugly solution for "BalloonEval" not being defined while it's used in some
|
||||||
* .pro files. */
|
* .pro files. */
|
||||||
# define BalloonEval int
|
# define BalloonEval int
|
||||||
|
@@ -1071,9 +1071,7 @@ typedef enum {
|
|||||||
#define STRCAT(d, s) strcat((char *)(d), (char *)(s))
|
#define STRCAT(d, s) strcat((char *)(d), (char *)(s))
|
||||||
#define STRNCAT(d, s, n) strncat((char *)(d), (char *)(s), (size_t)(n))
|
#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))
|
# define vim_strpbrk(s, cs) (char_u *)strpbrk((char *)(s), (char *)(cs))
|
||||||
#endif
|
|
||||||
|
|
||||||
#define MSG(s) msg((char_u *)(s))
|
#define MSG(s) msg((char_u *)(s))
|
||||||
#define MSG_ATTR(s, attr) msg_attr((char_u *)(s), (attr))
|
#define MSG_ATTR(s, attr) msg_attr((char_u *)(s), (attr))
|
||||||
|
Reference in New Issue
Block a user