diff options
Diffstat (limited to 'src/nvim/version.c')
-rw-r--r-- | src/nvim/version.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/src/nvim/version.c b/src/nvim/version.c index 7c197f1b7f..9e2358c9a3 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -6,32 +6,32 @@ /// Nvim was forked from Vim 7.4.160. /// Vim originated from Stevie version 3.6 (Fish disk 217) by GRWalter (Fred). -#include <inttypes.h> #include <assert.h> +#include <inttypes.h> #include <limits.h> #include "nvim/api/private/helpers.h" -#include "nvim/vim.h" #include "nvim/ascii.h" #include "nvim/buffer.h" -#include "nvim/iconv.h" -#include "nvim/version.h" #include "nvim/charset.h" +#include "nvim/iconv.h" +#include "nvim/lua/executor.h" #include "nvim/memline.h" #include "nvim/memory.h" #include "nvim/message.h" #include "nvim/screen.h" #include "nvim/strings.h" -#include "nvim/lua/executor.h" +#include "nvim/version.h" +#include "nvim/vim.h" // version info generated by the build system #include "auto/versiondef.h" // for ":version", ":intro", and "nvim --version" #ifndef NVIM_VERSION_MEDIUM -#define NVIM_VERSION_MEDIUM "v" STR(NVIM_VERSION_MAJOR)\ -"." STR(NVIM_VERSION_MINOR) "." STR(NVIM_VERSION_PATCH)\ -NVIM_VERSION_PRERELEASE +# define NVIM_VERSION_MEDIUM "v" STR(NVIM_VERSION_MAJOR)\ + "." STR(NVIM_VERSION_MINOR) "." STR(NVIM_VERSION_PATCH)\ + NVIM_VERSION_PRERELEASE #endif #define NVIM_VERSION_LONG "NVIM " NVIM_VERSION_MEDIUM @@ -50,23 +50,23 @@ char *version_cflags = "Compilation: " NVIM_VERSION_CFLAGS; static char *features[] = { #ifdef HAVE_ACL -"+acl", + "+acl", #else -"-acl", + "-acl", #endif #if defined(HAVE_ICONV) -"+iconv", + "+iconv", #else -"-iconv", + "-iconv", #endif #ifdef FEAT_TUI -"+tui", + "+tui", #else -"-tui", + "-tui", #endif -NULL + NULL }; // clang-format off @@ -2017,9 +2017,9 @@ void ex_version(exarg_T *eap) /// When "wrap" is TRUE wrap the string in []. /// @param s /// @param wrap -static void version_msg_wrap(char_u *s, int wrap) +static void version_msg_wrap(char *s, int wrap) { - int len = (int)vim_strsize(s) + (wrap ? 2 : 0); + int len = vim_strsize((char_u *)s) + (wrap ? 2 : 0); if (!got_int && (len < Columns) @@ -2032,7 +2032,7 @@ static void version_msg_wrap(char_u *s, int wrap) if (wrap) { msg_puts("["); } - msg_puts((char *)s); + msg_puts(s); if (wrap) { msg_puts("]"); } @@ -2041,7 +2041,7 @@ static void version_msg_wrap(char_u *s, int wrap) static void version_msg(char *s) { - version_msg_wrap((char_u *)s, false); + version_msg_wrap(s, false); } /// List all features. @@ -2070,7 +2070,7 @@ void list_in_columns(char_u **items, int size, int current) // Find the length of the longest item, use that + 1 as the column width. int i; for (i = 0; size < 0 ? items[i] != NULL : i < size; i++) { - int l = (int)vim_strsize(items[i]) + (i == current ? 2 : 0); + int l = vim_strsize(items[i]) + (i == current ? 2 : 0); if (l > width) { width = l; @@ -2082,7 +2082,7 @@ void list_in_columns(char_u **items, int size, int current) if (Columns < width) { // Not enough screen columns - show one per line for (i = 0; i < item_count; i++) { - version_msg_wrap(items[i], i == current); + version_msg_wrap((char *)items[i], i == current); if (msg_col > 0 && i < item_count - 1) { msg_putchar('\n'); } |