Commit Graph

21306 Commits

Author SHA1 Message Date
John Schmidt
7ec4d478eb Move match_suffix from misc1.c 2014-04-01 08:08:08 -03:00
John Schmidt
35e737e63c Move expand_wildcards{,_eval} from misc1.c 2014-04-01 08:08:07 -03:00
John Schmidt
d31e598895 Move shorten_fname{,1,s} and shorten_filenames from fileio.c 2014-04-01 08:08:07 -03:00
John Schmidt
7464b07c22 Move mch_expandpath from os_unix.c 2014-04-01 08:08:07 -03:00
John Schmidt
7034903591 Move pathcmp from misc2.c 2014-04-01 08:08:07 -03:00
John Schmidt
2a6df95fb5 Move same_directory from misc2.c 2014-04-01 08:08:07 -03:00
John Schmidt
e29e956348 Move after_pathsep from misc2.c 2014-04-01 08:08:07 -03:00
John Schmidt
2cb026c65c Move fix_fname from buffer.c 2014-04-01 08:08:07 -03:00
John Schmidt
7052b85192 Move functions from window.c 2014-04-01 08:08:07 -03:00
John Schmidt
f5082d0a70 Move simplify_filename from tag.c 2014-04-01 08:08:07 -03:00
aph
7fd140b99a enable coveralls support 2014-04-01 08:06:20 -03:00
Julian Orth
55d95c1cd0 remove HAVE_{ISWUPPER,ISWLOWER,TOWUPPER,TOWLOWER} 2014-03-31 21:24:59 -03:00
Julian Orth
079c47ed7b remove HAVE_STDARG_H 2014-03-31 21:24:59 -03:00
Julian Orth
30160c1561 remove HAVE_STDINT 2014-03-31 21:24:59 -03:00
Julian Orth
2bc68462b2 remove HAVE_INTTYPES 2014-03-31 21:24:59 -03:00
Julian Orth
22a1a26cad remove HAVE_MATH_H 2014-03-31 21:24:59 -03:00
oni-link
b1ea283c59 remove HAVE_MEMSET 2014-03-31 21:24:59 -03:00
oni-link
854cde93ed remove HAVE_MEMCMP 2014-03-31 21:24:59 -03:00
Julian Orth
a5cd3693f0 remove HAVE_BCMP 2014-03-31 21:24:59 -03:00
Julian Orth
0bbbc24571 remove HAVE_ERRNO 2014-03-31 21:24:59 -03:00
Julian Orth
60a7ad8a47 remove HAVE_SETJMP_H 2014-03-31 21:24:59 -03:00
oni-link
f9b5ca8b85 Remove feature HAVE_QSORT
qsort conforms to C99, so we don't need our own version.
2014-03-31 21:24:59 -03:00
Nicolas Hillegeer
7b14caf604 alloc: xmalloc and xrealloc can't return null
With this annotation/function attribute, we can inform gcc that these
functions never return null, which can save a lot of redundant null checks.
2014-03-31 18:42:17 -03:00
Nicolas Hillegeer
22e17e25f1 func-attr: add some extra handy function attrs
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.
2014-03-31 18:42:17 -03:00
Nicolas Hillegeer
f5db0d01ba func-attr: clang 3.5 doesn't support alloc_size
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
2014-03-31 18:42:17 -03:00
John Schmidt
5d30654512 Rename ga_init2() to ga_init() 2014-03-31 14:42:11 -03:00
John Schmidt
e02790cad4 Inline ga_init() 2014-03-31 14:42:11 -03:00
Thiago de Arruda
a4c77ab5f0 Fix shell.{c,h} comments to match the style guide 2014-03-31 09:20:24 -03:00
Thiago de Arruda
c7d3e85dc8 Add doxygen comments to the functions in shell.c 2014-03-31 08:34:27 -03:00
Thiago de Arruda
ab61c2caa7 Rewrite show_shell_mess as a ShellOpts flag 2014-03-31 08:07:47 -03:00
Thiago de Arruda
206a38871f Update call_shell signature to use ShellOpts 2014-03-31 08:07:47 -03:00
Thiago de Arruda
0d61b1c470 Refactor SHELL_* defines into enum typedef
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.
2014-03-31 08:07:47 -03:00
Thiago de Arruda
607e1c7ee4 Refactor/cleanup argument parsing functions 2014-03-31 08:07:47 -03:00
Thiago de Arruda
f496d619a9 Extract shell_build_argv from mch_call_shell 2014-03-31 08:07:47 -03:00
Thiago de Arruda
c791922224 Make extra_shell_arg a mch_call_shell parameter 2014-03-31 08:07:46 -03:00
Thiago de Arruda
8a61c27b1e Extract shell_count_argc from mch_call_shell 2014-03-31 08:07:46 -03:00
Thiago de Arruda
2d28251a6e Extract shell_skip_word from mch_call_shell 2014-03-31 08:07:46 -03:00
Thiago de Arruda
1ab6cf47bd Split code for counting and parsing arguments 2014-03-31 08:07:46 -03:00
Thomas Wienecke
54782ecfe0 Add doxygen-style comments to functions from os/fs.c. 2014-03-31 07:36:00 -03:00
Thomas Wienecke
6f681faba7 Add basic Doxyfile. 2014-03-31 07:36:00 -03:00
Felipe Oliveira Carvalho
0e998066b2 xrealloc(): similar to xmalloc()
Replaced all calls to realloc by xrealloc. All `== NULL` tests can be removed
and the code within `!= NULL` tests can be unwrapped.
2014-03-31 07:31:47 -03:00
Felipe Oliveira Carvalho
7bdd1f1898 Document xmalloc() and deprecate lalloc() 2014-03-31 07:31:47 -03:00
Felipe Oliveira Carvalho
5afc1161ca Avoid a seg fault when exiting after OOM error
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)
```
2014-03-31 07:31:47 -03:00
Felipe Oliveira Carvalho
de1575f3ea xmalloc() that succeeds or gracefully aborts 2014-03-31 07:31:47 -03:00
Justin M. Keyes
a87b73ecb2 update readme: "progress" section; formatting 2014-03-31 07:23:34 -03:00
John Szakmeister
0f6323b8e5 Force the cmake target to re-run the CMake configuration.
This makes it more handy when files are added or removed from the source
tree.  A simple `make cmake` will re-configure and pick up the change.
2014-03-31 04:41:26 -04:00
John Szakmeister
cc9fbd9e55 Use the clang 3.4 release tarball instead of apt for clang 3.4.
It appears the llvm.org/apt/ repository isn't always reliable.  So let's
use the release tarball instead.  Also, make using 3.4 conditional, so
we can use the clang 3.3 if things still manage to go awry in the
future.  Note: using 3.3 means that we won't get leak detection.

I left the logic for using llvm.org/apt/, just in case we want try using
it again sometime.
2014-03-30 21:18:29 -04:00
Justin M. Keyes
d9f5cd6290 Re-integrate FEAT_SIGNS code, close #383
- omit FEAT_NETBEANS_INTG and FEAT_SIGN_ICONS
- omit FEAT_GUI blocks
2014-03-29 20:47:39 -03:00
Nicolas Hillegeer
28b3659955 use function attributes on allocation functions
This should allow gcc/clang/icc to generate better code and clarifies
function intent.
2014-03-29 20:10:06 +01:00
Nicolas Hillegeer
d5708b200a add func_attr.h to be able to use func attribs
Currently enables these for every gnu-like compilers, i.e.: gcc, clang and
icc.
2014-03-29 20:09:57 +01:00