diff options
Diffstat (limited to 'src/nvim/if_cscope.c')
-rw-r--r-- | src/nvim/if_cscope.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/src/nvim/if_cscope.c b/src/nvim/if_cscope.c index d9cc643e53..7174e58986 100644 --- a/src/nvim/if_cscope.c +++ b/src/nvim/if_cscope.c @@ -80,7 +80,7 @@ static enum { * Function given to ExpandGeneric() to obtain the cscope command * expansion. */ -char_u *get_cscope_name(expand_T *xp, int idx) +char *get_cscope_name(expand_T *xp, int idx) { int current_idx; @@ -88,7 +88,7 @@ char_u *get_cscope_name(expand_T *xp, int idx) case EXP_CSCOPE_SUBCMD: // Complete with sub-commands of ":cscope": // add, find, help, kill, reset, show - return (char_u *)cs_cmds[idx].name; + return cs_cmds[idx].name; case EXP_SCSCOPE_SUBCMD: { // Complete with sub-commands of ":scscope": same sub-commands as // ":cscope" but skip commands which don't support split windows @@ -100,7 +100,7 @@ char_u *get_cscope_name(expand_T *xp, int idx) } } } - return (char_u *)cs_cmds[i].name; + return cs_cmds[i].name; } case EXP_CSCOPE_FIND: { const char *query_type[] = @@ -112,7 +112,7 @@ char_u *get_cscope_name(expand_T *xp, int idx) // {query_type} can be letters (c, d, ... a) or numbers (0, 1, // ..., 9) but only complete with letters, since numbers are // redundant. - return (char_u *)query_type[idx]; + return (char *)query_type[idx]; } case EXP_CSCOPE_KILL: { static char connection[5]; @@ -128,10 +128,10 @@ char_u *get_cscope_name(expand_T *xp, int idx) } if (current_idx++ == idx) { vim_snprintf(connection, sizeof(connection), "%zu", i); - return (char_u *)connection; + return connection; } } - return (current_idx == idx && idx > 0) ? (char_u *)"-1" : NULL; + return (current_idx == idx && idx > 0) ? "-1" : NULL; } default: return NULL; @@ -962,7 +962,7 @@ static bool cs_find_common(char *opt, char *pat, int forceit, int verbose, bool cmdletter = opt[0]; } - qfpos = (char *)vim_strchr(p_csqf, cmdletter); + qfpos = vim_strchr((char *)p_csqf, cmdletter); if (qfpos != NULL) { qfpos++; // next symbol must be + or - @@ -972,8 +972,7 @@ static bool cs_find_common(char *opt, char *pat, int forceit, int verbose, bool } if (*qfpos != '0' - && apply_autocmds(EVENT_QUICKFIXCMDPRE, (char_u *)"cscope", - curbuf->b_fname, true, curbuf)) { + && apply_autocmds(EVENT_QUICKFIXCMDPRE, "cscope", curbuf->b_fname, true, curbuf)) { if (aborting()) { return false; } @@ -1049,8 +1048,7 @@ static bool cs_find_common(char *opt, char *pat, int forceit, int verbose, bool postponed_split = 0; } - apply_autocmds(EVENT_QUICKFIXCMDPOST, (char_u *)"cscope", - curbuf->b_fname, TRUE, curbuf); + apply_autocmds(EVENT_QUICKFIXCMDPOST, "cscope", curbuf->b_fname, true, curbuf); if (use_ll) { /* * In the location list window, use the displayed location @@ -2008,8 +2006,8 @@ static char *cs_resolve_file(size_t i, char *name) // path in path resolution. csdir = xmalloc(MAXPATHL); STRLCPY(csdir, csinfo[i].fname, - path_tail((char_u *)csinfo[i].fname) - - (char_u *)csinfo[i].fname + 1); + path_tail(csinfo[i].fname) + - csinfo[i].fname + 1); len += STRLEN(csdir); } |