mirror of
https://github.com/neovim/neovim.git
synced 2025-10-05 09:26:30 +00:00
refactor(uncrustify): set maximum number of consecutive newlines to 2 (#18695)
This commit is contained in:
@@ -68,7 +68,6 @@ static void cs_usage_msg(csid_e x)
|
||||
(void)semsg(_("E560: Usage: cs[cope] %s"), cs_cmds[(int)x].usage);
|
||||
}
|
||||
|
||||
|
||||
static enum {
|
||||
EXP_CSCOPE_SUBCMD, // expand ":cscope" sub-commands
|
||||
EXP_SCSCOPE_SUBCMD, // expand ":scscope" sub-commands
|
||||
@@ -169,7 +168,6 @@ void set_context_in_cscope_cmd(expand_T *xp, const char *arg, cmdidx_T cmdidx)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// Find the command, print help if invalid, and then call the corresponding
|
||||
/// command function.
|
||||
///
|
||||
@@ -274,7 +272,6 @@ void ex_cstag(exarg_T *eap)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// This simulates a vim_fgets(), but for cscope, returns the next line
|
||||
/// from the cscope output. should only be called from find_tags()
|
||||
///
|
||||
@@ -292,7 +289,6 @@ bool cs_fgets(char_u *buf, int size)
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/// Called only from do_tag(), when popping the tag stack.
|
||||
void cs_free_tags(void)
|
||||
{
|
||||
@@ -380,7 +376,6 @@ bool cs_connection(int num, char_u *dbpath, char_u *ppath)
|
||||
return false;
|
||||
} // cs_connection
|
||||
|
||||
|
||||
/*
|
||||
* PRIVATE functions
|
||||
****************************************************************************/
|
||||
@@ -408,7 +403,6 @@ static void cs_stat_emsg(char *fname)
|
||||
(void)semsg(_("E563: stat(%s) error: %d"), fname, err);
|
||||
}
|
||||
|
||||
|
||||
/// 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.
|
||||
@@ -520,7 +514,6 @@ add_err:
|
||||
return CSCOPE_FAILURE;
|
||||
}
|
||||
|
||||
|
||||
static bool cs_check_for_connections(void)
|
||||
{
|
||||
return cs_cnt_connections() > 0;
|
||||
@@ -613,7 +606,6 @@ static int cs_cnt_matches(size_t idx)
|
||||
return nlines;
|
||||
}
|
||||
|
||||
|
||||
/// Creates the actual cscope command query from what the user entered.
|
||||
static char *cs_create_cmd(char *csoption, char *pattern)
|
||||
{
|
||||
@@ -680,7 +672,6 @@ static char *cs_create_cmd(char *csoption, char *pattern)
|
||||
return cmd;
|
||||
}
|
||||
|
||||
|
||||
/// This piece of code was taken/adapted from nvi. do we need to add
|
||||
/// the BSD license notice?
|
||||
static int cs_create_connection(size_t i)
|
||||
@@ -879,7 +870,6 @@ err_closing:
|
||||
return CSCOPE_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/// 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.
|
||||
///
|
||||
@@ -918,7 +908,6 @@ static int cs_find(exarg_T *eap)
|
||||
eap->cmdidx == CMD_lcscope, (char_u *)(*eap->cmdlinep));
|
||||
}
|
||||
|
||||
|
||||
/// Common code for cscope find, shared by cs_find() and ex_cstag().
|
||||
static bool cs_find_common(char *opt, char *pat, int forceit, int verbose, bool use_ll,
|
||||
char_u *cmdline)
|
||||
@@ -1119,7 +1108,6 @@ static int cs_help(exarg_T *eap)
|
||||
return CSCOPE_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
static void clear_csinfo(size_t i)
|
||||
{
|
||||
csinfo[i].fname = NULL;
|
||||
@@ -1193,7 +1181,6 @@ static int cs_insert_filelist(char *fname, char *ppath, char *flags, FileInfo *f
|
||||
return (int)i;
|
||||
}
|
||||
|
||||
|
||||
/// Find cscope command in command table.
|
||||
static cscmd_T *cs_lookup_cmd(exarg_T *eap)
|
||||
{
|
||||
@@ -1221,7 +1208,6 @@ static cscmd_T *cs_lookup_cmd(exarg_T *eap)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/// Nuke em.
|
||||
static int cs_kill(exarg_T *eap)
|
||||
{
|
||||
@@ -1281,7 +1267,6 @@ static int cs_kill(exarg_T *eap)
|
||||
return CSCOPE_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/// Actually kills a specific cscope connection.
|
||||
///
|
||||
/// @param i cscope table index
|
||||
@@ -1296,7 +1281,6 @@ static void cs_kill_execute(size_t i, char *cname)
|
||||
cs_release_csp(i, TRUE);
|
||||
}
|
||||
|
||||
|
||||
/// 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
|
||||
@@ -1343,7 +1327,6 @@ static char *cs_make_vim_style_matches(char *fname, char *slno, char *search, ch
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
||||
/// 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
|
||||
@@ -1415,7 +1398,6 @@ static char *cs_manage_matches(char **matches, char **contexts, size_t totmatche
|
||||
return p;
|
||||
}
|
||||
|
||||
|
||||
/// Parse cscope output.
|
||||
static char *cs_parse_results(size_t cnumber, char *buf, int bufsize, char **context,
|
||||
char **linenumber, char **search)
|
||||
@@ -1581,7 +1563,6 @@ static void cs_fill_results(char *tagstr, size_t totmatches, int *nummatches_a,
|
||||
xfree(buf);
|
||||
}
|
||||
|
||||
|
||||
// get the requested path components
|
||||
static char *cs_pathcomponents(char *path)
|
||||
{
|
||||
@@ -1929,7 +1910,6 @@ static void cs_release_csp(size_t i, bool freefnpp)
|
||||
clear_csinfo(i);
|
||||
}
|
||||
|
||||
|
||||
/// Calls cs_kill on all cscope connections then reinits.
|
||||
static int cs_reset(exarg_T *eap)
|
||||
{
|
||||
@@ -1980,7 +1960,6 @@ static int cs_reset(exarg_T *eap)
|
||||
return CSCOPE_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/// 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.)
|
||||
@@ -2031,7 +2010,6 @@ static char *cs_resolve_file(size_t i, char *name)
|
||||
return fullname;
|
||||
}
|
||||
|
||||
|
||||
/// Show all cscope connections.
|
||||
static int cs_show(exarg_T *eap)
|
||||
{
|
||||
@@ -2059,7 +2037,6 @@ static int cs_show(exarg_T *eap)
|
||||
return CSCOPE_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/// Only called when VIM exits to quit any cscope sessions.
|
||||
void cs_end(void)
|
||||
{
|
||||
|
Reference in New Issue
Block a user