aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/if_cscope.c
Commit message (Collapse)AuthorAge
...
* lintJan Edmund Lazo2019-05-26
|
* vim-patch:8.1.0211: expanding a file name "~" results in $HOMEJan Edmund Lazo2019-05-25
| | | | | | Problem: Expanding a file name "~" results in $HOME. (Aidan Shafran) Solution: Change "~" to "./~" before expanding. (closes vim/vim#3072) https://github.com/vim/vim/commit/00136dc321586800986e8f743c2f108f5eecbf92
* lintJustin M. Keyes2019-05-25
|
* 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.0776: function prototypes missing without the quickfix featureJan Edmund Lazo2019-04-14
| | | | | | | Problem: Function prototypes missing without the quickfix feature. (Tony Mechelynck) Solution: Move non-quickfix functions to buffer.c. https://github.com/vim/vim/commit/f0a521f4f76904edb74e182c12732189b347ff68
* clang/"null passed to nonnull arg": cs_manage_matchesJustin M. Keyes2019-01-13
|
* vim-patch:8.0.0466: still macros that should be all-caps (#8510)Jan Edmund Lazo2018-06-10
| | | | | Problem: There are still a few macros that should be all-caps. Solution: Make a few more macros all-caps. https://github.com/vim/vim/commit/8820b48654b62472821d9b155fe03ab7ac13a05c
* if_cscope: Fix PVS/V560: condition would result in earlier returnZyX2018-04-15
| | | | Previous block just checks for totmatches being zero and returns if it is. And totmatches is unsigned, so `totmatches > 0` may never be true.
* Merge #8072 from mhinz/vim-8.0.1439Justin M. Keyes2018-03-03
|\ | | | | vim-patch: 8.0.1439, 8.0.1442
| * vim-patch:8.0.1442: using pointer before it is setMarco Hinz2018-02-26
| | | | | | | | | | | | | | Problem: Using pointer before it is set. Solution: Search in whole buffer instead of next token. https://github.com/vim/vim/commit/a172b63ab8661019dba61285a738c8b6b55a33aa
| * vim-patch:8.0.1439: if cscope fails a search Vim may hangMarco Hinz2018-02-26
| | | | | | | | | | | | | | | | Problem: If cscope fails a search Vim may hang. Solution: Bail out when a search error is encountered. (Safouane Baroudi, closes vim/vim#2598) https://github.com/vim/vim/commit/1274d33493efb6250470a37b9f4432bb31e87d64
* | cscope: ignore EINTR while reading the prompt (#8079)Marco Hinz2018-02-28
|/ | | | | | | | | | | | | | | | | | | | The following code.. au VimEnter,DirChanged * if filereadable('.git/cscope.out') | \ exe 'cs add .git/cscope.out' | endif ..would lead to this issue: Error detected while processing VimEnter Auto commands for "*": cs_read_prompt EOF: Interrupted system call Error detected while processing VimEnter Auto commands for "*": E262: error reading cscope connection 0 A signal, in this case SIGCHLD, during a system call leads to errno being set to EINTR. Ignore it. This is merely a workaround for the time being. We don't block SIGCHLD signals, since they're needed by libuv. The proper fix would be to rewrite if_cscope.c to use libuv for handling processes.
* lintJames McCoy2018-01-02
|
* vim-patch:8.0.0160: EMSG() is sometimes used where it should be IEMSG()James McCoy2018-01-02
| | | | | | | Problem: EMSG() is sometimes used for internal errors. Solution: Change them to IEMSG(). (Dominique Pelle) And a few more. https://github.com/vim/vim/commit/de33011ec623fd562419dede6bf465b5b9881a20
* vim-patch:8.0.0420: text garbled when the system encoding differs from ↵James McCoy2017-12-17
| | | | | | | | | | 'encoding' Problem: When running :make the output may be in the system encoding, different from 'encoding'. Solution: Add the 'makeencoding' option. (Ken Takata) https://github.com/vim/vim/commit/2c7292dc5bbf155fe2192d417363b8c085759cad
* Merge #7633 'Retry fgets on EINTR'Justin M. Keyes2017-11-26
|\ | | | | closes #7632
| * io: retry fgets on EINTR (#7632)Matt Widmann2017-11-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The calls to `fgets` in `src/nvim/if_cscope.c` (and elsewhere) can show communication errors to the user if a signal is delivered during its system calls. For plugins that proxy subprocess output into cscope requests, a `SIGCHLD` might *always* interfere with calls into `fgets`. To see this in a debugger, put a breakpoint on `cs_reading_emsg` and watch signals come in (with lldb, using `process handle --notify true --pass true`). Next, run a subcommand from neovim that calls through cscope when it returns. A tag picker plugin, like vim-picker and fzy, with `cscopetag` and `cscopetagorder=0` set, reproduced this reliably. The breakpoint will hit after a `SIGCHLD` is delivered, and `errno` will be set to 4, `EINTR`. The caller of `fgets` should retry when `NULL` is returned with `errno` set to `EINTR`.
* | input: only change mode of input fd if there is an input fdBjörn Linse2017-11-25
|/
* fix lint errorlonerover2017-08-04
|
* vim-patch:8.0.0081lonerover2017-08-04
| | | | | | | Problem: Inconsistent function names. Solution: Rename do_cscope to ex_cscope. Clean up comments. https://github.com/vim/vim/commit/d4db7719bdfbc54df396eac08d8cbb2389feacf4
* if_cscope: Fix truncation of formated outputoni-link2017-05-13
| | | | | | | snprintf() has to truncate the string written to buffer buf for maximal size_t value. Increase buffer size to fix this.
* *: Add comment to all C filesZyX2017-04-19
|
* *: Use const char * in set_one_cmd_contextZyX2017-03-29
| | | Also renames functions added in master and renamed here.
* vim-patch:8.0.0068 (#6243)Daniel Hahler2017-03-11
| | | | | | | | Problem: Checking did_throw after executing autocommands is wrong. (Daniel Hahler) Solution: Call aborting() instead, and only when autocommands were executed. https://github.com/vim/vim/commit/21662be2211675824df1771c7f169948ede40c41
* *: Partial string handling refactoringZyX2017-02-15
| | | | | | | | Main points: - Replace `char_u` with `char` in some cases. - Remove `str[len] = NUL` hack in some cases when `str` may be considered `const`.
* fix cscope test failurerover2017-02-10
|
* lintJames McCoy2016-10-09
|
* if_cscope: Fix conversion warnings when char defaults to unsignedJames McCoy2016-10-09
| | | | | | | | | | | | | | | | | | | | | | | ../src/nvim/if_cscope.c: In function 'cs_read_prompt': ../src/nvim/if_cscope.c:1771:47: warning: comparison is always true due to limited range of data type [-Wtype-limits] while ((ch = (char)getc(csinfo[i].fr_fp)) != EOF && ch != CSCOPE_PROMPT[0]) ^~ ../src/nvim/if_cscope.c:1804:14: warning: comparison is always false due to limited range of data type [-Wtype-limits] if (ch == EOF) { ^~ ../src/nvim/if_cscope.c:1816:14: warning: negative integer implicitly converted to unsigned type [-Wsign-conversion] ch = EOF; ^~~ ../src/nvim/if_cscope.c:1821:12: warning: comparison is always false due to limited range of data type [-Wtype-limits] if (ch == EOF) ^~ Since EOF is -1, it will be converted to a large unsigned value to compare with unsigned char and never match. Use an int to store the return from getc so we can safely compare it and, once known to be valid, cast it to char when storing it into buf. Signed-off-by: James McCoy <jamessan@jamessan.com>
* Merge #5254 from KillTheMule/vim-7.4.1952Justin M. Keyes2016-09-18
|\ | | | | vim-patch:7.4.{1952, 1990, 2033, 2284}
| * LintKillTheMule2016-08-26
| |
| * vim-patch:7.4.1990KillTheMule2016-08-26
| | | | | | | | | | | | | | | | | | Problem: Cscope items are not sorted. Solution: Put the new "a" command first. (Ken Takata) https://github.com/vim/vim/commit/80632db65e8f5f775dadbbc10c5ba6c173ebb24f All changes applied manually.
| * vim-patch:7.4.1952KillTheMule2016-08-26
| | | | | | | | | | | | | | | | | | Problem: Cscope interface does not support finding assignments. Solution: Add the "a" command. (ppettina, closes vim/vim#882) https://github.com/vim/vim/commit/b12e7ef956e0b0344778b7ef93d41f4b4ed2a670 All changes applied manually.
* | 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
* os/fs: Rename os_file_exists to os_path_exists (#4973)Daniel Xu2016-07-06
| | | | Because the old name did not indicate that the function would return true on directories as well.
* Linting.KillTheMule2016-04-23
|
* vim-patch:7.4.822KillTheMule2016-04-23
| | | | | | | | | | Problem: More problems reported by coverity. Solution: Avoid the warnings. (Christian Brabandt) https://github.com/vim/vim/commit/cde885473099296c4837de261833f48b24caf87c Applied manually. Files that do not exst anymore: gui.c gui_w16.c gui_w32.c if_xcmdsrv.c os_unix.c
* Merge tempfile.c back into fileio.cJurica Bradaric2016-04-20
|
* cscope: Fix mismatched types in ':cscope show' outputMike Wadsten2016-04-10
| | | | | | | | Type long on 32-bit systems is typically 32 bits, but PRId64 is 64 bits. This mismatch leads to bad output or segfaults on :cs show. Fixes #4537
* cs_print_tags_priv: Clean up function.oni-link2016-01-21
| | | | | | * Style changes * Variable removal * Comment update
* cs_print_tags_priv: Clear first output line to screen endoni-link2016-01-21
| | | | | | | | | Using `:cscope find s <cword>` with the cursor on a very short word like `key` does not output the first line on the screen correctly: Output is `Cscope tag: keyrd>` instead of `Cscope tag: key`. To fix this, clear the screen line after the first line was printed.
* coverity/133892: Resource leakoni-link2016-01-21
| | | | | | | Variable tbuf going out of scope leaks the storage it points to. We don't have to use the copy tbuf of a match. Because matches are always in ctags style, we can operate on them directly.
* coverity/133858: Out-of-bounds accessoni-link2016-01-21
| | | | | | Allocating insufficient memory for the terminating NUL of the string. False positive, we allocating more memory than we need.
* coverity/13753: Dereference null return valueoni-link2016-01-21
| | | | | | | | Dereferencing a pointer that might be null(ptag) when calling strlen(). False positive. A match always contains a tab, so ptag is never null. Because matches are always in ctags style, we can rewrite the code to not use strtok().
* Windows: Include <fcntl.h> for file constants.Seth Jackson2016-01-17
| | | | | | This header is required by POSIX for the constants (O_RDONLY, etc.) but we were only including it on Unix systems as a side effect of including <unistd.h>.
* 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
* Windows: Bring back code branch for if_cscope.Rui Abreu Ferreira2016-01-01
| | | | | The Vim code for windows in if_cscope.c/.h was removed during the refactor, added missing code for error_closing().
* Merge pull request #3879 from sethjackson/open-osfhandleJustin M. Keyes2015-12-26
|\ | | | | Windows: Fix cast in if_cscope.c
| * Windows: Fix cast in if_cscope.c.Seth Jackson2015-12-21
| |
* | Windows: Remove unused function #3878Seth Jackson2015-12-22
|/ | | | The only call site was removed in 902ad8d.
* 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.