From 0ef90c13b72b74928bfb3c183c7a5bd7240b51ad Mon Sep 17 00:00:00 2001 From: scott-linder Date: Tue, 25 Feb 2014 15:41:16 -0500 Subject: Removes 'proto' dir See #137 for the issue. Every header in the proto directory was: * Given include guards in the form #ifndef NEOVIM_FILENAME_H #define NEOVIM_FILENAME_H ... #endif /* NEOVIM_FILENAM_H */ * Renamed from *.pro -> *.h * Moved from src/proto/ to src/ This would have caused conficts with some existing headers in src/; rather than merge these conflicts now (which is a whole other can of worms involving multiple and conditional inclusion), any header in src/ with a conflicting name was renamed from *.h -> *_defs.h (which may or may not actually describe its purpose, the change is purely a namespacing issue). Once all of these changes were made a script was developed to determine what #includes needed to be added to each source file to describe its dependencies and allow it to compile; because the script is so short and I'll just list it here: #! /bin/bash cd $(dirname $0) # Scrapes `make` output for provided error messages and outputs #includes # needed to resolve them. # $1 : part of the clang error message between filename and identifier list_missing_includes() { for file_missing_pair in $(CC=clang make 2>&1 >/dev/null | sed -n "s/\/\(.*\.[hc]\).*$1.*'\(.*\)'.*/\1:\2/p"); do fields=(${file_missing_pair//:/ }) source_file=${fields[0]} missing_func=${fields[1]} # Try to find the declaration of the missing function. echo $(basename $source_file) \ \#include \"$(grep -r "\b$missing_func __ARGS" | sed -n "s/.*\/\(.*\)\:.*/\1/p")\" # Remove duplicates done | sort | uniq } echo "Finding missing function prototypes..." list_missing_includes "implicit declaration of function" echo "Finding missing identifier declarations..." list_missing_includes "use of undeclared identifier" Each list of required headers was added by hand in the following format: #include "vim.h" #include "*_defs.h" #include "filename.h" /* All other includes in same module here, in alphabetical order. */ /* All includes from other modules (e.g. "os/*.h") here in alphabetical * order. */ --- src/version.h | 53 +++++++++++++---------------------------------------- 1 file changed, 13 insertions(+), 40 deletions(-) (limited to 'src/version.h') diff --git a/src/version.h b/src/version.h index ee49a6d97c..b2828980f3 100644 --- a/src/version.h +++ b/src/version.h @@ -1,40 +1,13 @@ -/* vi:set ts=8 sts=4 sw=4: - * - * VIM - Vi IMproved by Bram Moolenaar - * - * Do ":help uganda" in Vim to read copying and usage conditions. - * Do ":help credits" in Vim to see a list of people who contributed. - */ - -/* - * Define the version number, name, etc. - * The patchlevel is in included_patches[], in version.c. - * - * This doesn't use string concatenation, some compilers don't support it. - */ - -#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 final - -/* - * VIM_VERSION_NODOT is used for the runtime directory name. - * VIM_VERSION_SHORT is copied into the swap file (max. length is 6 chars). - * VIM_VERSION_MEDIUM is used for the startup-screen. - * VIM_VERSION_LONG is used for the ":version" command and "Vim -h". - */ -#define VIM_VERSION_NODOT "vim74" -#define VIM_VERSION_SHORT "7.4" -#define VIM_VERSION_MEDIUM "7.4" -#define VIM_VERSION_LONG "VIM - Vi IMproved 7.4 (2013 Aug 10)" -#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.4 (2013 Aug 10, compiled " +#ifndef NEOVIM_VERSION_H +#define NEOVIM_VERSION_H +/* version.c */ +void make_version __ARGS((void)); +int highest_patch __ARGS((void)); +int has_patch __ARGS((int n)); +void ex_version __ARGS((exarg_T *eap)); +void list_version __ARGS((void)); +void maybe_intro_message __ARGS((void)); +void intro_message __ARGS((int colon)); +void ex_intro __ARGS((exarg_T *eap)); +/* vim: set ft=c : */ +#endif /* NEOVIM_VERSION_H */ -- cgit