aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2014-10-04 19:16:55 +0000
committerJustin M. Keyes <justinkz@gmail.com>2014-10-07 02:45:27 +0000
commitff023a47e33cf2f652a7f0805f677d2afa7580cb (patch)
treebc0ebaee90424c00b51b7431a082ca86d76599b8
parentb80d8039670ff3405a7f5ea9b6b4444f5c337d18 (diff)
downloadrneovim-ff023a47e33cf2f652a7f0805f677d2afa7580cb.tar.gz
rneovim-ff023a47e33cf2f652a7f0805f677d2afa7580cb.tar.bz2
rneovim-ff023a47e33cf2f652a7f0805f677d2afa7580cb.zip
version: remove non-functional Vim version identifiers
-rw-r--r--src/nvim/ex_cmds.c4
-rw-r--r--src/nvim/version_defs.h50
2 files changed, 32 insertions, 22 deletions
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c
index c3408cc4db..78c8b61c37 100644
--- a/src/nvim/ex_cmds.c
+++ b/src/nvim/ex_cmds.c
@@ -1724,8 +1724,8 @@ static void do_viminfo(FILE *fp_in, FILE *fp_out, int flags)
}
if (fp_out != NULL) {
/* Write the info: */
- fprintf(fp_out, _("# This viminfo file was generated by Vim %s.\n"),
- VIM_VERSION_MEDIUM);
+ fprintf(fp_out, _("# This viminfo file was generated by Nvim %s.\n"),
+ NVIM_VERSION_MEDIUM);
fputs(_("# You may edit it if you're careful!\n\n"), fp_out);
fputs(_("# Value of 'encoding' when this file was written\n"), fp_out);
fprintf(fp_out, "*encoding=%s\n\n", p_enc);
diff --git a/src/nvim/version_defs.h b/src/nvim/version_defs.h
index 3a0eba37f6..9257580dac 100644
--- a/src/nvim/version_defs.h
+++ b/src/nvim/version_defs.h
@@ -6,33 +6,43 @@
// Do ":help uganda" in Vim to read copying and usage conditions.
// Do ":help credits" in Vim to see a list of people who contributed.
-// Vim version number, name, etc. Patchlevel is defined in version.c.
+#define STR_(x) #x
+#define STR(x) STR_(x)
+//
+// Nvim version identifiers
+//
+#ifndef NVIM_VERSION_MAJOR
+#define NVIM_VERSION_MAJOR 0
+#endif
+#ifndef NVIM_VERSION_MINOR
+#define NVIM_VERSION_MINOR 0
+#endif
+#ifndef NVIM_VERSION_PATCH
+#define NVIM_VERSION_PATCH 0
+#endif
+#ifndef NVIM_VERSION_PRERELEASE
+#define NVIM_VERSION_PRERELEASE
+#endif
+#ifndef NVIM_VERSION_BUILD
+#define NVIM_VERSION_BUILD
+#endif
+// for the startup-screen
+#define NVIM_VERSION_MEDIUM STR(NVIM_VERSION_MAJOR) "." STR(NVIM_VERSION_MINOR)
+// for the ":version" command and "nvim -h"
+#define NVIM_VERSION_LONG "NVIM " NVIM_VERSION_MEDIUM "." STR(NVIM_VERSION_PATCH) NVIM_VERSION_PRERELEASE NVIM_VERSION_BUILD
+#define NVIM_VERSION_LONG_DATE NVIM_VERSION_LONG " (compiled "
+
+//
+// Vim version number, name, etc. Patchlevel is defined in version.c.
+//
#define VIM_VERSION_MAJOR 7
-#define VIM_VERSION_MAJOR_STR "7"
#define VIM_VERSION_MINOR 4
-#define VIM_VERSION_MINOR_STR "4"
#define VIM_VERSION_100 (VIM_VERSION_MAJOR * 100 + VIM_VERSION_MINOR)
-#define VIM_VERSION_BUILD 280
-#define VIM_VERSION_BUILD_BCD 0x118
-#define VIM_VERSION_BUILD_STR "280"
-#define VIM_VERSION_PATCHLEVEL 0
-#define VIM_VERSION_PATCHLEVEL_STR "0"
-/* Used by MacOS port should be one of: development, alpha, beta, final */
-#define VIM_VERSION_RELEASE development
-
// used for the runtime directory name
#define VIM_VERSION_NODOT "vim74"
-// copied into the swap file (max. length is 6 chars)
+// swap file compatibility (max. length is 6 chars)
#define VIM_VERSION_SHORT "7.4"
-// used for the startup-screen
-#define VIM_VERSION_MEDIUM "7.4"
-// used for the ":version" command and "Vim -h"
-#define NVIM_VERSION_LONG "NVIM 0.0.0 pre-alpha"
-#define NVIM_VERSION_LONG_DATE "NVIM 0.0.0 pre-alpha (compiled "
-
-/* Displayed on splash screen. */
-#define MODIFIED_BY "the Neovim contributors."
#endif // NVIM_VERSION_DEFS_H