Code around `#ifdef MEM_PROFILE` was used to profile vim's memory
comsumption. It's very likely broken as new code is using malloc() and free()
directly.
In this day and age, valgrind can solve in a much reliable way what
this code was trying to do.
- Change CMakeLists.txt to compile farsi.c normally
- Add const to global variables in farsi.h and define them in farsi.c (no need
to include farsi.h with DO_INIT defined in globals.h)
- Include farsi.h where necessary
- Include all necessary headers in farsi.c
- Move farsi function declarations from main.h to farsi.h
- Move arabic_shape() decl from main.h to arabic.h
- Move arabic_combine() and arabic_maycombine() from mbyte.c to
arabic.c as these functions use the #defines I moved.
- Remove the unnecessary include of arabic.h in globals.h
- Remove include of arabic.c (sic) in main.c (change CMakeLists.txt to compile
arabic.c normally)
Only provide the unittest target if busted was found. And only build
nvim-test if the unittest target exists by excluding nvim-test from all.
Note: this means nvim-test won't be built by default, but it will be
built when you try to run unittests.
Underneath the hood, CMake uses libcurl and libcurl has had a number of
issues regarding progress feedback. In one sample run against Travis
CI, we ended up with nearly 3,000 lines of progress output for a single
download.
Unfortunately, CMake doesn't have the download and extract steps
separate, so we have some extra work that we have to do. Much of the
content was taken from the ExternalProject.cmake and it's template for
generating the content of the download and extract CMake files.
Since libuv.pc is broken at the moment, try to determine libuv's
dependencies ourselves. This ports most of the checks from libuv into
our CMake build, and fixes the build on other unix platforms.
This achieves several goals:
* Less reliance on scripts so we have better portability to Windows
(though we still have a ways to go for proper Windows support).
Luajit, luarocks, moonscript, and busted are all installed via CMake
now.
* Trying to make use of pkg-config to get the correct libraries. The
latest libuv is still broken in this regard, but we'll at least be in
a position to use it.
* Allow the use of Ninja or make. The former runs faster in many
environments, and automatically makes use of parallel builds.
This also allows for system installed dependencies--though not through
the Makefile just yet--and adds support for FreeBSD.
This also make us build libuv and luajit as static libraries only, since
we're only concerned about having static libraries for our bundled
dependencies.
Here's the list of squashed commits (for more info, see PR #378).
- Define guicolor_T as a typedef in syntax.h
- Move a big chunk of code from structs.h to buffer_defs.h
- Move aco_save_T from structs.h to fileio.h
- Move option_table_T from structs.h to hardcopy.h
Aditionally:
- Move the printer_opts global to hardcopy.c
- Delete structs.h. Include buffer_defs.h where structs.h was included
before.
- Add header guards to option_defs.h
- Put mark types and constants in new mark_defs.h
- Move undo structs to undo_defs.h
- Move memfile structs to new memfile_defs.h
- Move expand_T and cmdmod_T to ex_cmds_defs.h
- Move memline_T to memline_defs.h
- Move many defs and types to ex_eval.h
- Move syntax related types to syntax_defs.h
- Move struct memfile to memfile_defs.h
- struct buffblock and struct buffheader moved back to buffer_defs.h
- Move some datatypes to hashtab.h and eval_defs.h
- Move the buffer_defs.h include and TODOs for remaining unrelated types in buffer_defs.h
As described in Google's style guide, the basis for Neovim's
> All of a project's header files should be listed as descendants of the
> project's source directory without use of UNIX directory shortcuts .
> (the current directory) or .. (the parent directory).
Add src as an include directory to facilitate this.
- Valgrind configuration removed
- Fix errors reported by the undefined behavior sanitizer
- Travis will now run two build steps:
- A normal build of a shared library for unit testing(in parallel with gcc)
- A clang build with some sanitizers enabled for integration testing.
After these changes travis will run much faster, while providing valgrind-like
error detection.