aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/path.c
Commit message (Collapse)AuthorAge
...
* vim-patch:7.4.672KillTheMule2016-05-02
| | | | | | | | | | | Problem: When completing a shell command, directories in the current directory are not listed. Solution: When "." is not in $PATH also look in the current directory for directories. https://github.com/vim/vim/commit/b5971141dff0c69355fd64196fcc0d0d071d4c82 Most of it applied manually.
* *: Fix new linter errorsZyX2016-05-01
| | | | Originally there were 128 new errors, so I thought this is a good idea to fix all of them. Of course, this commit also fixes many suppressed errors.
* Happy little, happy little, happy little linterKillTheMule2016-04-22
|
* vim-patch:7.4.871KillTheMule2016-04-22
| | | | | | | | | | | Problem: Vim leaks memory, when 'wildignore' filters out all matches. Solution: Free the files array when it becomes empty. https://github.com/vim/vim/commit/7b256fe7445b46929f660ea74e9090418f857696 The only nontrivial part of 7.4.871 missing (renamings of variables are in another commit; freeing *files after 0 matches was already there, just FAIL was not returned in that case)
* The trivial part of 7.4.871KillTheMule2016-04-22
|
* vim-patch:7.4.1120Jurica Bradaric2016-04-20
| | | | | | | Problem: delete(x, 'rf') fails if a directory is empty. (Lcd) Solution: Ignore not finding matches in an empty directory. https://github.com/vim/vim/commit/336bd622c31e1805495c034e1a8cfadcc0bbabc7
* vim-patch:7.4.1117Jurica Bradaric2016-04-20
| | | | | | | Problem: No longer get "." and ".." in directory list. Solution: Do not skip "." and ".." unless EW_DODOT is set. https://github.com/vim/vim/commit/d82103ed8534a1207742e9666ac7ef1e47dda12d
* Fix linter errors.Jurica Bradaric2016-04-20
|
* vim-patch:7.4.1116Jurica Bradaric2016-04-20
| | | | | | | Problem: delete(x, 'rf') does not delete files starting with a dot. Solution: Also delete files starting with a dot. https://github.com/vim/vim/commit/b0967d587fc420fa02832533d4915c85d1a78c17
* *: Make set_vim_var_\* functions have proper argument typesZyX2016-04-18
|
* path.c: enable -WconversionCharles Joachim2016-03-27
|
* path.c: Fulfill the `@returns` conditionswatiko2016-02-21
| | | | Original-author: oni-link <knil.ino@gmail.com>
* vim-patch:7.4.903watiko2016-02-21
| | | | | | | | Problem: MS-Windows: When 'encoding' differs from the current code page, expandinig wildcards may cause illegal memory access. Solution: Allocate a longer buffer. (Ken Takata) https://github.com/vim/vim/commit/7314efd87d8c4095229bdc2867a553c36c064918
* vim-patch:7.4.831watiko2016-02-21
| | | | | | | | Problem: When expanding `=expr` on the command line and encountering an error, the command is executed anyway. Solution: Bail out when an error is detected. https://github.com/vim/vim/commit/3f188935ec4db5117c4a64cc3f71219175624745
* vim-patch:7.4.835Jurica Bradaric2016-02-09
| | | | | | | | Problem: Comparing utf-8 sequences does not handle different byte sizes correctly. Solution: Get the byte size of each character. (Dominique Pelle) https://github.com/vim/vim/commit/f6470c288cb6f8efd60a507baf2c070f9d209ae6
* vim-patch:7.4.656Justin Gassner2016-01-25
| | | | | | | Problem: Missing changes for glob() in one file. Solution: Add the missing changes. https://github.com/vim/vim/commit/d8b77f7dc04e5721989df9c505b8568194261a39
* misc: UNIX => Unix #4022Seth Jackson2016-01-16
| | | | | | | | | | Although UNIX is a registered trademark of The Open Group, it doesn't really matter whether we refer to these systems as UNIX, Unix, or Unix-like. So, for consistency, refer to them collectively as Unix. Related: http://www.greens.org/about/unix.html http://www.unixica.com/html/unixunix.html
* win32: Fix syntax error in #ifndef block. #3968Rui Abreu Ferreira2016-01-10
| | | | | | The block is only compiled if the system is NOT WIN32, but the closing parenthesis for the statement opened outside the block is closed inside the block.
* Windows: Ignore EW_ICASE in do_path_expandRui Abreu Ferreira2015-12-31
| | | | | | | | The do_path_expand() function is still using the unix_expandpath variant from Vim. For Windows it should behave as the old dos_expandpath() function. This commit adds an ifdef to ignore EW_ICASE flag in this function, otherwise all matches fail on Windows if wildignorecase is set.
* Windows: Remove UNIX guard for pstrcmp()Rui Abreu Ferreira2015-12-11
| | | | | | | | | @equalsraf: I took a look at the Vim source pstrcmp() is actually used in the dos_expandpath(misc1.c). The only difference between the UNIX and WIN32 version of the functions is the _cdecl call convention annotation - the body of the function is identical. Neovim kept the comment from the Unix function but not from the Windows variant. Seems to me its safe to use the same function for both - and just correct the comment.
* src/*: Remove `VIM - Vi improved ...` headerMichael Reed2015-11-27
| | | | | | | | | | | | | | | | | | | Regarding the individual items in the header: `Vim - Vi improved by Bram Moolenar` Bram Moolenar is already mentioned throughout the documentation, as well as the intro screen. `:help uganda` It's already shown to all users who don't use `shortmess+=I` upon starting nvim, and is already placed prominently in help.txt, i.e., `:help` run with no arguments. `:help credits` Already mentioned near the top of help.txt. `README.md` Already mentioned in develop.txt.
* Remove unnecessary includes for errno.hRui Abreu Ferreira2015-11-25
|
* *: Fix linter errorsZyX2015-10-23
|
* stdpaths: Do NOT create data directoriesZyX2015-10-23
| | | | | | This is none of option.c business to create *possibly unneeded* **default** directories **before** user specified where he actually wants to place the files.
* stdpaths,main: Remove all remaining memory leaksZyX2015-10-23
|
* Remove VLA from path_get_absolute_pathRui Abreu Ferreira2015-09-24
| | | | | Remove the use of Variable Length Arrays in path_get_absolute_path(), and use xmalloc/xfree instead.
* os/path: Fix path_get_absolute_path for top-level pathsThiago de Arruda2015-09-18
| | | | Close #2833
* path.c: Fix memory leak in expand_wildcards().oni-link2015-09-09
| | | | | | A file that matches with one of the patterns in 'wildignore' is ignored when using expand_wildcards(). After removing ignored files, the array of (file name) matches can be empty. But an empty array is never freed.
* do_path_expand: Avoid non-readable directories. #3273Felipe Morales2015-09-04
| | | | | | | | | | Closes https://github.com/neovim/neovim/issues/3164 Closes https://github.com/neovim/neovim/issues/3194 Closes https://github.com/neovim/neovim/issues/3221 Helped-by: @splinterofchaos Helped-by: @oni-link Helped-by: @justinmk
* Remove instances of TRUE/FALSE macroSteven Oliver2015-09-04
| | | | | | memory.c os_unix.c path.c
* test: call scandir_next_with_dots() more than onceJustin M. Keyes2015-08-01
| | | | Also cosmetic reduction.
* Add the . and .. entries to glob()Felipe Morales2015-08-01
| | | | | | | os_scandir() and os_scandir_next() skip over those, because of the unverlying libuv funcitons behaviour. Fixes #2954
* minor cleanup. #2610Mark Bainter2015-05-13
| | | | | | | Update vim_isAbsName() to use bool type cleanup casts in vim_findfile() and recover_names() References #2470
* Fix a wrong expectation for vim_FullName() and FullName_save().John Szakmeister2015-05-09
| | | | | | | | | | | | | | 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.
* Update vim_FullName() to define fname as constMark Bainter2015-05-06
|
* Make fname const in path_get_absolute_path()Mark Bainter2015-05-06
| | | | Also a minor change to remove an unneeded cast
* Remove char_u: concat_fnames()Mark Bainter2015-05-06
|
* Remove char_u: fix_fname()Mark Bainter2015-05-06
|
* Remove char_u: FullName_save()Mark Bainter2015-05-06
|
* Remove char_u: vim_FullName()Mark Bainter2015-05-06
|
* Remove char_u: path_with_url()Mark Bainter2015-05-06
|
* Remove char_u: path_is_url()Mark Bainter2015-05-06
|
* Remove char_u: add_pathsep()Mark Bainter2015-05-06
|
* 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>
* Refactor after_pathsep() to use const qualified argsMark Bainter2015-04-18
|
* Remove char_u: after_pathstep()Mark Bainter2015-04-17
| | | | See: #459
* memory: Add `free` wrapper and refactor project to use itThiago de Arruda2015-04-13
| | | | | | 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.
* passing-by: mark non-null return; remove invalid OOM check.Justin M. Keyes2015-04-12
| | | | remove some #ifdef noise
* Update comments for expand_wildcards functions.oni-link2015-04-05
| | | | | | | | | | | | | | | | | 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>
* os_scandir: fname_case -> path_fix_caseScott Prager2015-03-31
| | | | | | | | | | 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.