diff options
author | dundargoc <gocdundar@gmail.com> | 2022-11-26 18:57:46 +0100 |
---|---|---|
committer | dundargoc <gocdundar@gmail.com> | 2022-11-28 14:53:35 +0100 |
commit | 3b96ccf7d35be90e49029dec76344d3d92ad91dc (patch) | |
tree | f4768eb7d7be52402ccd55e3e4e04aecceab3e42 /src/nvim/vim.h | |
parent | b2bb3973d9c7f25acfead2718d74fcf5b1e4551e (diff) | |
download | rneovim-3b96ccf7d35be90e49029dec76344d3d92ad91dc.tar.gz rneovim-3b96ccf7d35be90e49029dec76344d3d92ad91dc.tar.bz2 rneovim-3b96ccf7d35be90e49029dec76344d3d92ad91dc.zip |
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
Diffstat (limited to 'src/nvim/vim.h')
-rw-r--r-- | src/nvim/vim.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/nvim/vim.h b/src/nvim/vim.h index 50b186c750..3a927d6a55 100644 --- a/src/nvim/vim.h +++ b/src/nvim/vim.h @@ -195,13 +195,11 @@ enum { FOLD_TEXT_LEN = 51, }; //!< buffer size for get_foldtext() // defines to avoid typecasts from (char_u *) to (char *) and back // (vim_strchr() is now in strings.c) -#ifdef HAVE_STRNLEN -# define STRNLEN(s, n) strnlen((char *)(s), (size_t)(n)) -#else -# define STRNLEN(s, n) xstrnlen((char *)(s), (size_t)(n)) +#ifndef HAVE_STRNLEN +# define strnlen xstrnlen // Older versions of SunOS may not have strnlen #endif -#define STRCPY(d, s) strcpy((char *)(d), (char *)(s)) -#define STRNCPY(d, s, n) strncpy((char *)(d), (char *)(s), (size_t)(n)) + +#define STRCPY(d, s) strcpy((char *)(d), (char *)(s)) // NOLINT(runtime/printf) #define STRLCPY(d, s, n) xstrlcpy((char *)(d), (char *)(s), (size_t)(n)) #define STRNCMP(d, s, n) strncmp((char *)(d), (char *)(s), (size_t)(n)) #ifdef HAVE_STRCASECMP |