Commit Graph

3303 Commits

Author SHA1 Message Date
Felipe Oliveira Carvalho
2ca8afc74e Replace vim_isxdigit() with to ascii_isxdigit() defined in ascii.h 2015-04-24 20:37:13 -03:00
Felipe Oliveira Carvalho
caabcae0b7 Replace VIM_ISDIGIT() and vim_isdigit() with ascii_isdigit() defined in ascii.h 2015-04-24 20:37:13 -03:00
Felipe Oliveira Carvalho
93bf201119 Replace vim_iswhite with ascii_iswhite() defined in ascii.h 2015-04-24 20:37:13 -03:00
Scott Prager
d350d12a00 rpcstart: check argvars, /then/ alloc argv #2462
fixes #2458
2015-04-23 18:27:32 -04:00
Eliseo Martínez
920381c01b Merge #2491: Fix xfree of static value from vim_getenv() refactor.
Reviewed-by: Eliseo Martínez <eliseomarmol@gmail.com>
2015-04-23 22:00:00 +02:00
Rui Abreu Ferreira
1383c5f6cb TAB0 might not be defined in termios.h #2483
- OpenBSD termios.h does not have TAB0, skip
  its use if it is not defined
2015-04-23 15:43:45 -04:00
Florian Walch
f26e35279d Merge pull request #2447 from equalsraf/tb-luarocks-refactor
Refactor luarocks third-party recipe
2015-04-23 21:25:03 +03:00
Mark Bainter
b68ce1460d Fix xfree of static value in expand_shellcmd()
The refactoring of vim_getenv() to remove the mustfree arg
included reworking calling functions.  expand_shellcmd was
also using that to track its usage of the variable within
the function, resulting in #2487. This change addresses
that scenario and cleans up some of the function for style.
2015-04-23 16:12:14 +00:00
Eliseo Martínez
5f34f1b80f Merge #2473: Fix clang analysis warnings. (10)
Reviewed-by: oni-link <knil.ino@gmail.com>
Reviewed-by: Scott Prager <splinterofchaos@gmail.com>
2015-04-23 17:54:00 +02:00
Eliseo Martínez
c22b6124e2 Fix warnings: ex_getln.c: init_history(): NP dereference: FP.
Problem    : Dereference of null pointer @ 4199.
Diagnostic : False positive.
Rationale  : Suggested error path implies that newlen == 0 and
             newlen > hislen, which implies hislen < 0, which is
             impossible (hislen is always between 0 and 10000).
Resolution : Refactor code.
             Asserting oldlen >= 0 should have sufficed, but
             for some reason analyzer doesn't follow implications in
             that case.
             Asserting newlen != 0 || newlen <= hislen works.
             But the chance has been taken to do extensive
             refactoring of this function, as it was difficult to
             understand as it was.
             As a result of refactoring, assert is not needed anymore,
             as we don't call clear_hist_entry() in refactored version.
Refactor   : - Rework algorithm:
               * Drop guard for OOM case, which can't happen now.
               * Drop empty/growing/shrinking cases. Simplify to always
                 doing the same.
               * Perform circular array reordering in all cases
                 (before, it only did when shrinking).
               * Work in batches through memcpy/memset, instead of one
                 entry at a time, as it did before.
             - Inline variable declarations.
             - Replace `ssize_t` by `int`.
             - Introduce oldlen as entry value of hislen.
             - Add a lot of comments.

Helped-by: Scott Prager <splinterofchaos@gmail.com>
Helped-by: oni-link <knil.ino@gmail.com>
2015-04-23 16:26:44 +02:00
Eliseo Martínez
178e9fc2f6 Fix warnings: ops.c: op_yank_reg(): Dead assignment: HI.
Problem    : Dead assignment @ 2480.
Diagnostic : Harmless issue.
Rationale  : It's true `reg` is not used any more after that point.
Resolution : Delete line.
2015-04-23 16:26:44 +02:00
Thiago de Arruda
04e098fc3c Merge PR #2208 'if_python3 support' 2015-04-23 08:27:17 -03:00
Michael Reed
0bd72fcae1 Merge pull request #2479 from Pyrohh/contributing-md
[RFC] CONTRIBUTING: Mention the wiki's troubleshooting & FAQ articles
2015-04-22 14:24:04 -04:00
Rui Abreu Ferreira
f67c3e67ab Update busted version to 2.0.rc8-0 2015-04-22 14:07:10 +01:00
Rui Abreu Ferreira
78460bdf04 Refactor luarocks third-party recipe
- Replace repeated use of the luarocks command and build arguments
  with variables ${LUAROCKS_BINARY} and ${LUAROCKS_BUILDARGS}
