| Commit message (Collapse) | Author | Age |
... | |
|
|
|
|
|
| |
- Move helpers that are specific to API types to api/private/helpers.{c,h}
- Include headers with generated declarations
- Delete unused macros
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
This is required by the msgpack-RPC specification. Also, the
send_call/send_event functions were refactored to accept a variable number of
arguments
|
| |
|
| |
|
|
|
|
| |
Removes the STARTUPTIME define.
|
|
|
|
|
|
| |
Reuse the profiling functions to implement the startuptime functions.
Decreases our dependency on `gettimeofday()` and thus gets us a little bit
closer to a clean port to Windows.
|
|
|
|
|
|
|
|
| |
This uses the provider/scripting infrastructure to reintroduce python support
through the msgpack-rpc API.
A new 'initpython' option was added, and it must be set to a command that will
bootstrap the python provider the first time it's needed.
|
|
|
|
|
|
| |
This uses the provider module infrastructure to implement common code for
vimscript commands/functions that need to communicate with external
interpreters, eg: pydo, rubydo, pyfile, rubyfile, etc.
|
|
|
|
|
| |
It wasn't used anywhere else, our coding guidelines mandate the tightest
scope possible.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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/...
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
| |
C89 did not have round(), vim emulated it with vim_round. But since we're
using C99 this is not a problem anymore.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
This macro is used to append an element to a growable array. It replaces this
common idiom:
ga_grow(&ga, 1);
((item_type *)ga.ga_data)[ga.ga_len] = item;
++ga.ga_len;
|
|
|
|
|
|
|
|
|
|
|
| |
I know it could be 0 sometimes. Running the tests with
`assert(gap->ga_growsize > 0)` in ga_grow() crashes nvim while running the
tests.
- Add a setter for ga_growsize that checks whether the value passed is >=1 (log
in case it's not)
- log when ga_grow() tries to use a ga_growsize that's not >=1
- use GA_EMPTY_INIT_VALUE is many places
|
| |
|
|
|
|
| |
Fix a `return FAIL` that should be `return NULL` in `enc_locale()`
|
| |
|
|
|
|
| |
These features are only used by legacy Mac OS.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- The 'stripdecls.py' script replaces declarations in all headers by includes to
generated headers.
`ag '#\s*if(?!ndef NEOVIM_).*((?!#\s*endif).*\n)*#ifdef INCLUDE_GENERATED'`
was used for this.
- Add and integrate gendeclarations.lua into the build system to generate the
required includes.
- Add -Wno-unused-function
- Made a bunch of old-style definitions ANSI
This adds a requirement: all type and structure definitions must be present
before INCLUDE_GENERATED_DECLARATIONS-protected include.
Warning: mch_expandpath (path.h.generated.h) was moved manually. So far it is
the only exception.
|
|
|
|
| |
Support for message translations using gettext()
|
|
|
|
| |
Support for floating point variables
|
|
|
|
| |
Support for VimScript, :let, :if, etc.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Used Coccinelle to perform the changes
@@
expression E;
@@
<...
(
// E.ga_len == 0 is isomorphic to !E.ga_len
- E.ga_len == 0
+ GA_EMPTY(&E)
|
- E->ga_len == 0
+ GA_EMPTY(E)
)
...>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Used Coccinelle to perform the changes
```diff
@@
expression E;
@@
<...
(
- E.ga_len > 0
+ !GA_EMPTY(&E)
|
- E->ga_len > 0
+ !GA_EMPTY(E)
)
...>
```
`spatch --in-place --sp-file ga_empty.cocci <C_FILE>`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Now that nvim/strings.h is correctly namespaced, an issue
that had been masked until now arises:
When compiling, we get a lot of errors because of everywhere
the functions in nvim/strings.h are used, there's no include
to import them.
But, how could this compile and work previously, then? It
turns out that:
- In every such case, we are also including vim.h, which in
turn includes os_unix_defs.h.
- os_unix_defs.h includes <string.h> and also <strings.h> in
some systems (e.g. OSX).
- Build had been modified previously to (even when importing
system headers), prefer equally-named local ones. That was
in fact done as a previous attempt to solve the same issue
we are trying to solve another way now.
So, we were including our "strings.h" as a side-effect of
including <strings.h> through "vim.h" --> "os_unix_defs.h".
Solution: Correctly include "nvim/strings.h" in every file needing it.
|
|
|
|
| |
Prepend 'nvim/' in all project-local (non-system) includes.
|
|
Move files from src/ to src/nvim/.
- src/nvim/ becomes the new root dir for nvim executable sources.
- src/libnvim/ is planned to become root dir of the neovim library.
|