aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
* Customize the log file for the check targets based on the input file.John Szakmeister2014-07-17
| | | | | | The idea being that it's better to segregate feedback, just in case someone is working on several translations. Now the check log will appear in `./build/src/nvim/po/check-${LANG}.log`.
* Move po generation from Make to CMake.John Szakmeister2014-07-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #902: localization build: `install`, `uninstall`, `prefixcheck targets. All the language-related bits will now build under CMake. Changes include: * Moving all non-generated sources into the NEOVIM_SOURCES variable to aid in generating the .pot file. * Moving a couple generated sources from NEOVIM_SOURCES and into NEOVIM_GENERATED_SOURCES. * Added NEOVIM_HEADERS to the executable and the library for folks who are using something other than Ninja or makefiles (that way the headers will show up in the IDE files). * Now uses gettext's `--update` switch to update the .po files, rather than doing a fragile `mv` dance that could leave you with a broken working tree if you press CTRL-C at the right time. * Creates `update-po-${LANG}` targets for updating individual languages, just like the original Makefile. * Also adds the `update-po` target for updating all the languages. * Ported the `check-${LANG}` style targets. They're `check-po-${LANG}` under CMake. * Handles all the one-off instances that were in the original Makefile. Fixed up ko.UTF-8.po to include the "Original translation" line like other .po files to make the generation of the "Generate from ..." comments consistent. Updated ko.po with the new text.
* vim: include used definitions in headersNicolas Hillegeer2014-07-16
| | | | | | | | This is not an exhaustive commit, it merely ameliorates the situations a bit. There are quite a few header files that don't include all the types they use in their function/struct/... definitions. This throws of the testing infrastructure (but is not such a problem for the main binary that has the "tumbleweed of includes"-phenomenon).
* memory.h: don't include vim.h in header filesNicolas Hillegeer2014-07-16
| | | | | Also include stdint.h in khash.h. It was transitively included by vim.h via memory.h before. khash.h accidentally relied on that.
* vim: move vim_acl_T to types.hNicolas Hillegeer2014-07-16
| | | | | Also include "types.h" in os_unix.h because it declares functions that return vim_acl_T.
* vim: move disptick_T from vim.h to syntax_defs.hNicolas Hillegeer2014-07-16
| | | | Make vim.h smaller, bit by bit.
* vim: move linenr_T and colnr_T to pos.hNicolas Hillegeer2014-07-16
| | | | Try to cut down vim.h's size. It's keeping us from testing more things.
* vim: move long_u from vim.h to types.hNicolas Hillegeer2014-07-16
| | | | | Seems to make no difference to the main binary, but it helps the tests a bit further along.
* hashtab.h: don't include vim.hNicolas Hillegeer2014-07-16
| | | | | | | Including vim.h in another header filer is asking for trouble. Test code that includes separate header files (e.g.: cimport './src/nvim/buffer.h'), has a really bad time with this. This is just one piece of the puzzle though.
* profiling: move static to function scopeNicolas Hillegeer2014-07-16
| | | | | It wasn't used anywhere else, our coding guidelines mandate the tightest scope possible.
* profiling: implement on top of os_hrtime()Nicolas Hillegeer2014-07-16
| | | | | | | | | | | | | | | | | | | | | | | | | | Should be better than gettimeofday() since libuv uses higher resolution clocks on most UNIX platforms. Libuv also tries to use monotonic clocks, kernel bugs notwithstanding, which is another win over gettimeofday(). Necessary for Windows, which doesn't have gettimeofday(). In vanilla vim, Windows uses QueryPerformanceCounter, which is the correct primitive for this sort of things, but that was removed when slimming up the codebase. Libuv uses QueryPerformanceCounter to implement uv_hrtime() on Windows so the behaviour of vim profiling on Windows should now be the same. The behaviour on Linux should be different (better) though, libuv uses more accurate primitives than gettimeofday(). Other misc. changes: - Added function attributes where relevant (const, pure, ...) - Convert functions to receive scalars: Now that proftime_T is always a (uint64_t) scalar (and not a struct), it's clearer to convert the functions to receive it as such instead of a pointer to a scalar. - Extract profiling funcs to profile.c: make everything clearer and reduces the size of the "catch-all" ex_cmds2.c - Add profile.{c,h} to clint and -Wconv: - Don't use sprintf, use snprintf - Don't use long, use int16_t/int32_t/...
* os: implement os_hrtimeNicolas Hillegeer2014-07-16
| | | | Just an alias to uv_hrtime. Provides a high-resolution timer.
* assert: add STATIC_ASSERT macroNicolas Hillegeer2014-07-16
| | | | | | | | | Can be quite handy, attempt to provide fallbacks for compilers that don't support _Static_assert (which is technically a C11 feature). Suppress warnings as best we can (Clang and GCC warn that we're using a C11 feature while in C99 mode). Needs to be tested for MSVC still.
* Add more commented patch numbers to version.c (3) #940oni-link2014-07-14
| | | | This should help reduce conflicts when merging patches from upstream.
* Create os/os_defs.h for os specific definitionsPavel Platto2014-07-14
|
* tempfile.c: refactor vim_settempdirPavel Platto2014-07-14
| | | | | | | - return result of setting and remove directory if the setting was not successful. - don't do `STRCPY` in case of `vim_FullName` failure because `vim_FullName` already did it.
* tempfile.c: fix style issues and commentsPavel Platto2014-07-14
|
* tempfile.c: enable -WconversionPavel Platto2014-07-14
|
* tempfile.c: add to clint-files and fix warningsPavel Platto2014-07-14
|
* Extract `tempfile` module from fileioPavel Platto2014-07-14
| | | | | | | Though this module is relatively small it has very clear boundaries. The last argument for extracting `tempfile` was the errors which I got when I was writing unittests for it: `cimport './src/nvim/fileio.h'` does not work for some reason.
* Add vim_gettempdir(), remove global vim_tempdirPavel Platto2014-07-14
| | | | | vim_gettempdir() and vim_maketempdir() was extracted from vim_tempname().
* Refactor vim_tempnamePavel Platto2014-07-14
| | | | | | | | | - temp_count is uint32_t now instead of long because it supposed to be at most 999999999 (comment on line 5227) temporary files. The most probably it was a long for compatibility with systems where int is 16-bit. - Use "nvim" as prefix for temp folder name instead of "v" - Remove unused parameter from vim_tempname
* Remove #ifdefs TEMPDIRNAMES and add TEMPDIRNAMES for WindowsPavel Platto2014-07-14
| | | | | | | | Vim does not define TEMPDIRNAMES for all systems, but it is defined for all systems supported by Neovim. Temporary directory names for Windows was obtained from GetTempPath() function documentation at MSDN. Additionally small renamings were performed.
* Remove USE_TMPNAMPavel Platto2014-07-14
| | | | tmpnam() is deprecated.
* Remove HAVE_MKDTEMPPavel Platto2014-07-14
| | | | | For now we provide simple `mkdtemp` for Windows, in the future we will use libuv for that.
* Temporary os_mkdtemp implementation. Use it instead of mkdtemp.Pavel Platto2014-07-14
|
* Use strict function prototypes #945Pavel Platto2014-07-14
| | | | | | | | | | | | | | | | | | | `-Wstrict-prototypes` warn if a function is declared or defined without specifying the argument types. This warning disallow function prototypes with empty parameter list. In C, a function declared with an empty parameter list accepts an arbitrary number of arguments when being called. This is for historic reasons; originally, C functions didn't have prototypes, as C evolved from B, a typeless language. When prototypes were added, the original typeless declarations were left in the language for backwards compatibility. Instead we should provide `void` in argument list to state that function doesn't have arguments. Also this warning disallow declaring type of the parameters after the parentheses because Neovim header generator produce no declarations for old-stlyle prototypes: it expects to find `{` after prototype.
* os_open: add unit testsJustin M. Keyes2014-07-14
|
* os_open: impl mch_open with libuv. ref #133Justin M. Keyes2014-07-14
| | | | | | | | | - use return value instead of open_req.result - libuv uv_fs_open() returns `-errno` instead of always -1 - libuv always sets open_req.result to the return value, _except_ for OOM where it only sets the return value. So always use the return value. - replace calls to mch_open macro. - update call sites expecting -1 error
* os/server: Fix possible port overflowAndré Twupack2014-07-13
| | | | | - add documentation about port being optional - parse port into long and check for valid value
* os/server: Fix TCP connectionAndré Twupack2014-07-13
| | | | | | | - remove unused errno - remove unused port_end - correct calculation of addr_len - use correct string length during IP copy
* os/server: Fix indentationAndré Twupack2014-07-13
|
* move defines from vim.hBrandon Coleman2014-07-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | buffer.h: buflist_getfile() flags buflist_new() flags buf_freeall() flags do_buffer() flags charset.h: chartab[] flags edit.h: in_cinkeys() flags change_indent() flags beginline() flags insertchar() flags nv_mousescroll() flags eval.c AUTOLOAD_CHAR eval.h: enum for vimvars[] ex_cmds.h: do_ecmd read_viminfo flags ex_cmds2.h: check_changed() flags do_source() flags ex_cmds_defs.h: BAD_* flags ex_docmd.h: VALID_PATH VALID_HEAD EXMODE_* do_cmdline() flags added include ex_getln.c *_ESC_CHARS definitions ex_getln.h: history table flags - used by add_to_history() fileio.h: readfile() flags event_T definition getchar.h: ins_typebuf() flags KEYLEN_* globals.h: NO_SCREEN NO_BUFFERS SEA_* defines current_SID flags hlf_T enum HL_FLAGS do_profiling() flags schar_T sattr_T indent.h: set_indent() flags macros.h: BINARY_FILE_IO flags mbyte.h: MB_BYTE2LEN* ENC_* memfile.h: mf_sync() flags misc1.h: open_line() flags message.h: do_dialog() flags vim_dialogyesno() flags DLG_BUTTON_* normal.h: find_ident_under_cursor() flags ops.h: do_put() flags operator ID's option.h: buf_copy_options() flags OPT_* flags os_unix.h: mch_nodetype() flags quickfix.h: skip_vimgrep_pat() flags regexp.h: vim_regcomp() flags values for reg_do_extmatch search.h: do_search() flags search_regcomp() flags findmatchlimit() flags syntax.h: HL_* flags HL_FOLD is used in buffer_defs.h but nvim compiles just fine with the defines in syntax.h tag.h: do_tag() flags find_tags() flags term.h: TBUFSZ flags MOUSE flags ui.h: jump_to_mouse() flags window.h: file_name_in_line() flags win_split() flags MIN_LINES MIN_COLUMNS Remove VimClipboard which should have been removed with PR #921.
* Include stdbool.h in headers which have functions with bool in signaturePavel Platto2014-07-11
| | | | | | | Done by manual inspecting of the output of this script: grep -r -l -w "bool" * | grep 'c$' | sed 's/.c$//' > has_bool grep -r -l -w "stdbool.h" * | grep 'h$' | sed 's/.h$//' > has_include grep -F -x -v -f has_include has_bool
* Remove stdbool.h from files which don't need itPavel Platto2014-07-11
| | | | | | | Done by manual inspection of the output of this script: grep -r -l -w "bool\|true\|false" * | grep 'c$\|h$' > has_bool grep -r -l "stdbool.h" * | grep 'c$\|h$' > has_include grep -F -x -v -f has_bool has_include
* Include stdbool.h in some files which use itPavel Platto2014-07-11
| | | | | | | Done by manual inspection of the output of this script: grep -r -l -w "bool\|true\|false" * | grep 'c$\|h$' > has_bool grep -r -l "stdbool.h" * | grep 'c$\|h$' > has_include grep -F -x -v -f has_include has_bool
* Update Swedish (sv) translation: improve translations.Björn Linse2014-07-11
|
* Update Swedish (sv) translation: Sync to ↵Björn Linse2014-07-11
| | | | 11653ce2d7789ad1ccf31b37c12589cf1cb7787f
* Enable and fix misc2.c -Wconversion warnings #907Shane Iler2014-07-11
|
* vim-patch:7.4.308 #832Will Stamper2014-07-11
| | | | | | | | Problem: When using ":diffsplit" on an empty file the cursor is displayed on the command line. Solution: Limit the value of w_topfill. https://code.google.com/p/vim/source/detail?r=e3d2b8d83bb30c428a051f50791e454fcbc080af
* vim-patch:7.4.306 #842Will Stamper2014-07-11
| | | | | | | | Problem: getchar(0) does not return Esc. Solution: Do not wait for an Esc sequence to be complete. (Yasuhiro Matsumoto) https://code.google.com/p/vim/source/detail?r=05e1d8afcc5e375bf708ccc9810e2fd1a5a8a3cf
* vim-patch:7.4.295 #833Will Stamper2014-07-11
| | | | | | | Problem: Various typos, bad white space and unclear comments. Solution: Fix typos. Improve white space. Update comments. https://code.google.com/p/vim/source/detail?r=662ae48e7e246a63d38c9f3165b15b62252edaee
* vim-patch:7.4.291 #879oni-link2014-07-11
| | | | | | | | Problem: Compiler warning for int to pointer of different size when DEBUG is defined. Solution: use smsg() instead of EMSG3(). https://code.google.com/p/vim/source/detail?r=b5972833add9de714f4651e26fd9ea63ec4a880c
* c99: remove vim_round #909Nicolas Hillegeer2014-07-11
| | | | | C89 did not have round(), vim emulated it with vim_round. But since we're using C99 this is not a problem anymore.
* Default 'encoding'-option from latin to utf-8 #935Fredrik Fornwall2014-07-10
| | | | | | | | | Normally the default encoding does not have much effect, since it's overridden by the environment. But when it's not (test with "LANG= LC_ALL= C_CTYPE= nvim" and perform ":set encoding?"), utf-8 should be the default encoding for a 21st century editor :).
* Avoid linking with libform(w).soFredrik Fornwall2014-07-10
| | | | | | | | | | If libtgent or libcurses is installed, the first one found of them is linked to. But if not, a find_package(Curses REQUIRED) is used and CURSES_LIBRARIES is added to NVIM_LINK_LIBRARIES. This contains libform(w).so on many systems, causing nvim to be linked to and depend on libform(w).so, which may not be installed one some space-constrained systems, unnecessarily.
* Fix two android compile errors in fs.c #924Fredrik Fornwall2014-07-09
| | | | | Replace usage of deprecated S_IEXEC with S_IXUSR. Rename a variable named "errno" to avoid clashing with define.
* move errno.h include out of vim.hBrandon Coleman2014-07-09
|
* move stdarg.h include out of vim.hBrandon Coleman2014-07-09
|
* move assert.h include out of vim.hBrandon Coleman2014-07-09
|