aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/if_cscope.c
Commit message (Collapse)AuthorAge
* vim-patch:8.2.4241: some type casts are redundantDundar Göc2022-01-30
| | | | | | | | Problem: Some type casts are redundant. Solution: Remove the type casts. (closes vim/vim#9643) https://github.com/vim/vim/commit/420fabcd4ffeaf79082a6e43db91e1d363f88f27 This is not a literal port but an equivalent one.
* lint (#16526)Jan Edmund Lazo2021-12-05
|
* refactor: saner options for uncrustify (#16204)dundargoc2021-11-19
| | | | | | | | | | | | | | | | | | | | | | | | * sp_enum_after_assign = force * sp_brace_typedef = force * nl_do_brace = remove * sp_do_brace_open = force * sp_brace_close_while = force * sp_before_semi = remove * sp_before_semi_for = remove * sp_before_semi_for_empty = remove * sp_between_semi_for_empty = remove * sp_after_semi_for_empty = remove * sp_before_square = remove * sp_before_squares = remove * sp_inside_square = remove * sp_inside_fparens = remove * sp_inside_fparen = remove * sp_inside_tparen = remove * sp_after_tparen_close = remove * sp_return_paren = force * pos_bool = lead * sp_pp_concat = remove * sp_pp_stringify = remove * fixup: disable formatting for the INIT section
* refactor: reduce number of explicit char casts (#16077)dundargoc2021-11-16
| | | * refactor: reduce number of explicit char casts
* vim-patch:8.2.3561: cscope has a complicated way of giving an error messageJames McCoy2021-11-01
| | | | | | Problem: Cscope has a complicated way of giving an error message. Solution: Use semsg(). (James McCoy, closes vim/vim#9038) https://github.com/vim/vim/commit/3c5904d2a5d7861c227a4c3cd4ddcbc51014c838
* vim-patch:8.1.0779: argument for message functions is inconsistentJames McCoy2021-11-01
| | | | | | Problem: Argument for message functions is inconsistent. Solution: Make first argument to msg() "char *". https://github.com/vim/vim/commit/32526b3c1846025f0e655f41efd4e5428da16b6c
* vim-patch:8.1.0743: giving error messages is not flexibleJames McCoy2021-11-01
| | | | | | | | | Problem: Giving error messages is not flexible. Solution: Add semsg(). Change argument from "char_u *" to "char *", also for msg() and get rid of most MSG macros. (Ozaki Kiichi, closes vim/vim#3302) Also make emsg() accept a "char *" argument. Get rid of an enormous number of type casts. https://github.com/vim/vim/commit/f9e3e09fdc93be9f0d47afbc6c7df1188c2a5a0d
* refactor: saner options for uncrustify #16196dundargoc2021-10-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * refactor: general good option changes sp_deref = remove sp_not = remove sp_inv = remove sp_inside_paren_cast = remove mod_remove_duplicate_include = true sp_after_semi = add sp_after_semi_for = force sp_sizeof_paren = remove nl_return_expr = remove nl_else_brace = remove nl_else_if = remove * refactor: mod_remove_extra_semicolon = true * refactor: nl_max = 3 * refactor: sp_bool = force * refactor: sp_compare = force * refactor: sp_inside_paren = remove * refactor: sp_paren_paren = remove * refactor: sp_inside_sparen = remove * refactor: sp_before_sparen = force * refactor: sp_sign = remove * refactor: sp_addr = remove * refactor: sp_member = remove * refactor: nl_struct_brace = remove * refactor: nl_before_if_closing_paren = remove * refactor: nl_fdef_brace = force * refactor: sp_paren_comma = force * refactor: mod_full_brace_do = add
* refactor: uncrustify #16090dundargoc2021-10-29
|
* refactor: remove space after starDundar Göc2021-10-19
|
* refactor: remove redundant castsDundar Göc2021-10-07
|
* vim-patch:8.2.3460: some type casts are not needed #15868dundargoc2021-10-02
| | | | | Problem: Some type casts are not needed. Solution: Remove unnecessary type casts. (closes vim/vim#8934) https://github.com/vim/vim/commit/dfa5e464d459f84200a73d178f1ecefe75bbe511
* refactor: format with uncrustify #15842dundargoc2021-10-02
| | | | * refactor: format with uncrustify * refactor: convert function comments to doxygen
* vim-patch:8.2.1513: cannot interrupt shell used for filename expansionJan Edmund Lazo2021-03-06
| | | | | | | | | | Problem: Cannot interrupt shell used for filename expansion. (Dominique Pellé) Solution: Do set tmode in mch_delay(). (closes vim/vim#6770) https://github.com/vim/vim/commit/0981c8729e09551f2e8e6c159bc29f2c1d04019c Neovim does not run settmode() in os_delay() so this patch is mostly N/A. Do not port Vim's flags (ie. MCH_DELAY_SETTMODE) for mch_delay().
* vim-patch:8.1.0268: file type checking has too many #ifdef (#13182)tamago3242020-11-06
| | | | | Problem: File type checking has too many #ifdef. Solution: Always define the S_IF macros. (Ken Takata, closes vim/vim#3306) https://github.com/vim/vim/commit/d569bb029983cff947dce704e6f830276204c13f
* vim-patch:8.1.2387: using old C style commentsJan Edmund Lazo2020-04-12
| | | | | | Problem: Using old C style comments. Solution: Use // comments where appropriate. https://github.com/vim/vim/commit/2ab2e8608f9b2c85432715bb9a7f226fdbf8cd35
* cleanup: remove mch_fopen in favor of os_fopenJustin M. Keyes2019-07-25
|
* refactor: use int for Columns and RowsBjörn Linse2019-07-19
|
* lintAndrej Zieger2019-05-26
|
* 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.