diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2023-11-29 22:40:31 +0000 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2023-11-29 22:40:31 +0000 |
commit | 339e2d15cc26fe86988ea06468d912a46c8d6f29 (patch) | |
tree | a6167fc8fcfc6ae2dc102f57b2473858eac34063 /src/nvim/strings.h | |
parent | 067dc73729267c0262438a6fdd66e586f8496946 (diff) | |
parent | 4a8bf24ac690004aedf5540fa440e788459e5e34 (diff) | |
download | rneovim-339e2d15cc26fe86988ea06468d912a46c8d6f29.tar.gz rneovim-339e2d15cc26fe86988ea06468d912a46c8d6f29.tar.bz2 rneovim-339e2d15cc26fe86988ea06468d912a46c8d6f29.zip |
Merge remote-tracking branch 'upstream/master' into fix_repeatcmdline
Diffstat (limited to 'src/nvim/strings.h')
-rw-r--r-- | src/nvim/strings.h | 34 |
1 files changed, 27 insertions, 7 deletions
diff --git a/src/nvim/strings.h b/src/nvim/strings.h index 6ad9daf5bf..d717362f87 100644 --- a/src/nvim/strings.h +++ b/src/nvim/strings.h @@ -1,13 +1,14 @@ -#ifndef NVIM_STRINGS_H -#define NVIM_STRINGS_H +#pragma once -#include <stdarg.h> -#include <stdbool.h> +#include <stdarg.h> // IWYU pragma: keep #include <string.h> +#include "auto/config.h" #include "klib/kvec.h" -#include "nvim/eval/typval.h" -#include "nvim/types.h" +#include "nvim/eval/typval_defs.h" // IWYU pragma: keep +#include "nvim/func_attr.h" +#include "nvim/os/os_defs.h" +#include "nvim/types_defs.h" // IWYU pragma: keep /// Append string to string and return pointer to the next byte /// @@ -31,4 +32,23 @@ typedef kvec_t(char) StringBuilder; #ifdef INCLUDE_GENERATED_DECLARATIONS # include "strings.h.generated.h" #endif -#endif // NVIM_STRINGS_H + +#ifdef HAVE_STRCASECMP +# define STRICMP(d, s) strcasecmp((char *)(d), (char *)(s)) +#else +# ifdef HAVE_STRICMP +# define STRICMP(d, s) stricmp((char *)(d), (char *)(s)) +# else +# define STRICMP(d, s) vim_stricmp((char *)(d), (char *)(s)) +# endif +#endif + +#ifdef HAVE_STRNCASECMP +# define STRNICMP(d, s, n) strncasecmp((char *)(d), (char *)(s), (size_t)(n)) +#else +# ifdef HAVE_STRNICMP +# define STRNICMP(d, s, n) strnicmp((char *)(d), (char *)(s), (size_t)(n)) +# else +# define STRNICMP(d, s, n) vim_strnicmp((char *)(d), (char *)(s), (size_t)(n)) +# endif +#endif |