| Commit message (Collapse) | Author | Age |
... | |
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
qsort conforms to C99, so we don't need our own version.
|
|
|
|
|
| |
With this annotation/function attribute, we can inform gcc that these
functions never return null, which can save a lot of redundant null checks.
|
|
|
|
|
|
|
|
|
|
|
| |
The attributes in question are:
- nonnull: specify whether a function argument cannot/may not be null
- returns_nonnull: specify whether a function will not return a null
pointer (example: xmalloc can't return null, so it should be annotated as
such). Only available from gcc 4.9 onwards.
Currently these attributes are only supported by gcc.
|
|
|
|
|
|
|
| |
The attribute was removed in commit c047507 in the clang repository as it
was never properly implemented anyway. This fixes compiling with clang 3.5.
Fixes issue #429
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
The SHELL_* defines are the bitflags that can be passed to `mch_call_shell`.
The enum is defined in 'os/shell.h', where all shell-related functions will
eventually be defined.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Replaced all calls to realloc by xrealloc. All `== NULL` tests can be removed
and the code within `!= NULL` tests can be unwrapped.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I'm debugging OOM behavior using http://www.nongnu.org/failmalloc/ on Linux.
gdb environment:
```
set env LD_PRELOAD=libfailmalloc.so
set env FAILMALLOC_SPACE=0xF00000
```
SEGV was happening like this:
```
Starting program: /home/felipe/code/neovim/build/bin/nvim
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Vim: Error: Out of memory.
Program received signal SIGSEGV, Segmentation fault.
0x00000000004d3719 in getout (exitval=1) at
/home/felipe/code/neovim/src/main.c:836
836 if (*p_viminfo != NUL)
(gdb)
```
After the fix it works as expected:
```
(gdb) set environment LD_PRELOAD=libfailmalloc.so
(gdb) set environment FAILMALLOC_SPACE=0xF00000
(gdb) r
Starting program: /home/felipe/code/neovim/build/bin/nvim
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Vim: Error: Out of memory.
Vim: Finished.
[Inferior 1 (process 21505) exited with code 01]
(gdb)
```
|
| |
|
|
|
|
|
| |
- omit FEAT_NETBEANS_INTG and FEAT_SIGN_ICONS
- omit FEAT_GUI blocks
|
|
|
|
|
| |
This should allow gcc/clang/icc to generate better code and clarifies
function intent.
|
|
|
|
|
| |
Currently enables these for every gnu-like compilers, i.e.: gcc, clang and
icc.
|
| |
|
| |
|
|
|
|
|
|
|
| |
* Add const.
* Fix conditions (move && from end to start of line).
* Use int32_t instead of long.
* Use //-style comments.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This feature was accidentally removed when doing the initial import from vim. It
makes vim use pipes instead of temporary files for filtering buffers through
shell commands.
I found that this was missing when looking for references of
SHELL_READ/SHELL_WRITE outside mch_call_shell`.
When `mch_call_shell` is reimplemented on top of libuv process management
facilities, pipes will always be used for communication with child processes so
it makes sense to enable the feature permanently.
|
|
|
|
|
| |
This enum doesn't need to be public since `event_poll` is only interested in
user input(but other events may be handled by libuv callbacks).
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Uncrustify indent.c
- Fix comments
- Fix whitespace
- Format get_lisp_indent (needs to be refactored completely)
- Fix endline comments
- Change to postincrement
- Fix clint.py errors
- Move static function last
- Fix blank endlines
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The functions `mch_inchar`, `mch_breakcheck`, `mch_char_avail` were
reimplemented on top of libuv. Here's how it works:
- When Neovim needs to wait for characters, it will transfer control to libuv
event loop.
- When the libuv event loop gets user input, it will transfer control back to
Neovim
- Neovim uses the `input_read` function to get the actual data read by libuv.
With this scheme its possible to keep Neovim single-threaded while enjoying the
benefits provided by libuv.
This commit leaves SIGWINCH broken for now
|
| |
|
|
|
|
|
| |
Defining HAVE_AVAIL_MEM doesn't even build. The code tries to call
`mch_avail_mem` which is not defined.
|
|
|
|
|
|
|
|
|
| |
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.
|