aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
Commit message (Collapse)AuthorAge
...
* Merge pull request #3034 from ZyX-I/msgpack-evalJustin M. Keyes2015-08-03
|\ | | | | msgpack viml functions for dump/restore
| * eval: Call list_append_allocated_string from list_append_stringZyX2015-08-02
| |
| * vim_to_msgpack: Silence -Werror=unitialized compiler errorZyX2015-08-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Compiler warning was found in [QuickBuild logs][1] from [this page][2]. GCC and clang on travis appear to be fine. Relevant log parts: Step Log (master>buildall>build-node?testNode=linux-64>build-and-run-tests>build-and-run-tests-parameterized?buildType=Release>configure-neovim-and-build-nvim) <…> 16:26:31,364 WARN - /home/quickbuild/buildagent/workspace/root/neovim/pull-requests-automated/src/nvim/eval.c: In function ‘f_msgpackdump’: 16:26:31,364 WARN - /home/quickbuild/buildagent/workspace/root/neovim/pull-requests-automated/src/nvim/eval.c:12371:26: error: ‘cur_tv’ may be used uninitialized in this function [-Werror=uninitialized] 16:26:31,364 WARN - /home/quickbuild/buildagent/workspace/root/neovim/pull-requests-automated/src/nvim/eval.c:12328:21: note: ‘cur_tv’ was declared here 16:26:31,938 WARN - cc1: all warnings being treated as errors [1]: http://neovim-qb.szakmeister.net/wicket/page?4-1.ILinkListener-content-buildTab-panel-errorContainer-steps-5-logLink [2]: http://neovim-qb.szakmeister.net/build/2099/overview
| * eval: Remove most of msgpack* functions limitationsZyX2015-08-02
| |
| * eval: Add msgpackparse and msgpackdump functionsZyX2015-08-02
| |
* | os/fs: Move mkdir_recurse from eval.c to os/fs.cZyX2015-07-26
| |
* | eval.c: Only inline float_op_wrapper on non-i386 #3072Wander Nauta2015-07-21
| | | | | | | | | | | | | | | | | | glibc on i386 seems to have an optimization that makes it harder to call some math functions indirectly from inside an inlined function, causing compile-time errors with some versions of gcc. This removes inlining on that platform. Closes #3071
* | Implement API function to call functions #2979Sebastian Witte2015-07-19
| | | | | | | | | | Remove static modifier from func_call Move MAX_FUNC_ARGS definnition from eval.c to eval.h
* | synIDattr(): true color awarenessMarco Hinz2015-07-18
| | | | | | | | | | | | | | | | In Vim, which doesn't true colors, synIDattr('Foo', 'fg') returns either ctermfg or guifg depending on whether vim or gvim is running. True colors naturally use GUI colors, so synIDattr() has to be adapted to return guifg, if a TUI with enabled true colors is used.
* | eval: Fix duplicate code in trig/math functions #3035Wander Nauta2015-07-18
| | | | | | | | | | | | | | | | | | | | The same error checking/recovery code was duplicated among the f_acos, f_asin, f_atan, f_ceil, f_cos, f_cosh, f_exp, f_floor, f_log, f_log10, f_round, f_sin, f_sinh, f_sqrt, f_tan, f_tanh and f_trunc functions. This commit moves that code into a wrapper function. `trunc` is not in C90, but it is in C99, which is what neovim targets, so we use it here.
* | Macro cleanup: FEAT_SHORTCUT, replace with WIN32Hettomei2015-07-17
| |
* | Macro cleanup: USE_FILE_CHOOSERHettomei2015-07-17
| |
* | Macro cleanup: FEAT_GUI_MOTIFHettomei2015-07-17
| |
* | Macro cleanup: FEAT_GUI_W32Hettomei2015-07-17
|/
* job: Replace by a better process abstraction layerThiago de Arruda2015-07-17
| | | | | | | | | | | | | - New libuv/pty process abstraction with simplified API and no globals. - Remove nvim/os/job*. Jobs are now a concept that apply only to programs spawned by vimscript job* functions. - Refactor shell.c/channel.c to use the new module, which brings a number of advantages: - Simplified API, less code - No slots in the user job table are used - Not possible to acidentally receive data from vimscript - Implement job table in eval.c, which is now a hash table with unilimited job slots and unique job ids.
* rstream/wstream: Unify structures and simplify APIThiago de Arruda2015-07-17
| | | | | | | | | | | | | - Simplify RStream/WStream API and make it more consistent with libuv. - Move into the event loop layer(event subdirectory) - Remove uv_helpers module. - Simplify job/process internal modules/API. - Unify RStream and WStream into a single structure. This is necessary because libuv streams can be readable and writable at the same time(and because the uv_helpers.c hack to associate multiple streams with libuv handle was removed) - Make struct definition public, allowing more flexible/simple memory management by users of the module. - Adapt channel/job modules to cope with the changes.
* event loop: New abstraction layer with refactored time/signal APIThiago de Arruda2015-07-17
| | | | | | | | | | - Add event loop abstraction module under src/nvim/event. The src/nvim/event/loop module replaces src/nvim/os/event - Remove direct dependency on libuv signal/timer API and use the new abstraction instead. - Replace all references to uv_default_loop() by &loop.uv, a new global variable that wraps libuv main event loop but allows the event loop functions to be reused in other contexts.
* vim-patch:7.4.688 #2941Felipe Morales2015-07-14
| | | | | | | | | | ``` updated for version 7.4.668 Problem: Can't use a glob pattern as a regexp pattern. Solution: Add glob2regpat(). (Christian Brabandt) ``` https://code.google.com/p/vim/source/detail?r=v7-4-668
* rbuffer: Reimplement as a ring buffer and decouple from rstreamThiago de Arruda2015-07-01
| | | | | | | | | | | | | | | | | | | | Extract the RBuffer class from rstream.c and reimplement it as a ring buffer, a more efficient version that doesn't need to relocate memory. The old rbuffer_read/rbuffer_write interfaces are kept for simple reading/writing, and the RBUFFER_UNTIL_{FULL,EMPTY} macros are introduced to hide wrapping logic when more control is required(such as passing the buffer pointer to a library function that writes directly to the pointer) Also add a basic infrastructure for writing helper C files that are only compiled in the unit test library, and use this to write unit tests for RBuffer which contains some macros that can't be accessed directly by luajit. Helped-by: oni-link <knil.ino@gmail.com> Reviewed-by: oni-link <knil.ino@gmail.com> Reviewed-by: Scott Prager <splinterofchaos@gmail.com> Reviewed-by: Justin M. Keyes <justinkz@gmail.com> Reviewed-by: Michael Reed <m.reed@mykolab.com>
* completion: Initialize v:completed_item #2839Shougo Matsushita2015-06-20
| | | | | v:completed_item should always be a dict (not empty string), even before the first completion.
* completion: Add v:completed_item feature #2563Shougo Matsushita2015-05-24
| | | | | | | Reviewed-by: Michael Reed <m.reed@mykolab.com> Reviewed-by: Luke Andrew <luke.github@la.id.au> Reviewed-by: Justin M. Keyes <justinkz@gmail.com> Reviewed-by: Florian Walch <florian@fwalch.com>
* Cleanup 'ttym[ouse]', FEAT_MOUSE, mouse_(dec|gpm|etc.)Michael Reed2015-05-18
| | | | | | Because of 3baba1e7bc6698e6bc9f1d37fce88b30d6274bc9, it's dead code. Helped-by: Justin M. Keyes <justinkz@gmail.com>
* vim-patch:7.4.597 #2658David Bürgin2015-05-17
| | | | | | | | | Problem: Cannot change the result of systemlist(). Solution: Initialize v_lock. (Yukihiro Nakadaira) https://github.com/vim/vim/commit/v7-4-597 See https://groups.google.com/d/msg/vim_dev/WXCfHMeqjfk/n2PjNwZ2bzIJ
* passing-by: get_vim_var_str: mark non-null returnJustin M. Keyes2015-05-17
|
* doc: v:servername, serverstart()Justin M. Keyes2015-05-17
|
* Remove char_u: message:smsg()Michael Reed2015-05-13
|
* coverity/62618: fixing "Wrong sizeof argument"Chris Hall2015-05-08
| | | | | | suspicious_sizeof: Passing argument 168UL /* sizeof (ufunc_T) */ * todo to function xmalloc and then casting the return value to ufunc_T ** is suspicious.
* Merge #2470: Remove char_u (5)Eliseo Martínez2015-05-07
|\ | | | | | | | | | | Reviewed-by: Scott Prager <splinterofchaos@gmail.com> Reviewed-by: Michael Reed <m.reed@mykolab.com> Reviewed-by: Eliseo Martínez <eliseomarmol@gmail.com>
| * Remove char_u: FullName_save()Mark Bainter2015-05-06
| |
| * Remove char_u: path_with_url()Mark Bainter2015-05-06
| |
| * Remove char_u: add_pathsep()Mark Bainter2015-05-06
| |
* | vim-patch:7.4.574 #2539Bastian Winkler2015-05-03
|/ | | | | | | Problem: No error for eval('$'). Solution: Check for empty name. (Yasuhiro Matsumoto) https://github.com/vim/vim/commit/v7-4-574
* unify jobstart, termopen, and system interfacesScott Prager2015-05-02
| | | | | | | | | | | | | | | | | For any of these functions, if {cmd} is a string, execute "&shell &shellcmdflag '{cmd}'", or simply {cmd} if it's a list. In termopen(), if the 'name' option is not supplied, try to guess using '{cmd}' (string) or {cmd}[0] (list). Simplify ex_terminal to use the string form of termopen(). termopen: get name from argument Convert list_to_argv to tv_to_argv. Helped-by: Björn Linse <@bfredl> Helped-by: oni-link <knil.ino@gmail.com> Helped-by: Thiago de Arruda <@tarruda>
* term: use an argument vector for termopen().Scott Prager2015-05-02
| | | | | | | | | | | | | | | | | | | | | | Old behaviour: termopen('cmd') would run `&shell &shcf "cmd"`, which caused the functional tests to fail on some systems due to the process not "owning" the terminal. Also, it is inconsistent with jobstart(). Modify termopen() so that &shell is not invoked, but maintain the old behaviour with :terminal. Factor the common code for building the argument vector from jobstart() and modify the functional tests to call termopen() instead of :terminal (fixes #2354). Also: * Add a 'name' option for termopen() so that `:terminal {cmd}` produces a buffer named "term//{cwd}/{cmd}" and termopen() users can customize the name. * Update the documentation. * Add functional tests for `:terminal` sinse its behaviour now differs from termopen(). Add "test/functional/fixtures/shell-test.c" and move "test/functional/job/tty-test.c" there, too. Helped-by: Justin M. Keyes <@justinmk>
* vim-patch:7.4.633 #2526Florian Walch2015-04-28
| | | | | | | Problem: After 7.4.630 the problem persists. Solution: Also skip redo when calling a user function. https://github.com/vim/vim/commit/v7-4-633
* Enable -Wconversion: normal.c.Eliseo Martínez2015-04-27
| | | | | | | | | | | | | | | | | | | | | | | | Refactor summary: - extern int opcount --> extern long opcount - bool find_decl(..., int len, ...) --> bool find_decl(..., size_t len, ...) * int find_ident_under_cursor(...) --> size_t find_ident_under_cursor(...) - int find_ident_at_pos(...) --> size_t find_ident_at_pos(...) - int modify_fname(..., int *usedlen, ..., int *fnamelen) --> int modify_fname(..., size_t *usedlen, ..., size_t *fnamelen) * char_u *eval_vars(..., int *usedlen, ...) --> char_u *eval_vars(..., size_t *usedlen, ...) - int find_cmdline_var(..., int *usedlen) --> ssize_t find_cmdline_var(..., size_t *usedlen) - static char_u *repl_cmdline(..., int srclen, ...) --> static char_u *repl_cmdline(..., size_t srclen, ...) - bool get_visual_text(..., int *lenp) --> bool get_visual_text(..., size_t *lenp) * char_u *find_file_name_in_path(..., int len, ...) --> char_u *find_file_name_in_path(..., size_t len, ...) - static char_u *eval_includeexpr(..., int len) --> static char_u *eval_includeexpr(..., size_t len) - char_u *find_file_in_path(..., int len, ...) --> char_u *find_file_in_path(..., size_t len, ...) * char_u *find_file_in_path_option(..., int len, ...) --> char_u *find_file_in_path_option(..., size_t len, ...) - char_u *find_directory_in_path(..., int len, ...) --> char_u *find_directory_in_path(..., size_t len, ...) * int spell_move_to(...) --> size_t spell_move_to(...) - int spell_check(...) --> size_t spell_check(...) - static int spell_bad_len --> static size_t spell_bad_len - void find_pattern_in_path(..., int len, ...) --> void find_pattern_in_path(..., size_t len, ...) Helped-by: Justin M. Keyes <justinkz@gmail.com>
* Replace vim_isxdigit() with to ascii_isxdigit() defined in ascii.hFelipe Oliveira Carvalho2015-04-24
|
* Replace VIM_ISDIGIT() and vim_isdigit() with ascii_isdigit() defined in ascii.hFelipe Oliveira Carvalho2015-04-24
|
* Replace vim_iswhite with ascii_iswhite() defined in ascii.hFelipe Oliveira Carvalho2015-04-24
|
* rpcstart: check argvars, /then/ alloc argv #2462Scott Prager2015-04-23
| | | | fixes #2458
* Add if_python3 supportShougo Matsushita2015-04-21
| | | | | Reviewed-by: Michael Reed <m.reed@mykolab.com>, Daniel Hahler <github@thequod.de> Helped-by: Daniel Hahler <github@thequod.de>
* Merge #2418: Remove char_u (4)Eliseo Martínez2015-04-19
|\ | | | | | | | | | | Reviewed-by: Scott Prager <splinterofchaos@gmail.com> Reviewed-by: Michael Reed <m.reed@mykolab.com> Reviewed-by: Eliseo Martínez <eliseomarmol@gmail.com>
| * Refactor get_env() to respect const qualifierMark Bainter2015-04-18
| | | | | | | | | | | | 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.
| * Remove char_u: vim_setenv()Mark Bainter2015-04-18
| |
| * Remove char_u: vim_getenv()Mark Bainter2015-04-17
| |
| * Remove char_u: after_pathstep()Mark Bainter2015-04-17
| | | | | | | | See: #459
* | Merge pull request #2443 from jszakmeister/fix-more-release-warningsJohn Szakmeister2015-04-18
|\ \ | | | | | | Fix a few uninitialized variable warnings.
| * | Fix an uninitialized variable warning for call_start.Eliseo Martínez2015-04-18
| |/
* / ops.c: eliminate unneccesary static variable `y_append`Björn Linse2015-04-17
|/
* Eval: do not join a list if it's empty anyway #2441Marco Hinz2015-04-16
| | | | | | | | | | 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 https://github.com/vim/vim/commit/5216f767d4070d0085de6fa1391e6f2991c1baa5