summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-11-12 19:16:46 +0100
committerBram Moolenaar <Bram@vim.org>2016-11-12 19:16:46 +0100
commitd4db7719bdfbc54df396eac08d8cbb2389feacf4 (patch)
treea3f693f685ff8e8d5c7fc5dc0ddeaa865f8d29b2
parentb6be3ea45b3bb260d475ba63620252ce2963c560 (diff)
downloadvim-git-8.0.0081.tar.gz
patch 8.0.0081v8.0.0081
Problem: Inconsistent function names. Solution: Rename do_cscope to ex_cscope. Clean up comments.
-rw-r--r--src/ex_cmds.h8
-rw-r--r--src/ex_docmd.c8
-rw-r--r--src/if_cscope.c129
-rw-r--r--src/proto/if_cscope.pro6
-rw-r--r--src/version.c2
5 files changed, 46 insertions, 107 deletions
diff --git a/src/ex_cmds.h b/src/ex_cmds.h
index 01126baed..3f21d94f9 100644
--- a/src/ex_cmds.h
+++ b/src/ex_cmds.h
@@ -391,10 +391,10 @@ EX(CMD_cquit, "cquit", ex_cquit,
EX(CMD_crewind, "crewind", ex_cc,
RANGE|NOTADR|COUNT|TRLBAR|BANG,
ADDR_LINES),
-EX(CMD_cscope, "cscope", do_cscope,
+EX(CMD_cscope, "cscope", ex_cscope,
EXTRA|NOTRLCOM|XFILE,
ADDR_LINES),
-EX(CMD_cstag, "cstag", do_cstag,
+EX(CMD_cstag, "cstag", ex_cstag,
BANG|TRLBAR|WORD1,
ADDR_LINES),
EX(CMD_cunmap, "cunmap", ex_unmap,
@@ -745,7 +745,7 @@ EX(CMD_lchdir, "lchdir", ex_cd,
EX(CMD_lclose, "lclose", ex_cclose,
RANGE|NOTADR|COUNT|TRLBAR,
ADDR_LINES),
-EX(CMD_lcscope, "lcscope", do_cscope,
+EX(CMD_lcscope, "lcscope", ex_cscope,
EXTRA|NOTRLCOM|XFILE,
ADDR_LINES),
EX(CMD_ldo, "ldo", ex_listdo,
@@ -1249,7 +1249,7 @@ EX(CMD_scriptnames, "scriptnames", ex_scriptnames,
EX(CMD_scriptencoding, "scriptencoding", ex_scriptencoding,
WORD1|TRLBAR|CMDWIN,
ADDR_LINES),
-EX(CMD_scscope, "scscope", do_scscope,
+EX(CMD_scscope, "scscope", ex_scscope,
EXTRA|NOTRLCOM,
ADDR_LINES),
EX(CMD_set, "set", ex_set,
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 6b4e5fb6a..34c21e182 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -243,9 +243,9 @@ static void ex_popup(exarg_T *eap);
# define ex_helpfind ex_ni
#endif
#ifndef FEAT_CSCOPE
-# define do_cscope ex_ni
-# define do_scscope ex_ni
-# define do_cstag ex_ni
+# define ex_cscope ex_ni
+# define ex_scscope ex_ni
+# define ex_cstag ex_ni
#endif
#ifndef FEAT_SYN_HL
# define ex_syntax ex_ni
@@ -10427,7 +10427,7 @@ ex_tag_cmd(exarg_T *eap, char_u *name)
#ifdef FEAT_CSCOPE
if (p_cst && *eap->arg != NUL)
{
- do_cstag(eap);
+ ex_cstag(eap);
return;
}
#endif
diff --git a/src/if_cscope.c b/src/if_cscope.c
index ce6b87f37..31c037187 100644
--- a/src/if_cscope.c
+++ b/src/if_cscope.c
@@ -201,8 +201,6 @@ set_context_in_cscope_cmd(
#endif /* FEAT_CMDL_COMPL */
/*
- * PRIVATE: do_cscope_general
- *
* Find the command, print help if invalid, and then call the corresponding
* command function.
*/
@@ -242,31 +240,28 @@ do_cscope_general(
}
/*
- * PUBLIC: do_cscope
+ * Implementation of ":cscope" and ":lcscope"
*/
void
-do_cscope(exarg_T *eap)
+ex_cscope(exarg_T *eap)
{
do_cscope_general(eap, FALSE);
}
/*
- * PUBLIC: do_scscope
- *
- * same as do_cscope, but splits window, too.
+ * Implementation of ":scscope". Same as ex_cscope(), but splits window, too.
*/
void
-do_scscope(exarg_T *eap)
+ex_scscope(exarg_T *eap)
{
do_cscope_general(eap, TRUE);
}
/*
- * PUBLIC: do_cstag
- *
+ * Implementation of ":cstag"
*/
void
-do_cstag(exarg_T *eap)
+ex_cstag(exarg_T *eap)
{
int ret = FALSE;
@@ -336,13 +331,11 @@ do_cstag(exarg_T *eap)
#endif
}
-} /* do_cscope */
+}
/*
- * PUBLIC: cs_find
- *
- * this simulates a vim_fgets(), but for cscope, returns the next line
+ * This simulates a vim_fgets(), but for cscope, returns the next line
* from the cscope output. should only be called from find_tags()
*
* returns TRUE if eof, FALSE otherwise
@@ -361,9 +354,7 @@ cs_fgets(char_u *buf, int size)
/*
- * PUBLIC: cs_free_tags
- *
- * called only from do_tag(), when popping the tag stack
+ * Called only from do_tag(), when popping the tag stack.
*/
void
cs_free_tags(void)
@@ -373,9 +364,7 @@ cs_free_tags(void)
/*
- * PUBLIC: cs_print_tags
- *
- * called from do_tag()
+ * Called from do_tag().
*/
void
cs_print_tags(void)
@@ -467,12 +456,8 @@ cs_connection(int num, char_u *dbpath, char_u *ppath)
****************************************************************************/
/*
- * PRIVATE: cs_add
- *
- * add cscope database or a directory name (to look for cscope.out)
- * to the cscope connection list
- *
- * MAXPATHL 256
+ * Add cscope database or a directory name (to look for cscope.out)
+ * to the cscope connection list.
*/
static int
cs_add(exarg_T *eap UNUSED)
@@ -508,10 +493,8 @@ cs_stat_emsg(char *fname)
/*
- * PRIVATE: cs_add_common
- *
- * the common routine to add a new cscope connection. called by
- * cs_add() and cs_reset(). i really don't like to do this, but this
+ * The common routine to add a new cscope connection. Called by
+ * cs_add() and cs_reset(). I really don't like to do this, but this
* routine uses a number of goto statements.
*/
static int
@@ -666,9 +649,7 @@ cs_check_for_tags(void)
/*
- * PRIVATE: cs_cnt_connections
- *
- * count the number of cscope connections
+ * Count the number of cscope connections.
*/
static int
cs_cnt_connections(void)
@@ -693,9 +674,7 @@ cs_reading_emsg(
#define CSREAD_BUFSIZE 2048
/*
- * PRIVATE: cs_cnt_matches
- *
- * count the number of matches for a given cscope connection.
+ * Count the number of matches for a given cscope connection.
*/
static int
cs_cnt_matches(int idx)
@@ -754,8 +733,6 @@ cs_cnt_matches(int idx)
/*
- * PRIVATE: cs_create_cmd
- *
* Creates the actual cscope command query from what the user entered.
*/
static char *
@@ -817,8 +794,6 @@ cs_create_cmd(char *csoption, char *pattern)
/*
- * PRIVATE: cs_create_connection
- *
* This piece of code was taken/adapted from nvi. do we need to add
* the BSD license notice?
*/
@@ -1056,8 +1031,6 @@ err_closing:
/*
- * PRIVATE: cs_find
- *
* Query cscope using command line interface. Parse the output and use tselect
* to allow choices. Like Nvi, creates a pipe to send to/from query/cscope.
*
@@ -1102,9 +1075,7 @@ cs_find(exarg_T *eap)
/*
- * PRIVATE: cs_find_common
- *
- * common code for cscope find, shared by cs_find() and do_cstag()
+ * Common code for cscope find, shared by cs_find() and ex_cstag().
*/
static int
cs_find_common(
@@ -1323,9 +1294,7 @@ cs_find_common(
} /* cs_find_common */
/*
- * PRIVATE: cs_help
- *
- * print help
+ * Print help.
*/
static int
cs_help(exarg_T *eap UNUSED)
@@ -1408,9 +1377,7 @@ GetWin32Error(void)
#endif
/*
- * PRIVATE: cs_insert_filelist
- *
- * insert a new cscope database filename into the filelist
+ * Insert a new cscope database filename into the filelist.
*/
static int
cs_insert_filelist(
@@ -1551,9 +1518,7 @@ cs_insert_filelist(
/*
- * PRIVATE: cs_lookup_cmd
- *
- * find cscope command in command table
+ * Find cscope command in command table.
*/
static cscmd_T *
cs_lookup_cmd(exarg_T *eap)
@@ -1582,9 +1547,7 @@ cs_lookup_cmd(exarg_T *eap)
/*
- * PRIVATE: cs_kill
- *
- * nuke em
+ * Nuke em.
*/
static int
cs_kill(exarg_T *eap UNUSED)
@@ -1639,8 +1602,6 @@ cs_kill(exarg_T *eap UNUSED)
/*
- * PRIVATE: cs_kill_execute
- *
* Actually kills a specific cscope connection.
*/
static void
@@ -1659,22 +1620,20 @@ cs_kill_execute(
/*
- * PRIVATE: cs_make_vim_style_matches
- *
- * convert the cscope output into a ctags style entry (as might be found
+ * Convert the cscope output into a ctags style entry (as might be found
* in a ctags tags file). there's one catch though: cscope doesn't tell you
* the type of the tag you are looking for. for example, in Darren Hiebert's
* ctags (the one that comes with vim), #define's use a line number to find the
* tag in a file while function definitions use a regexp search pattern.
*
- * i'm going to always use the line number because cscope does something
+ * I'm going to always use the line number because cscope does something
* quirky (and probably other things i don't know about):
*
* if you have "# define" in your source file, which is
* perfectly legal, cscope thinks you have "#define". this
* will result in a failed regexp search. :(
*
- * besides, even if this particular case didn't happen, the search pattern
+ * Besides, even if this particular case didn't happen, the search pattern
* would still have to be modified to escape all the special regular expression
* characters to comply with ctags formatting.
*/
@@ -1721,9 +1680,7 @@ cs_make_vim_style_matches(
/*
- * PRIVATE: cs_manage_matches
- *
- * this is kind of hokey, but i don't see an easy way round this..
+ * This is kind of hokey, but i don't see an easy way round this.
*
* Store: keep a ptr to the (malloc'd) memory of matches originally
* generated from cs_find(). the matches are originally lines directly
@@ -1801,9 +1758,7 @@ cs_manage_matches(
/*
- * PRIVATE: cs_parse_results
- *
- * parse cscope output
+ * Parse cscope output.
*/
static char *
cs_parse_results(
@@ -1864,9 +1819,7 @@ cs_parse_results(
#ifdef FEAT_QUICKFIX
/*
- * PRIVATE: cs_file_results
- *
- * write cscope find results to file
+ * Write cscope find results to file.
*/
static void
cs_file_results(FILE *f, int *nummatches_a)
@@ -1919,10 +1872,8 @@ cs_file_results(FILE *f, int *nummatches_a)
#endif
/*
- * PRIVATE: cs_fill_results
- *
- * get parsed cscope output and calls cs_make_vim_style_matches to convert
- * into ctags format
+ * Get parsed cscope output and calls cs_make_vim_style_matches to convert
+ * into ctags format.
* When there are no matches sets "*matches_p" to NULL.
*/
static void
@@ -2032,9 +1983,7 @@ cs_pathcomponents(char *path)
}
/*
- * PRIVATE: cs_print_tags_priv
- *
- * called from cs_manage_matches()
+ * Called from cs_manage_matches().
*/
static void
cs_print_tags_priv(char **matches, char **cntxts, int num_matches)
@@ -2182,9 +2131,7 @@ cs_print_tags_priv(char **matches, char **cntxts, int num_matches)
/*
- * PRIVATE: cs_read_prompt
- *
- * read a cscope prompt (basically, skip over the ">> ")
+ * Read a cscope prompt (basically, skip over the ">> ").
*/
static int
cs_read_prompt(int i)
@@ -2280,8 +2227,6 @@ sig_handler SIGDEFARG(sigarg)
#endif
/*
- * PRIVATE: cs_release_csp
- *
* Does the actual free'ing for the cs ptr with an optional flag of whether
* or not to free the filename. Called by cs_kill and cs_reset.
*/
@@ -2408,9 +2353,7 @@ cs_release_csp(int i, int freefnpp)
/*
- * PRIVATE: cs_reset
- *
- * calls cs_kill on all cscope connections then reinits
+ * Calls cs_kill on all cscope connections then reinits.
*/
static int
cs_reset(exarg_T *eap UNUSED)
@@ -2474,8 +2417,6 @@ cs_reset(exarg_T *eap UNUSED)
/*
- * PRIVATE: cs_resolve_file
- *
* Construct the full pathname to a file found in the cscope database.
* (Prepends ppath, if there is one and if it's not already prepended,
* otherwise just uses the name found.)
@@ -2544,9 +2485,7 @@ cs_resolve_file(int i, char *name)
/*
- * PRIVATE: cs_show
- *
- * show all cscope connections
+ * Show all cscope connections.
*/
static int
cs_show(exarg_T *eap UNUSED)
@@ -2579,8 +2518,6 @@ cs_show(exarg_T *eap UNUSED)
/*
- * PUBLIC: cs_end
- *
* Only called when VIM exits to quit any cscope sessions.
*/
void
diff --git a/src/proto/if_cscope.pro b/src/proto/if_cscope.pro
index 3a3b392f5..f9919c4da 100644
--- a/src/proto/if_cscope.pro
+++ b/src/proto/if_cscope.pro
@@ -1,9 +1,9 @@
/* if_cscope.c */
char_u *get_cscope_name(expand_T *xp, int idx);
void set_context_in_cscope_cmd(expand_T *xp, char_u *arg, cmdidx_T cmdidx);
-void do_cscope(exarg_T *eap);
-void do_scscope(exarg_T *eap);
-void do_cstag(exarg_T *eap);
+void ex_cscope(exarg_T *eap);
+void ex_scscope(exarg_T *eap);
+void ex_cstag(exarg_T *eap);
int cs_fgets(char_u *buf, int size);
void cs_free_tags(void);
void cs_print_tags(void);
diff --git a/src/version.c b/src/version.c
index d4b84c5ce..3071edc9d 100644
--- a/src/version.c
+++ b/src/version.c
@@ -765,6 +765,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 81,
+/**/
80,
/**/
79,