| Commit message (Collapse) | Author | Age |
... | |
|
|
|
|
|
|
| |
Update vim_isAbsName() to use bool type
cleanup casts in vim_findfile() and recover_names()
References #2470
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's the second argument, buf, that cannot be NULL. fname is allowed to
be NULL. The issue only showed up on the release build when trying to
use NULL for fname and the test would segfault unexpectedly (because the
NULL check for fname was being optimized out due to the function
attributes).
FullName_save() also incorrectly assumes that fname cannot be NULL
(possibly because of the attribute on vim_FullName), so fix that site as
well. This didn't have a corresponding test, so it wasn't visible as
test breakage, but did generate a tautological comparison warning in the
release build under Clang.
|
| |
|
|
|
|
| |
Also a minor change to remove an unneeded cast
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
| |
See: #459
|
|
|
|
|
|
| |
We already use wrappers for allocation, the new `xfree` function is the
equivalent for deallocation and provides a way to fully replace the malloc
implementation used by Neovim.
|
|
|
|
| |
remove some #ifdef noise
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Be more specific in the description of mch_expand_wildcards():
This function will never free memory pointed to by its arguments.
If OK is returned, *file will always point to allocated memory.
*num_file is set to the number of pointers in *file.
If FAIL is returned *file is set to NULL and *num_file to 0.
If gen_expand_wildcards() returns FAIL, no memory allocation in this
function needs to be undone.
If expand_wildcards() returns FAIL, no memory allocation in this
function needs to be undone.
Helped-by: Eliseo Martínez <eliseomarmol@gmail.com>
Helped-by: Michael Reed <m.reed@mykolab.com>
|
|
|
|
|
|
|
|
|
|
| |
Use os_scandir().
fname_case() only gets used when `defined(USE_FNAME_CASE)` (on operating
systems with case-insensitive file systems), but may be useful in other
contexts, so move it to path.c. (See the TODO.)
Remove the unused parameter, len.
|
|
|
|
|
| |
Merge unix_expandpath with dos_expandpath from upstream vim and use
os_scandir() over POSIX readdir().
|
|
|
|
|
| |
Merge mch_has_wildcard() and mch_has_exp_wildcar() with their upstream
equivalents for Windows and replace the "mch_" suffix with "path_".
|
| |
|
| |
|
|
|
|
|
|
| |
Refactoring summary:
- MB_STRNICMP: Inlined.
- MB_STRNCMP: Inlined.
|
|
|
|
| |
MacOS (pre Mac OS X) is not supported anymore.
|
| |
|
| |
|
|
|
|
|
|
| |
Regarding dict_lookup() in eval.c: both definitions are the same, the
only difference being the spacing between the indirection operator and
the indentation level.
|
|
|
|
|
|
|
|
|
| |
Notes regarding the removal of specific items:
- Aztec C: only on the Amiga.
- mch_check_win(): doesn't exist anymore.
- Comment in ex_cmds.c: It seems the context for this comment was
removed, but the comment was inadvertantly left alone.
|
|
|
|
|
|
|
| |
Problem: expand("$shell") does not work as documented.
Solution: Do not escape the $ when expanding environment variables.
https://code.google.com/p/vim/source/detail?r=v7-4-423
|
|
|
|
|
| |
These functions only used to call another os_* function, so remove them and
replace all occurences in the project.
|
|
|
|
|
|
|
| |
Problem: Cannot distinguish between NL and NUL in output of system().
Solution: Add systemlist(). (ZyX)
https://code.google.com/p/vim/source/detail?r=v7-4-248
|
|
|
|
|
|
|
| |
Problem: It is not easy to get the full path of a command.
Solution: Add the exepath() function.
https://code.google.com/p/vim/source/detail?r=5ab2946f7ce560985830fbc3c453bb0f7a01f385
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
vim-patch:7.4.279
|
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: globpath() returns a string, making it difficult to get a
list of matches. (Greg Novack)
Solution: Add an optional argument like with glob(). (Adnan Zafar)
https://code.google.com/p/vim/source/detail?r=8e9db1f27a0063df023cc05a760fce73255dad24
|
| |
| |
| |
| |
| | |
Required for vim patch 276 as an alternative to
`get_isolated_shell_name()`.
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
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;
|
| |
|
| |
|
| |
|