2015-04-22 13:45:57 +01:00
Rui Abreu Ferreira
fe9ec9c299 Add option USE_BUNDLED_BUSTED to third-party
- When not running the unit tests, building the third-party busted,
  nvim-client and other dependencies can be skipped by passing
  -DUSE_BUNDLED_BUSTED=FALSE to the third-party project.
2015-04-22 13:45:57 +01:00
Michael Reed
c68fcb6ea1 CONTRIBUTING: Mention the wiki's troubleshooting & FAQ articles
[ci skip]
2015-04-21 19:05:27 -04:00
Shougo Matsushita
577d9f3f7e Improve travis ci script
Reviewed-by: Justin M. Keyes <justinkz@gmail.com>, Nikolay Pavlov <zyx.vim@gmail.com>
2015-04-21 06:20:45 +09:00
Shougo Matsushita
42de617974 Add if_python3 support
Reviewed-by: Michael Reed <m.reed@mykolab.com>, Daniel Hahler <github@thequod.de>
Helped-by: Daniel Hahler <github@thequod.de>
2015-04-21 06:20:23 +09:00
Thiago de Arruda
84891f2802 Change neovim.org references to neovim.io 2015-04-19 17:17:45 -03:00
Eliseo Martínez
7086d435e0 Merge #2418: Remove char_u (4)
Reviewed-by: Scott Prager <splinterofchaos@gmail.com>
Reviewed-by: Michael Reed <m.reed@mykolab.com>
Reviewed-by: Eliseo Martínez <eliseomarmol@gmail.com>
2015-04-19 21:10:21 +02:00
Mark Bainter
30cdba80dd Refactor after_pathsep() to use const qualified args 2015-04-18 21:37:10 +00:00
Mark Bainter
a7e17de048 Refactor get_env() to respect const qualifier
Without the casts*, the compiler rightly warns about the os_getenv
losing the qualifier.  This refactor adds a variable to manage this
properly, and renames the original variables to increase clarity.
2015-04-18 21:37:10 +00:00
John Szakmeister
6395048946 Merge pull request #2443 from jszakmeister/fix-more-release-warnings
Fix a few uninitialized variable warnings.
2015-04-18 16:52:43 -04:00
Eliseo Martínez
f03780c1b8 Fix an uninitialized variable warning for call_start. 2015-04-18 04:37:09 -04:00
John Szakmeister
2cbe7005c2 Fix a couple uninitialized variable warnings in the release build.
Reviewed-by: Eliseo Martínez <eliseomarmol@gmail.com>
Reviewed-by: Marco Hinz <mh.codebro@gmail.com>
Reviewed-by: Björn Linse <bjorn.linse@gmail.com>
2015-04-18 04:37:09 -04:00
Mark Bainter
08c08ecdf3 Remove char_u: get_mess_lang() 2015-04-18 04:52:07 +00:00
Mark Bainter
78c77e8555 Remove char_u: set_helplang_default() 2015-04-18 04:51:58 +00:00
Mark Bainter
a4e51f72ab Remove char_u: vim_setenv() 2015-04-18 04:50:12 +00:00
Björn Linse
a88e2f4fd4 Merge pull request #2411 from bfredl/yankregs
Cleanup implementation of registers and fix missing clipboard support in `:redir`
2015-04-17 23:05:26 +02:00
Michael Reed
607a118de4 Merge pull request #2406 from Pyrohh/make-use-wildcard
[RFC] build: Misc. small improvements
2015-04-17 16:38:25 -04:00
Mark Bainter
4848158cc1 Remove char_u: vim_getenv() 2015-04-17 14:46:58 +00:00
Mark Bainter
9a5e87ac83 Remove char_u: after_pathstep()
See: #459
2015-04-17 14:46:58 +00:00
Björn Linse
26fedb133d clipboard: cleanup valid_yank_reg and use it for :redir
This fixes missing clipboard support for `:redir`

