aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/path.c
Commit message (Collapse)AuthorAge
* vim-patch:8.1.1897: may free memory twice when out of memory (#10827)Jan Edmund Lazo2019-08-22
| | | | | | Problem: May free memory twice when out of memory. Solution: Check that backslash_halve_save() returns a different pointer. (Dominique Pelle, closes vim/vim#4847) https://github.com/vim/vim/commit/f1552d07d715b437d941659479942c2543b02bd4
* Fix get_path_cutoff() on Windowserw72019-08-17
| | | | | Fix an issue where the result of get_path cutoff() was incorrect when using set shellslash.
* os_can_exe: remove char_uJustin M. Keyes2019-07-21
|
* vim-patch:8.0.1496: VIM_CLEAR()Justin M. Keyes2019-05-25
| | | | | | | | Problem: Clearing a pointer takes two lines. Solution: Add VIM_CLEAR() and replace vim_clear(). (Hirohito Higashi, closes #2629) vim-patch:8.0.1481
* vim-patch:8.0.0876: backslashes and wildcards in backticks don't workJan Edmund Lazo2019-05-07
| | | | | | | Problem: MS-Windows: Backslashes and wildcards in backticks don't work. Solution: Do not handle backslashes inside backticks in the wrong place. (Yasuhiro Matsumoto, closes vim/vim#1942) https://github.com/vim/vim/commit/39d21e3c30f3391f3b27f5ddb7e1ad411bdb8f2e
* os/env: use libuv v1.12 getenv/setenv APIJustin M. Keyes2019-02-27
| | | | | | | | | | | - Minimum required libuv is now v1.12 - Because `uv_os_getenv` requires allocating, we must manage a map (`envmap` in `env.c`) to maintain the old behavior of `os_getenv` . - free() map-items after removal. khash.h does not make copies of anything, so even its keys must be memory-managed by the caller. closes #8398 closes #9267
* clang/"null pointer dereference": expand_wildcardsJustin M. Keyes2019-01-18
| | | | This invariant is explained in aa39fc56f68e.
* PVS/V1032: pointer cast to a more strictly aligned typeJustin M. Keyes2019-01-18
| | | | | | | | | | | Rework-of: ea7491586fcc Helped-by: Björn Linse <bjorn.linse@gmail.com> - The old (Vim) use of (char_u **)"" before ea7491586fcc is garbage, which hints that this value was never used. - The necessary condition is next to the NULL assigmnent, the pointer would only be started to be accessed, if the length assignment next to it is also changed.
* PVS/V1032: pointer cast to a more strictly aligned typeJustin M. Keyes2019-01-18
|
* clang/"null passed to nonnull arg": expand_wildcardsJustin M. Keyes2019-01-13
|
* Remove has_mbyte from lines near changes in parent commitZviRackover2018-08-16
|
* Remove occurences of mb_head_offZviRackover2018-08-15
|
* refactor: Replace vim_strrchr() with strrchar() (#8718)ZviRackover2018-08-11
| | | | ref #1474
* vim-patch:8.0.1512: warning for possibly using NULL pointerJan Edmund Lazo2018-07-23
| | | | | | Problem: Warning for possibly using NULL pointer. (Coverity) Solution: Skip using the pointer if it's NULL. https://github.com/vim/vim/commit/e4db7aedab65abadcc84c78e7a10ec7bb62f11cf
* vim-patch:8.0.1464: add slash when completing directory #8684Jan Edmund Lazo2018-07-10
| | | | | Problem: Completing directory after :find does not add slash. Solution: Adjust the flags for globpath(). (Genki Sky) https://github.com/vim/vim/commit/8a37b032895b40dd6953280c33585bcba0c7ef8b
* vim-patch:8.0.0451: some macros are in lower caseJan Edmund Lazo2018-06-12
| | | | | | | Problem: Some macros are in lower case. Solution: Make a few more macros upper case. Avoid lower case macros use an argument twice. https://github.com/vim/vim/commit/91acfffc1e6c0d8c2abfb186a0e79a5bf19c3f3f
* vim-patch:8.0.0355: using uninitialized memory when 'isfname' is empty (#8493)Jan Edmund Lazo2018-06-08
| | | | | | Problem: Using uninitialized memory when 'isfname' is empty. Solution: Don't call getpwnam() without an argument. (Dominique Pelle, closes vim/vim#1464) https://github.com/vim/vim/commit/187a4f28140f10ff833862be7e3ef823d317e1c7
* path: Silence PVS/V557: impossible to reach with NUL-terminated stringZyX2018-04-17
|
* path: Fix PVS/V560: condition is essentially `A && A`ZyX2018-04-17
|
* refactor/rename: path_to_absolute()Justin M. Keyes2018-03-24
|
* refactor/rename: path_try_shorten_fname()Justin M. Keyes2018-03-24
|
* refactor/rename: path_is_absolute()Justin M. Keyes2018-03-24
|
* fixup: lint errorsJan Edmund Lazo2018-01-28
|
* win: explicitly specify pathsepJan Edmund Lazo2018-01-28
|
* fixup: compile-time errorsJan Edmund Lazo2018-01-28
|
* win: detect / and \ as root path separatorJan Edmund Lazo2018-01-28
|
* Fix warning about conversion on mingw64George Zhao2018-01-18
|
* win: vim_FullName(): force backslashes #7287Ignas Anikevicius2017-10-02
| | | | | | | | | - Replace obvious cases of '/' literal with PATHSEP. (There are still some remaining cases that need closer inspection.) - Fixup tests: ui/screen_basic closes #7117 ref https://github.com/neovim/neovim/issues/2471#issuecomment-271193714
* sockets: don't deadlock when connecting to own pipe addressBjörn Linse2017-05-29
|
* Merge pull request #6735 from justinmk/funcattrJames McCoy2017-05-20
|\ | | | | clang 3.6+ REAL_FATTR_NONNULL_RET
| * path.c: Remove invalid FUNC_ATTR_NONNULL_RETJustin M. Keyes2017-05-13
| | | | | | | | References https://github.com/neovim/neovim/pull/6514#issuecomment-301235265
* | env_iter: Learn `delim` parameter.Justin M. Keyes2017-05-15
| |
* | startup: v:progpath fallback: path_guess_exepathJustin M. Keyes2017-05-15
|/ | | | | | | If procfs is missing then libuv cannot find the exe path. Fallback to path_guess_exepath(), adapted from Vim findYourself(). Closes #6734
* *: Add comment to all C filesZyX2017-04-19
|
* lint: fix clint errors around mb_tolower callsBjörn Linse2017-04-10
|
* mbyte: replace vim_tolower with mb_tolower handling locale correctlyBjörn Linse2017-04-10
|
* fileio: Refactor msg_add_fname to something which needs no commentsZyX2017-04-03
|
* *: Fix some Windows-specific warningsZyX2017-03-29
| | | | Also fixed an error in path_fnamecmp().
* eval,*: Move get_tv_string to typval.cZyX2017-03-29
| | | | Function was renamed and changed to return `const char *`.
* *: Move some dictionary functions to typval.h and use char*ZyX2017-03-29
| | | | Also fixes buffer reusage in setmatches() and complete().
* vim-patch:7.4.1991James McCoy2017-02-27
| | | | | | | Problem: glob() does not add a symbolic link when there are no wildcards. Solution: Remove the call to mch_getperm(). https://github.com/vim/vim/commit/00efded1064427ab3f84e4d57af62e0aab876fc6
* win: executable(): full path without extensionJustin M. Keyes2017-02-04
| | | | Absolute path is considered executable even *without* an extension.
* refactor: Remove strncpy/STRNCPY. (#6008)Justin M. Keyes2017-01-26
| | | | | | | | | | | | | | | Closes #731 References #851 Note: This does not remove some intentional legacy usages of strncpy. - memcpy isn't equivalent because it doesn't check the string length of `src`, and doesn't zero-out the remainder of `dst`. - xstrlcpy isn't equivalent because it doesn't zero-out the remainder of `dst`. Some Vim logic depends on that (e.g. ex_append which calls vim_strnsave). Helped-by: Douglas Schneider <ds3@ualberta.ca> Helped-by: oni-link <knil.ino@gmail.com> Helped-by: James McCoy <jamessan@jamessan.com>
* add_pathsep(): Return false if filename is too long.cztchoice2017-01-23
| | | | References #3042
* refactor: strlcat instead of str{n}cat.cztchoice2017-01-23
| | | | | | | | | | Add xstrlcat function. Closes #3042 References #988 References #1069 coverity: 71530, 71531, 71532
* path.c: `vim_FullName()`: Fix heap overflow #5737nfnty2017-01-05
| | | | | | - Clarify documentation. - Return `FAIL` and truncate if `fname` is too long. - Add tests.
* vim-patch:7.4.2274 (#5439)Harm te Hennepe2016-10-12
| | | | | | | Problem: Command line completion on "find **/filename" drops sub-directory. Solution: Handle this case separately. (Harm te Hennepe, closes vim/vim#932, closes vim/vim#939) https://github.com/vim/vim/commit/73d4e4c8922f6f4d256f910a18f47c0c3a48c28b
* refactor: eliminate misc2.cJustin M. Keyes2016-09-13
| | | | | | | | | | move `call_shell` to misc1.c Move some fns to state.c Move some fns to option.c Move some fns to memline.c Move `vim_chdir*` fns to file_search.c Move some fns to new module, bytes.c Move some fns to fileio.c
* path.c: Avoid code duplication for path separator checksRui Abreu Ferreira2016-08-18
|
* Windows: Check drive letter in absolute pathsRui Abreu Ferreira2016-08-18
| | | | | Check if drive letter is alphabetic character in path_is_absolute_path().