mirror of
https://github.com/neovim/neovim.git
synced 2025-10-05 01:16:31 +00:00
refactor: remove long
long is 32-bits even on 64-bit windows which makes the type suboptimal for a codebase meant to be cross-platform.
This commit is contained in:
@@ -40,7 +40,7 @@
|
||||
/// sentence when found. If the next sentence is found, return OK. Return FAIL
|
||||
/// otherwise. See ":h sentence" for the precise definition of a "sentence"
|
||||
/// text object.
|
||||
int findsent(Direction dir, long count)
|
||||
int findsent(Direction dir, int count)
|
||||
{
|
||||
pos_T pos, tpos;
|
||||
int c;
|
||||
@@ -173,7 +173,7 @@ found:
|
||||
/// @param pincl Return: true if last char is to be included
|
||||
///
|
||||
/// @return true if the next paragraph or section was found.
|
||||
bool findpar(bool *pincl, int dir, long count, int what, bool both)
|
||||
bool findpar(bool *pincl, int dir, int count, int what, bool both)
|
||||
{
|
||||
linenr_T curr;
|
||||
bool first; // true on first line
|
||||
@@ -321,7 +321,7 @@ static int cls(void)
|
||||
/// If eol is true, last word stops at end of line (for operators).
|
||||
///
|
||||
/// @param bigword "W", "E" or "B"
|
||||
int fwd_word(long count, bool bigword, bool eol)
|
||||
int fwd_word(int count, bool bigword, bool eol)
|
||||
{
|
||||
curwin->w_cursor.coladd = 0;
|
||||
cls_bigword = bigword;
|
||||
@@ -375,7 +375,7 @@ int fwd_word(long count, bool bigword, bool eol)
|
||||
/// If stop is true and we are already on the start of a word, move one less.
|
||||
///
|
||||
/// Returns FAIL if top of the file was reached.
|
||||
int bck_word(long count, bool bigword, bool stop)
|
||||
int bck_word(int count, bool bigword, bool stop)
|
||||
{
|
||||
int sclass; // starting class
|
||||
|
||||
@@ -432,7 +432,7 @@ finished:
|
||||
///
|
||||
/// If stop is true and we are already on the end of a word, move one less.
|
||||
/// If empty is true stop on an empty line.
|
||||
int end_word(long count, bool bigword, bool stop, bool empty)
|
||||
int end_word(int count, bool bigword, bool stop, bool empty)
|
||||
{
|
||||
int sclass; // starting class
|
||||
|
||||
@@ -487,7 +487,7 @@ finished:
|
||||
/// @param eol if true, then stop at end of line.
|
||||
///
|
||||
/// @return FAIL if start of the file was reached.
|
||||
int bckend_word(long count, bool bigword, bool eol)
|
||||
int bckend_word(int count, bool bigword, bool eol)
|
||||
{
|
||||
curwin->w_cursor.coladd = 0;
|
||||
cls_bigword = bigword;
|
||||
@@ -569,7 +569,7 @@ static void find_first_blank(pos_T *posp)
|
||||
/// Skip count/2 sentences and count/2 separating white spaces.
|
||||
///
|
||||
/// @param at_start_sent cursor is at start of sentence
|
||||
static void findsent_forward(long count, bool at_start_sent)
|
||||
static void findsent_forward(int count, bool at_start_sent)
|
||||
{
|
||||
while (count--) {
|
||||
findsent(FORWARD, 1L);
|
||||
@@ -588,7 +588,7 @@ static void findsent_forward(long count, bool at_start_sent)
|
||||
///
|
||||
/// @param include true: include word and white space
|
||||
/// @param bigword false == word, true == WORD
|
||||
int current_word(oparg_T *oap, long count, bool include, bool bigword)
|
||||
int current_word(oparg_T *oap, int count, bool include, bool bigword)
|
||||
{
|
||||
pos_T start_pos;
|
||||
bool inclusive = true;
|
||||
@@ -727,7 +727,7 @@ int current_word(oparg_T *oap, long count, bool include, bool bigword)
|
||||
|
||||
/// Find sentence(s) under the cursor, cursor at end.
|
||||
/// When Visual active, extend it by one or more sentences.
|
||||
int current_sent(oparg_T *oap, long count, bool include)
|
||||
int current_sent(oparg_T *oap, int count, bool include)
|
||||
{
|
||||
pos_T start_pos;
|
||||
pos_T pos;
|
||||
@@ -839,7 +839,7 @@ extend:
|
||||
}
|
||||
}
|
||||
if (ncount > 0) {
|
||||
findsent_forward(ncount, true);
|
||||
findsent_forward((int)ncount, true);
|
||||
} else {
|
||||
decl(&curwin->w_cursor);
|
||||
}
|
||||
@@ -890,7 +890,7 @@ extend:
|
||||
/// @param include true == include white space
|
||||
/// @param what '(', '{', etc.
|
||||
/// @param other ')', '}', etc.
|
||||
int current_block(oparg_T *oap, long count, bool include, int what, int other)
|
||||
int current_block(oparg_T *oap, int count, bool include, int what, int other)
|
||||
{
|
||||
pos_T old_pos;
|
||||
pos_T *pos = NULL;
|
||||
@@ -1081,9 +1081,9 @@ static bool in_html_tag(bool end_tag)
|
||||
/// Find tag block under the cursor, cursor at end.
|
||||
///
|
||||
/// @param include true == include white space
|
||||
int current_tagblock(oparg_T *oap, long count_arg, bool include)
|
||||
int current_tagblock(oparg_T *oap, int count_arg, bool include)
|
||||
{
|
||||
long count = count_arg;
|
||||
int count = count_arg;
|
||||
pos_T old_pos;
|
||||
pos_T start_pos;
|
||||
pos_T end_pos;
|
||||
@@ -1265,7 +1265,7 @@ theend:
|
||||
|
||||
/// @param include true == include white space
|
||||
/// @param type 'p' for paragraph, 'S' for section
|
||||
int current_par(oparg_T *oap, long count, bool include, int type)
|
||||
int current_par(oparg_T *oap, int count, bool include, int type)
|
||||
{
|
||||
linenr_T start_lnum;
|
||||
linenr_T end_lnum;
|
||||
@@ -1292,7 +1292,7 @@ extend:
|
||||
} else {
|
||||
dir = FORWARD;
|
||||
}
|
||||
for (i = (int)count; --i >= 0;) {
|
||||
for (i = count; --i >= 0;) {
|
||||
if (start_lnum ==
|
||||
(dir == BACKWARD ? 1 : curbuf->b_ml.ml_line_count)) {
|
||||
retval = FAIL;
|
||||
@@ -1357,7 +1357,7 @@ extend:
|
||||
}
|
||||
|
||||
end_lnum--;
|
||||
i = (int)count;
|
||||
i = count;
|
||||
if (!include && white_in_front) {
|
||||
i--;
|
||||
}
|
||||
@@ -1485,7 +1485,7 @@ static int find_prev_quote(char *line, int col_start, int quotechar, char *escap
|
||||
/// @param quotechar Quote character
|
||||
///
|
||||
/// @return true if found, else false.
|
||||
bool current_quote(oparg_T *oap, long count, bool include, int quotechar)
|
||||
bool current_quote(oparg_T *oap, int count, bool include, int quotechar)
|
||||
FUNC_ATTR_NONNULL_ALL
|
||||
{
|
||||
char *line = get_cursor_line_ptr();
|
||||
|
Reference in New Issue
Block a user