Helped-By: Michael Reed <m.reed@mykolab.com>
Helped-By: Scott Prager <splinterofchaos@gmail.com>
2015-04-17 16:12:32 +02:00
Björn Linse
edb13791bd clipboard: simplify handling of of put in visual mode.
When clipboard=unnamed and put over visual selection, reduces number of
provider calls from 6 to 2. Also add test.
2015-04-17 11:34:06 +02:00
Björn Linse
84b7a9ac34 ops.c: eliminate unneccesary static variable y_append 2015-04-17 11:34:05 +02:00
Björn Linse
96e9d261cf ops.c: eliminate static variable y_current
This variable isn't stateful, and should be passed around instead.

Helped-By: Scott Prager <splinterofchaos@gmail.com>
Helped-By: Michael Reed <m.reed@mykolab.com>
2015-04-17 11:33:44 +02:00
Michael Reed
74fbd10e57 Revert "third-party: temporarily drop back to an old version of the busted spec"
No longer needed after
aab5d19d0c

This reverts commit d22f2f9404.
2015-04-16 20:24:15 -04:00
Michael Reed
7c0904df4a contrib/local.mk.example: Misc. improvements
- Mention how to disable jemalloc during compilation
- Mention using additional CFLAGS during compilation
2015-04-16 20:22:05 -04:00
Michael Reed
55aab0e7e1 CMakeLists.txt: Remove unneeded globs
refs #2426
2015-04-16 20:22:05 -04:00
Michael Reed
785a91f3da runtime/doc/Makefile: Use wildcard 2015-04-16 20:22:05 -04:00
Marco Hinz
c1a3d289d6 Eval: do not join a list if it's empty anyway #2441
This spares some work and also prevents list_join() from calling ga_init()
with a growsize of 0 which would lead to the nvimlog being littered with:

  [warning @ ga_set_growsize:64] 17675 - trying to set an invalid ga_growsize: 0

Also in Vim 7.4.702
  5216f767d4
2015-04-16 20:15:31 -04:00
grtlr
1b07f5711c Travis: Remove unused dependencies #2431 2015-04-16 18:25:03 +03:00
John Szakmeister
52e995509f Merge pull request #2353 from jszakmeister/fix-unused-var-warnings-in-release
Fix several unused variable warnings in the release build.
2015-04-16 08:45:16 -04:00
John Szakmeister
bae1e05fc8 Fix several unused variable warnings in the release build.
Reviewed-by: Justin M. Keyes <justinkz@gmail.com>
Reviewed-by: Eliseo Martínez <eliseomarmol@gmail.com>
2015-04-16 08:43:20 -04:00
Marco Hinz
a86193d88e Remove runtime/tools/ #2426
This directory contains old (at least 10+ years) scripts that mainly filter
output of other old programs to make them conformant with an 'errorformat'
from 10+ years ago.
2015-04-14 17:49:37 -04:00
Scott Prager
b47ea5fcde Merge pull request #2331 from splinterofchaos/serverlisten
vimL: serverlisten({addr}), list(), and stop({addr})
2015-04-14 15:45:39 -04:00
Scott Prager
9353fcf024 server: add unit tests 2015-04-14 15:31:04 -04:00
Scott Prager
296719428a eval: learn serverstart, list, and close().
Implement functions for spawning, destroying, and listing active
servers, and add server_address_list() to msgpack_rpc/server.c for the
serverlist() vimL function.
2015-04-14 15:31:04 -04:00
Scott Prager
4a66c48d8b msgpack_rpc/server.c: Use a garray over a kmap.
Testing of server_start() and server_stop() found that after adding a
server at address addr, pmap_has(addr) would always return true, but
pmap_get(addr) would always return NULL.

Since a client is only expected to have a small number of servers, an
array may be more efficient than a hash map, anyway.

Discussion:
https://github.com/neovim/neovim/pull/1302#issuecomment-88487148
2015-04-14 15:20:50 -04:00