aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/path.c
Commit message (Collapse)AuthorAge
...
* 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.
* os_scandir: mch/unix_expandpath() -> path_expand()Scott Prager2015-03-31
| | | | | Merge unix_expandpath with dos_expandpath from upstream vim and use os_scandir() over POSIX readdir().
* Un-mch mch_has_(exp_)wildcard().Scott Prager2015-03-31
| | | | | Merge mch_has_wildcard() and mch_has_exp_wildcar() with their upstream equivalents for Windows and replace the "mch_" suffix with "path_".
* Remove platform dependent HAVE_OPENDIR #2010Jonas Dourado2015-03-17
|
* Macro cleanup: USE_UNIXFILENAMEMichael Reed2015-03-05
|
* Enable -Wconversion: mark.c.Eliseo Martínez2015-02-18
| | | | | | Refactoring summary: - MB_STRNICMP: Inlined. - MB_STRNCMP: Inlined.
* Enable -Wconversion: Passing-by: Remove dead code (MACOS_CONVERT).Eliseo Martínez2015-02-18
| | | | MacOS (pre Mac OS X) is not supported anymore.
* Remove nonnullret deadcode: xcalloc.Eliseo Martínez2015-01-27
|
* Remove nonnullret deadcode: vim_strsave.Eliseo Martínez2015-01-27
|
* Macro cleanup: PROTOMichael Reed2015-01-14
| | | | | | 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.
* Remove Amiga remnantsMichael Reed2014-12-19
| | | | | | | | | 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.
* vim-patch:7.4.423Florian Walch2014-12-18
| | | | | | | 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
* ui: Remove ui_delay, ui_breakcheck and ui_set_shellsizeThiago de Arruda2014-11-27
| | | | | These functions only used to call another os_* function, so remove them and replace all occurences in the project.
* vim-patch:7.4.248Scott Prager2014-09-30
| | | | | | | 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
* vim-patch:7.4.235Scott Prager2014-09-17
| | | | | | | 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
* path: learn save_absolute_path().Scott Prager2014-09-17
|
* fileid: rename os_file_id_equalStefan Hoffmann2014-08-31
|
* fileid: rename os_get_file_idStefan Hoffmann2014-08-31
|
* fileinfo: rename os_file_info_id_equalStefan Hoffmann2014-08-31
|
* fileinfo: rename os_get_file_info{,_link,_fd}Stefan Hoffmann2014-08-31
|
* Merge pull request #1019 from splinterofchaos/globpathJustin M. Keyes2014-08-18
|\ | | | | vim-patch:7.4.279
| * vim-patch:7.4.279Scott Prager2014-08-04
| | | | | | | | | | | | | | | | 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
* | path.c: Learn invocation_path_tail().Scott Prager2014-08-17
| | | | | | | | | | Required for vim patch 276 as an alternative to `get_isolated_shell_name()`.
* | Remove DONT_ADD_PATHSEP_TO_DIR used only in legacy MacPavel Platto2014-08-02
|/
* move errno.h include out of vim.hBrandon Coleman2014-07-09
|
* move assert.h include out of vim.hBrandon Coleman2014-07-09
|
* move <inttypes.h> include out of vim.hBrandon Coleman2014-07-09
|
* move ascii.h include out of vim.hBrandon Coleman2014-07-09
|
* remove stdbool.h include from vim.h and globals.hBrandon Coleman2014-07-09
|
* Introduce GA_APPEND()Felipe Oliveira Carvalho2014-06-30
| | | | | | | | | 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;
* FileID: refactor path.c to use `FileID`Stefan Hoffmann2014-06-27
|
* Replace vim_strncpy calls: path.cDouglas Schneider2014-06-13
|
* spelling fixes #827Will Stamper2014-06-12
|