forked from neovim/neovim
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Import vim from changeset v5628:c9cad40b4181
- Cleanup source tree, leaving only files necessary for compilation/testing - Process files through unifdef to remove tons of FEAT_* macros - Process files through uncrustify to normalize source code formatting. - Port the build system to cmake
- Loading branch information
0 parents
commit 72cf89b
Showing
380 changed files
with
501,011 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
build/ | ||
*.rej | ||
*.orig | ||
*.mo | ||
*.swp | ||
*~ | ||
*.pyc | ||
src/po/vim.pot | ||
|
||
src/po/*.ck | ||
src/testdir/mbyte.vim | ||
src/testdir/mzscheme.vim | ||
src/testdir/lua.vim | ||
src/testdir/small.vim | ||
src/testdir/tiny.vim | ||
src/testdir/test*.out | ||
src/testdir/test.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
cmake_minimum_required (VERSION 2.6) | ||
project (NEOVIM) | ||
|
||
set(NEOVIM_VERSION_MAJOR 0) | ||
set(NEOVIM_VERSION_MINOR 0) | ||
set(NEOVIM_VERSION_PATCH 0) | ||
|
||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) | ||
|
||
add_definitions(-DHAVE_CONFIG_H -Wall -std=gnu99) | ||
if(CMAKE_BUILD_TYPE MATCHES Debug) | ||
# cmake automatically appends -g to the compiler flags | ||
set(DEBUG 1) | ||
else() | ||
set(DEBUG 0) | ||
endif() | ||
|
||
# add dependencies to include/lib directories | ||
link_directories ("${PROJECT_SOURCE_DIR}/.deps/usr/lib") | ||
include_directories ("${PROJECT_SOURCE_DIR}/.deps/usr/include") | ||
|
||
include_directories ("${PROJECT_BINARY_DIR}/config") | ||
|
||
add_subdirectory(src) | ||
add_subdirectory(config) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
CMAKE_FLAGS := -DCMAKE_BUILD_TYPE=Debug | ||
|
||
test: build/src/vim | ||
cd src/testdir && make | ||
|
||
build/src/vim: | ||
cd build && make | ||
|
||
cmake: | ||
rm -rf build | ||
mkdir build | ||
cd build && cmake $(CMAKE_FLAGS) ../ | ||
|
||
.PHONY: test cmake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
include(CheckTypeSize) | ||
check_type_size("int" SIZEOF_INT) | ||
check_type_size("long" SIZEOF_LONG) | ||
check_type_size("time_t" SIZEOF_TIME_T) | ||
check_type_size("off_t" SIZEOF_OFF_T) | ||
|
||
# generate configuration header and update include directories | ||
configure_file ( | ||
"${PROJECT_SOURCE_DIR}/config/config.h.in" | ||
"${PROJECT_BINARY_DIR}/config/auto/config.h" | ||
) | ||
# generate pathdef.c | ||
find_program(WHOAMI_PROG whoami) | ||
find_program(HOSTNAME_PROG hostname) | ||
|
||
if (EXISTS ${WHOAMI_PROG}) | ||
execute_process(COMMAND ${WHOAMI_PROG} | ||
OUTPUT_STRIP_TRAILING_WHITESPACE | ||
OUTPUT_VARIABLE USERNAME) | ||
endif() | ||
if (EXISTS ${HOSTNAME_PROG}) | ||
execute_process(COMMAND ${HOSTNAME_PROG} | ||
OUTPUT_STRIP_TRAILING_WHITESPACE | ||
OUTPUT_VARIABLE HOSTNAME) | ||
endif() | ||
|
||
configure_file ( | ||
"${PROJECT_SOURCE_DIR}/config/pathdef.c.in" | ||
"${PROJECT_BINARY_DIR}/config/auto/pathdef.c" | ||
ESCAPE_QUOTES) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,214 @@ | ||
#define NEOVIM_VERSION_MAJOR @NEOVIM_VERSION_MAJOR@ | ||
#define NEOVIM_VERSION_MINOR @NEOVIM_VERSION_MINOR@ | ||
#define NEOVIM_VERSION_PATCH @NEOVIM_VERSION_PATCH@ | ||
|
||
#if @DEBUG@ | ||
#define DEBUG | ||
#endif | ||
|
||
#define SIZEOF_INT @SIZEOF_INT@ | ||
#define SIZEOF_LONG @SIZEOF_LONG@ | ||
#define SIZEOF_TIME_T @SIZEOF_TIME_T@ | ||
#define SIZEOF_OFF_T @SIZEOF_OFF_T@ | ||
|
||
#define _FILE_OFFSET_BITS 64 | ||
#define HAVE_ATTRIBUTE_UNUSED 1 | ||
#define HAVE_BCMP 1 | ||
#define HAVE_BIND_TEXTDOMAIN_CODESET 1 | ||
#define HAVE_DATE_TIME 1 | ||
#define HAVE_DIRENT_H 1 | ||
#define HAVE_DLFCN_H 1 | ||
#define HAVE_DLOPEN 1 | ||
#define HAVE_DLSYM 1 | ||
#define HAVE_ERRNO_H 1 | ||
#define HAVE_FCHDIR 1 | ||
#define HAVE_FCHOWN 1 | ||
#define HAVE_FCNTL_H 1 | ||
#define HAVE_FD_CLOEXEC 1 | ||
#define HAVE_FLOAT_FUNCS 1 | ||
#define HAVE_FSEEKO 1 | ||
#define HAVE_FSYNC 1 | ||
#define HAVE_GETCWD 1 | ||
#define HAVE_GETPWENT 1 | ||
#define HAVE_GETPWNAM 1 | ||
#define HAVE_GETPWUID 1 | ||
#define HAVE_GETRLIMIT 1 | ||
#define HAVE_GETTEXT 1 | ||
#define HAVE_GETTIMEOFDAY 1 | ||
#define HAVE_GETWD 1 | ||
#define HAVE_ICONV 1 | ||
#define HAVE_ICONV_H 1 | ||
#define HAVE_INTTYPES_H 1 | ||
#define HAVE_ISWUPPER 1 | ||
#define HAVE_LANGINFO_H 1 | ||
#define HAVE_LIBGEN_H 1 | ||
#define HAVE_LIBINTL_H 1 | ||
#define HAVE_LOCALE_H 1 | ||
#define HAVE_LSTAT 1 | ||
#define HAVE_MATH_H 1 | ||
#define HAVE_MEMCMP 1 | ||
#define HAVE_MEMSET 1 | ||
#define HAVE_MKDTEMP 1 | ||
#define HAVE_NANOSLEEP 1 | ||
#define HAVE_NL_LANGINFO_CODESET 1 | ||
#define HAVE_NL_MSG_CAT_CNTR 1 | ||
#define HAVE_OPENDIR 1 | ||
#define HAVE_OSPEED 1 | ||
#define HAVE_POLL_H 1 | ||
#define HAVE_PUTENV 1 | ||
#define HAVE_PWD_H 1 | ||
#define HAVE_QSORT 1 | ||
#define HAVE_READLINK 1 | ||
#define HAVE_RENAME 1 | ||
#define HAVE_SELECT 1 | ||
#define HAVE_SELINUX 1 | ||
#define HAVE_SETENV 1 | ||
#define HAVE_SETJMP_H 1 | ||
#define HAVE_SETPGID 1 | ||
#define HAVE_SETSID 1 | ||
#define HAVE_SGTTY_H 1 | ||
#define HAVE_SIGACTION 1 | ||
#define HAVE_SIGALTSTACK 1 | ||
#define HAVE_SIGCONTEXT 1 | ||
#define HAVE_SIGSTACK 1 | ||
#define HAVE_SIGVEC 1 | ||
#define HAVE_ST_BLKSIZE 1 | ||
#define HAVE_STDARG_H 1 | ||
#define HAVE_STDINT_H 1 | ||
#define HAVE_STDLIB_H 1 | ||
#define HAVE_STRCASECMP 1 | ||
#define HAVE_STRERROR 1 | ||
#define HAVE_STRFTIME 1 | ||
#define HAVE_STRING_H 1 | ||
#define HAVE_STRINGS_H 1 | ||
#define HAVE_STRNCASECMP 1 | ||
#define HAVE_STROPTS_H 1 | ||
#define HAVE_STRPBRK 1 | ||
#define HAVE_STRTOL 1 | ||
#define HAVE_SVR4_PTYS 1 | ||
#define HAVE_SYSCONF 1 | ||
#define HAVE_SYSINFO 1 | ||
#define HAVE_SYSINFO_MEM_UNIT 1 | ||
#define HAVE_SYS_IOCTL_H 1 | ||
#define HAVE_SYS_PARAM_H 1 | ||
#define HAVE_SYS_POLL_H 1 | ||
#define HAVE_SYS_RESOURCE_H 1 | ||
#define HAVE_SYS_SELECT_H 1 | ||
#define HAVE_SYS_STATFS_H 1 | ||
#define HAVE_SYS_SYSCTL_H 1 | ||
#define HAVE_SYS_SYSINFO_H 1 | ||
#define HAVE_SYS_TIME_H 1 | ||
#define HAVE_SYS_TYPES_H 1 | ||
#define HAVE_SYS_UTSNAME_H 1 | ||
#define HAVE_SYS_WAIT_H 1 | ||
#define HAVE_TERMCAP_H 1 | ||
#define HAVE_TERMIO_H 1 | ||
#define HAVE_TERMIOS_H 1 | ||
#define HAVE_TGETENT 1 | ||
#define HAVE_TOWLOWER 1 | ||
#define HAVE_TOWUPPER 1 | ||
#define HAVE_UNISTD_H 1 | ||
#define HAVE_UP_BC_PC 1 | ||
#define HAVE_USLEEP 1 | ||
#define HAVE_UTIME 1 | ||
#define HAVE_UTIME_H 1 | ||
#define HAVE_UTIMES 1 | ||
#define HAVE_WCHAR_H 1 | ||
#define HAVE_WCTYPE_H 1 | ||
#define RETSIGTYPE void | ||
#define SIGRETURN return | ||
#define SYS_SELECT_WITH_SYS_TIME 1 | ||
#define TERMINFO 1 | ||
#define TGETENT_ZERO_ERR 0 | ||
#define TIME_WITH_SYS_TIME 1 | ||
#define UNIX 1 | ||
#define USEMAN_S 1 | ||
#define USEMEMMOVE 1 | ||
|
||
#define FEAT_ARABIC | ||
#define FEAT_AUTOCHDIR | ||
#define FEAT_AUTOCMD | ||
#define FEAT_BROWSE | ||
#define FEAT_BROWSE_CMD | ||
#define FEAT_BYTEOFF | ||
#define FEAT_CINDENT | ||
#define FEAT_CMDHIST | ||
#define FEAT_CMDL_COMPL | ||
#define FEAT_CMDL_INFO | ||
#define FEAT_CMDWIN | ||
#define FEAT_COMMENTS | ||
#define FEAT_COMPL_FUNC | ||
#define FEAT_CONCEAL | ||
#define FEAT_CON_DIALOG | ||
#define FEAT_CRYPT | ||
#define FEAT_CSCOPE | ||
#define FEAT_CURSORBIND | ||
#define FEAT_DIFF | ||
#define FEAT_DIGRAPHS | ||
#define FEAT_EVAL | ||
#define FEAT_EX_EXTRA | ||
#define FEAT_FIND_ID | ||
#define FEAT_FKMAP | ||
#define FEAT_FLOAT | ||
#define FEAT_FOLDING | ||
#define FEAT_GETTEXT | ||
#define FEAT_HANGULIN | ||
#define FEAT_INS_EXPAND | ||
#define FEAT_JUMPLIST | ||
#define FEAT_KEYMAP | ||
#define FEAT_LANGMAP | ||
#define FEAT_LINEBREAK | ||
#define FEAT_LISP | ||
#define FEAT_LISTCMDS | ||
#define FEAT_LOCALMAP | ||
#define FEAT_MBYTE | ||
#define FEAT_MENU | ||
#define FEAT_MODIFY_FNAME | ||
#define FEAT_MOUSE | ||
#define FEAT_MOUSE_DEC | ||
#define FEAT_MOUSE_NET | ||
#define FEAT_MOUSE_SGR | ||
#define FEAT_MOUSE_TTY | ||
#define FEAT_MOUSE_URXVT | ||
#define FEAT_MOUSE_XTERM | ||
#define FEAT_MULTI_LANG | ||
#define FEAT_PATH_EXTRA | ||
#define FEAT_PERSISTENT_UNDO | ||
#define FEAT_POSTSCRIPT | ||
#define FEAT_PRINTER | ||
#define FEAT_PROFILE | ||
#define FEAT_QUICKFIX | ||
#define FEAT_RELTIME | ||
#define FEAT_RIGHTLEFT | ||
#define FEAT_SCROLLBIND | ||
#define FEAT_SEARCHPATH | ||
#define FEAT_SEARCH_EXTRA | ||
#define FEAT_SESSION | ||
#define FEAT_SMARTINDENT | ||
#define FEAT_SPELL | ||
#define FEAT_STL_OPT | ||
#define FEAT_SYN_HL | ||
#define FEAT_TAG_BINS | ||
#define FEAT_TAG_OLDSTATIC | ||
#define FEAT_TERMRESPONSE | ||
#define FEAT_TEXTOBJ | ||
#define FEAT_TITLE | ||
#define FEAT_USR_CMDS | ||
#define FEAT_VERTSPLIT | ||
#define FEAT_VIMINFO | ||
#define FEAT_VIRTUALEDIT | ||
#define FEAT_VISUAL | ||
#define FEAT_VISUALEXTRA | ||
#define FEAT_VREPLACE | ||
#define FEAT_WAK | ||
#define FEAT_WILDIGN | ||
#define FEAT_WILDMENU | ||
#define FEAT_WINDOWS | ||
#define FEAT_WRITEBACK | ||
#define FEAT_HUGE | ||
#define FEAT_BIG | ||
#define FEAT_NORMAL | ||
#define FEAT_SMALL | ||
#define FEAT_TINY | ||
#define FEAT_WRITEBACKUP | ||
#define VIM_BACKTICK /* internal backtick expansion */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#include "${PROJECT_SOURCE_DIR}/src/vim.h" | ||
char_u *default_vim_dir = (char_u *)"${CMAKE_INSTALL_PREFIX}/share/vim"; | ||
char_u *default_vimruntime_dir = (char_u *)""; | ||
char_u *all_cflags = (char_u *)"${COMPILER_FLAGS}"; | ||
char_u *all_lflags = (char_u *)"${LINKER_FLAGS}"; | ||
char_u *compiled_user = (char_u *)"${USERNAME}"; | ||
char_u *compiled_sys = (char_u *)"${HOSTNAME}"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
file( GLOB NEOVIM_SOURCES *.c ) | ||
|
||
foreach(sfile ${NEOVIM_SOURCES}) | ||
get_filename_component(f ${sfile} NAME) | ||
if(${f} MATCHES "^(regexp_nfa.c|farsi.c|arabic.c)$") | ||
list(APPEND to_remove ${sfile}) | ||
endif() | ||
endforeach() | ||
|
||
list(REMOVE_ITEM NEOVIM_SOURCES ${to_remove}) | ||
list(APPEND NEOVIM_SOURCES "${PROJECT_BINARY_DIR}/config/auto/pathdef.c") | ||
|
||
file( GLOB IO_SOURCES io/*.c ) | ||
|
||
add_executable (vim ${NEOVIM_SOURCES} ${IO_SOURCES}) | ||
|
||
target_link_libraries (vim m termcap selinux) | ||
include_directories ("${PROJECT_SOURCE_DIR}/src/proto") |
Oops, something went wrong.