patch 7.4.1211

Problem:    Using old style function declarations.
Solution:   Change to new style function declarations. (script by Hirohito
            Higashi)
This commit is contained in:
Bram Moolenaar
2016-01-30 19:39:49 +01:00
parent 52ea13da0f
commit 9b57814db1
8 changed files with 1151 additions and 1779 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -48,8 +48,7 @@ static void max_topfill(void);
* wp->w_topline changed. * wp->w_topline changed.
*/ */
static void static void
comp_botline(wp) comp_botline(win_T *wp)
win_T *wp;
{ {
int n; int n;
linenr_T lnum; linenr_T lnum;
@@ -129,8 +128,7 @@ comp_botline(wp)
* set. * set.
*/ */
static void static void
redraw_for_cursorline(wp) redraw_for_cursorline(win_T *wp)
win_T *wp;
{ {
if ((wp->w_p_rnu if ((wp->w_p_rnu
#ifdef FEAT_SYN_HL #ifdef FEAT_SYN_HL
@@ -150,7 +148,7 @@ redraw_for_cursorline(wp)
* Used to update the screen before printing a message. * Used to update the screen before printing a message.
*/ */
void void
update_topline_redraw() update_topline_redraw(void)
{ {
update_topline(); update_topline();
if (must_redraw) if (must_redraw)
@@ -161,7 +159,7 @@ update_topline_redraw()
* Update curwin->w_topline to move the cursor onto the screen. * Update curwin->w_topline to move the cursor onto the screen.
*/ */
void void
update_topline() update_topline(void)
{ {
long line_count; long line_count;
int halfheight; int halfheight;
@@ -420,7 +418,7 @@ update_topline()
* When 'scrolljump' is negative use it as a percentage of the window height. * When 'scrolljump' is negative use it as a percentage of the window height.
*/ */
static int static int
scrolljump_value() scrolljump_value(void)
{ {
if (p_sj >= 0) if (p_sj >= 0)
return (int)p_sj; return (int)p_sj;
@@ -432,7 +430,7 @@ scrolljump_value()
* current window. * current window.
*/ */
static int static int
check_top_offset() check_top_offset(void)
{ {
lineoff_T loff; lineoff_T loff;
int n; int n;
@@ -470,7 +468,7 @@ check_top_offset()
} }
void void
update_curswant() update_curswant(void)
{ {
if (curwin->w_set_curswant) if (curwin->w_set_curswant)
{ {
@@ -484,8 +482,7 @@ update_curswant()
* Check if the cursor has moved. Set the w_valid flag accordingly. * Check if the cursor has moved. Set the w_valid flag accordingly.
*/ */
void void
check_cursor_moved(wp) check_cursor_moved(win_T *wp)
win_T *wp;
{ {
if (wp->w_cursor.lnum != wp->w_valid_cursor.lnum) if (wp->w_cursor.lnum != wp->w_valid_cursor.lnum)
{ {
@@ -516,14 +513,13 @@ check_cursor_moved(wp)
* be redrawn. E.g, when changing the 'wrap' option or folding. * be redrawn. E.g, when changing the 'wrap' option or folding.
*/ */
void void
changed_window_setting() changed_window_setting(void)
{ {
changed_window_setting_win(curwin); changed_window_setting_win(curwin);
} }
void void
changed_window_setting_win(wp) changed_window_setting_win(win_T *wp)
win_T *wp;
{ {
wp->w_lines_valid = 0; wp->w_lines_valid = 0;
changed_line_abv_curs_win(wp); changed_line_abv_curs_win(wp);
@@ -535,9 +531,7 @@ changed_window_setting_win(wp)
* Set wp->w_topline to a certain number. * Set wp->w_topline to a certain number.
*/ */
void void
set_topline(wp, lnum) set_topline(win_T *wp, linenr_T lnum)
win_T *wp;
linenr_T lnum;
{ {
#ifdef FEAT_FOLDING #ifdef FEAT_FOLDING
/* go to first of folded lines */ /* go to first of folded lines */
@@ -563,15 +557,14 @@ set_topline(wp, lnum)
* Need to take care of w_botline separately! * Need to take care of w_botline separately!
*/ */
void void
changed_cline_bef_curs() changed_cline_bef_curs(void)
{ {
curwin->w_valid &= ~(VALID_WROW|VALID_WCOL|VALID_VIRTCOL curwin->w_valid &= ~(VALID_WROW|VALID_WCOL|VALID_VIRTCOL
|VALID_CHEIGHT|VALID_TOPLINE); |VALID_CHEIGHT|VALID_TOPLINE);
} }
void void
changed_cline_bef_curs_win(wp) changed_cline_bef_curs_win(win_T *wp)
win_T *wp;
{ {
wp->w_valid &= ~(VALID_WROW|VALID_WCOL|VALID_VIRTCOL wp->w_valid &= ~(VALID_WROW|VALID_WCOL|VALID_VIRTCOL
|VALID_CHEIGHT|VALID_TOPLINE); |VALID_CHEIGHT|VALID_TOPLINE);
@@ -583,15 +576,14 @@ changed_cline_bef_curs_win(wp)
* Need to take care of w_botline separately! * Need to take care of w_botline separately!
*/ */
void void
changed_line_abv_curs() changed_line_abv_curs(void)
{ {
curwin->w_valid &= ~(VALID_WROW|VALID_WCOL|VALID_VIRTCOL|VALID_CROW curwin->w_valid &= ~(VALID_WROW|VALID_WCOL|VALID_VIRTCOL|VALID_CROW
|VALID_CHEIGHT|VALID_TOPLINE); |VALID_CHEIGHT|VALID_TOPLINE);
} }
void void
changed_line_abv_curs_win(wp) changed_line_abv_curs_win(win_T *wp)
win_T *wp;
{ {
wp->w_valid &= ~(VALID_WROW|VALID_WCOL|VALID_VIRTCOL|VALID_CROW wp->w_valid &= ~(VALID_WROW|VALID_WCOL|VALID_VIRTCOL|VALID_CROW
|VALID_CHEIGHT|VALID_TOPLINE); |VALID_CHEIGHT|VALID_TOPLINE);
@@ -601,7 +593,7 @@ changed_line_abv_curs_win(wp)
* Make sure the value of curwin->w_botline is valid. * Make sure the value of curwin->w_botline is valid.
*/ */
void void
validate_botline() validate_botline(void)
{ {
if (!(curwin->w_valid & VALID_BOTLINE)) if (!(curwin->w_valid & VALID_BOTLINE))
comp_botline(curwin); comp_botline(curwin);
@@ -611,21 +603,20 @@ validate_botline()
* Mark curwin->w_botline as invalid (because of some change in the buffer). * Mark curwin->w_botline as invalid (because of some change in the buffer).
*/ */
void void
invalidate_botline() invalidate_botline(void)
{ {
curwin->w_valid &= ~(VALID_BOTLINE|VALID_BOTLINE_AP); curwin->w_valid &= ~(VALID_BOTLINE|VALID_BOTLINE_AP);
} }
void void
invalidate_botline_win(wp) invalidate_botline_win(win_T *wp)
win_T *wp;
{ {
wp->w_valid &= ~(VALID_BOTLINE|VALID_BOTLINE_AP); wp->w_valid &= ~(VALID_BOTLINE|VALID_BOTLINE_AP);
} }
void void
approximate_botline_win(wp) approximate_botline_win(
win_T *wp; win_T *wp)
{ {
wp->w_valid &= ~VALID_BOTLINE; wp->w_valid &= ~VALID_BOTLINE;
} }
@@ -634,7 +625,7 @@ approximate_botline_win(wp)
* Return TRUE if curwin->w_wrow and curwin->w_wcol are valid. * Return TRUE if curwin->w_wrow and curwin->w_wcol are valid.
*/ */
int int
cursor_valid() cursor_valid(void)
{ {
check_cursor_moved(curwin); check_cursor_moved(curwin);
return ((curwin->w_valid & (VALID_WROW|VALID_WCOL)) == return ((curwin->w_valid & (VALID_WROW|VALID_WCOL)) ==
@@ -646,7 +637,7 @@ cursor_valid()
* w_topline must be valid, you may need to call update_topline() first! * w_topline must be valid, you may need to call update_topline() first!
*/ */
void void
validate_cursor() validate_cursor(void)
{ {
check_cursor_moved(curwin); check_cursor_moved(curwin);
if ((curwin->w_valid & (VALID_WCOL|VALID_WROW)) != (VALID_WCOL|VALID_WROW)) if ((curwin->w_valid & (VALID_WCOL|VALID_WROW)) != (VALID_WCOL|VALID_WROW))
@@ -658,7 +649,7 @@ validate_cursor()
* validate w_cline_row. * validate w_cline_row.
*/ */
void void
validate_cline_row() validate_cline_row(void)
{ {
/* /*
* First make sure that w_topline is valid (after moving the cursor). * First make sure that w_topline is valid (after moving the cursor).
@@ -675,8 +666,7 @@ validate_cline_row()
* of wp->w_topline. * of wp->w_topline.
*/ */
static void static void
curs_rows(wp) curs_rows(win_T *wp)
win_T *wp;
{ {
linenr_T lnum; linenr_T lnum;
int i; int i;
@@ -801,7 +791,7 @@ curs_rows(wp)
* Validate curwin->w_virtcol only. * Validate curwin->w_virtcol only.
*/ */
void void
validate_virtcol() validate_virtcol(void)
{ {
validate_virtcol_win(curwin); validate_virtcol_win(curwin);
} }
@@ -810,8 +800,7 @@ validate_virtcol()
* Validate wp->w_virtcol only. * Validate wp->w_virtcol only.
*/ */
void void
validate_virtcol_win(wp) validate_virtcol_win(win_T *wp)
win_T *wp;
{ {
check_cursor_moved(wp); check_cursor_moved(wp);
if (!(wp->w_valid & VALID_VIRTCOL)) if (!(wp->w_valid & VALID_VIRTCOL))
@@ -833,7 +822,7 @@ validate_virtcol_win(wp)
* Validate curwin->w_cline_height only. * Validate curwin->w_cline_height only.
*/ */
static void static void
validate_cheight() validate_cheight(void)
{ {
check_cursor_moved(curwin); check_cursor_moved(curwin);
if (!(curwin->w_valid & VALID_CHEIGHT)) if (!(curwin->w_valid & VALID_CHEIGHT))
@@ -856,7 +845,7 @@ validate_cheight()
* Validate w_wcol and w_virtcol only. * Validate w_wcol and w_virtcol only.
*/ */
void void
validate_cursor_col() validate_cursor_col(void)
{ {
colnr_T off; colnr_T off;
colnr_T col; colnr_T col;
@@ -891,8 +880,7 @@ validate_cursor_col()
* fold column and sign column (these don't move when scrolling horizontally). * fold column and sign column (these don't move when scrolling horizontally).
*/ */
int int
win_col_off(wp) win_col_off(win_T *wp)
win_T *wp;
{ {
return (((wp->w_p_nu || wp->w_p_rnu) ? number_width(wp) + 1 : 0) return (((wp->w_p_nu || wp->w_p_rnu) ? number_width(wp) + 1 : 0)
#ifdef FEAT_CMDWIN #ifdef FEAT_CMDWIN
@@ -913,7 +901,7 @@ win_col_off(wp)
} }
int int
curwin_col_off() curwin_col_off(void)
{ {
return win_col_off(curwin); return win_col_off(curwin);
} }
@@ -924,8 +912,7 @@ curwin_col_off()
* 'cpoptions'. * 'cpoptions'.
*/ */
int int
win_col_off2(wp) win_col_off2(win_T *wp)
win_T *wp;
{ {
if ((wp->w_p_nu || wp->w_p_rnu) && vim_strchr(p_cpo, CPO_NUMCOL) != NULL) if ((wp->w_p_nu || wp->w_p_rnu) && vim_strchr(p_cpo, CPO_NUMCOL) != NULL)
return number_width(wp) + 1; return number_width(wp) + 1;
@@ -933,7 +920,7 @@ win_col_off2(wp)
} }
int int
curwin_col_off2() curwin_col_off2(void)
{ {
return win_col_off2(curwin); return win_col_off2(curwin);
} }
@@ -944,8 +931,8 @@ curwin_col_off2()
* Also updates curwin->w_leftcol. * Also updates curwin->w_leftcol.
*/ */
void void
curs_columns(may_scroll) curs_columns(
int may_scroll; /* when TRUE, may scroll horizontally */ int may_scroll) /* when TRUE, may scroll horizontally */
{ {
int diff; int diff;
int extra; /* offset for first screen line */ int extra; /* offset for first screen line */
@@ -1207,9 +1194,9 @@ curs_columns(may_scroll)
* Scroll the current window down by "line_count" logical lines. "CTRL-Y" * Scroll the current window down by "line_count" logical lines. "CTRL-Y"
*/ */
void void
scrolldown(line_count, byfold) scrolldown(
long line_count; long line_count,
int byfold UNUSED; /* TRUE: count a closed fold as one line */ int byfold UNUSED) /* TRUE: count a closed fold as one line */
{ {
long done = 0; /* total # of physical lines done */ long done = 0; /* total # of physical lines done */
int wrow; int wrow;
@@ -1314,9 +1301,9 @@ scrolldown(line_count, byfold)
* Scroll the current window up by "line_count" logical lines. "CTRL-E" * Scroll the current window up by "line_count" logical lines. "CTRL-E"
*/ */
void void
scrollup(line_count, byfold) scrollup(
long line_count; long line_count,
int byfold UNUSED; /* TRUE: count a closed fold as one line */ int byfold UNUSED) /* TRUE: count a closed fold as one line */
{ {
#if defined(FEAT_FOLDING) || defined(FEAT_DIFF) #if defined(FEAT_FOLDING) || defined(FEAT_DIFF)
linenr_T lnum; linenr_T lnum;
@@ -1396,9 +1383,9 @@ scrollup(line_count, byfold)
* Don't end up with too many filler lines in the window. * Don't end up with too many filler lines in the window.
*/ */
void void
check_topfill(wp, down) check_topfill(
win_T *wp; win_T *wp,
int down; /* when TRUE scroll down when not enough space */ int down) /* when TRUE scroll down when not enough space */
{ {
int n; int n;
@@ -1427,7 +1414,7 @@ check_topfill(wp, down)
* is still visible. * is still visible.
*/ */
static void static void
max_topfill() max_topfill(void)
{ {
int n; int n;
@@ -1449,7 +1436,7 @@ max_topfill()
* cursor off the screen. * cursor off the screen.
*/ */
void void
scrolldown_clamp() scrolldown_clamp(void)
{ {
int end_row; int end_row;
#ifdef FEAT_DIFF #ifdef FEAT_DIFF
@@ -1520,7 +1507,7 @@ scrolldown_clamp()
* off the screen. * off the screen.
*/ */
void void
scrollup_clamp() scrollup_clamp(void)
{ {
int start_row; int start_row;
@@ -1579,8 +1566,7 @@ scrollup_clamp()
* Lines above the first one are incredibly high: MAXCOL. * Lines above the first one are incredibly high: MAXCOL.
*/ */
static void static void
topline_back(lp) topline_back(lineoff_T *lp)
lineoff_T *lp;
{ {
#ifdef FEAT_DIFF #ifdef FEAT_DIFF
if (lp->fill < diff_check_fill(curwin, lp->lnum)) if (lp->fill < diff_check_fill(curwin, lp->lnum))
@@ -1616,8 +1602,7 @@ topline_back(lp)
* Lines below the last one are incredibly high. * Lines below the last one are incredibly high.
*/ */
static void static void
botline_forw(lp) botline_forw(lineoff_T *lp)
lineoff_T *lp;
{ {
#ifdef FEAT_DIFF #ifdef FEAT_DIFF
if (lp->fill < diff_check_fill(curwin, lp->lnum + 1)) if (lp->fill < diff_check_fill(curwin, lp->lnum + 1))
@@ -1655,8 +1640,7 @@ botline_forw(lp)
* When there are no filler lines nothing changes. * When there are no filler lines nothing changes.
*/ */
static void static void
botline_topline(lp) botline_topline(lineoff_T *lp)
lineoff_T *lp;
{ {
if (lp->fill > 0) if (lp->fill > 0)
{ {
@@ -1671,8 +1655,7 @@ botline_topline(lp)
* When there are no filler lines nothing changes. * When there are no filler lines nothing changes.
*/ */
static void static void
topline_botline(lp) topline_botline(lineoff_T *lp)
lineoff_T *lp;
{ {
if (lp->fill > 0) if (lp->fill > 0)
{ {
@@ -1688,9 +1671,7 @@ topline_botline(lp)
* If "always" is TRUE, always set topline (for "zt"). * If "always" is TRUE, always set topline (for "zt").
*/ */
void void
scroll_cursor_top(min_scroll, always) scroll_cursor_top(int min_scroll, int always)
int min_scroll;
int always;
{ {
int scrolled = 0; int scrolled = 0;
int extra = 0; int extra = 0;
@@ -1828,9 +1809,7 @@ scroll_cursor_top(min_scroll, always)
* screen lines for text lines. * screen lines for text lines.
*/ */
void void
set_empty_rows(wp, used) set_empty_rows(win_T *wp, int used)
win_T *wp;
int used;
{ {
#ifdef FEAT_DIFF #ifdef FEAT_DIFF
wp->w_filler_rows = 0; wp->w_filler_rows = 0;
@@ -1863,9 +1842,7 @@ set_empty_rows(wp, used)
* This is messy stuff!!! * This is messy stuff!!!
*/ */
void void
scroll_cursor_bot(min_scroll, set_topbot) scroll_cursor_bot(int min_scroll, int set_topbot)
int min_scroll;
int set_topbot;
{ {
int used; int used;
int scrolled = 0; int scrolled = 0;
@@ -2086,8 +2063,7 @@ scroll_cursor_bot(min_scroll, set_topbot)
* If "atend" is TRUE, also put it halfway at the end of the file. * If "atend" is TRUE, also put it halfway at the end of the file.
*/ */
void void
scroll_cursor_halfway(atend) scroll_cursor_halfway(int atend)
int atend;
{ {
int above = 0; int above = 0;
linenr_T topline; linenr_T topline;
@@ -2171,7 +2147,7 @@ scroll_cursor_halfway(atend)
* When called topline must be valid! * When called topline must be valid!
*/ */
void void
cursor_correct() cursor_correct(void)
{ {
int above = 0; /* screen lines above topline */ int above = 0; /* screen lines above topline */
linenr_T topline; linenr_T topline;
@@ -2298,9 +2274,7 @@ static void get_scroll_overlap(lineoff_T *lp, int dir);
* return FAIL for failure, OK otherwise * return FAIL for failure, OK otherwise
*/ */
int int
onepage(dir, count) onepage(int dir, long count)
int dir;
long count;
{ {
long n; long n;
int retval = OK; int retval = OK;
@@ -2549,9 +2523,7 @@ onepage(dir, count)
* l3 etc. * l3 etc.
*/ */
static void static void
get_scroll_overlap(lp, dir) get_scroll_overlap(lineoff_T *lp, int dir)
lineoff_T *lp;
int dir;
{ {
int h1, h2, h3, h4; int h1, h2, h3, h4;
int min_height = curwin->w_height - 2; int min_height = curwin->w_height - 2;
@@ -2611,9 +2583,7 @@ get_scroll_overlap(lp, dir)
* Scroll 'scroll' lines up or down. * Scroll 'scroll' lines up or down.
*/ */
void void
halfpage(flag, Prenum) halfpage(int flag, linenr_T Prenum)
int flag;
linenr_T Prenum;
{ {
long scrolled = 0; long scrolled = 0;
int i; int i;
@@ -2831,7 +2801,7 @@ halfpage(flag, Prenum)
#if defined(FEAT_CURSORBIND) || defined(PROTO) #if defined(FEAT_CURSORBIND) || defined(PROTO)
void void
do_check_cursorbind() do_check_cursorbind(void)
{ {
linenr_T line = curwin->w_cursor.lnum; linenr_T line = curwin->w_cursor.lnum;
colnr_T col = curwin->w_cursor.col; colnr_T col = curwin->w_cursor.col;

View File

@@ -561,7 +561,7 @@ static int curPCtype = -1;
* Free netbeans resources. * Free netbeans resources.
*/ */
static void static void
nb_free() nb_free(void)
{ {
keyQ_T *key_node = keyHead.next; keyQ_T *key_node = keyHead.next;
nbbuf_T buf; nbbuf_T buf;
@@ -2355,22 +2355,20 @@ special_keys(char_u *args)
} }
void void
ex_nbclose(eap) ex_nbclose(exarg_T *eap UNUSED)
exarg_T *eap UNUSED;
{ {
netbeans_close(); netbeans_close();
} }
void void
ex_nbkey(eap) ex_nbkey(exarg_T *eap)
exarg_T *eap;
{ {
(void)netbeans_keystring(eap->arg); (void)netbeans_keystring(eap->arg);
} }
void void
ex_nbstart(eap) ex_nbstart(
exarg_T *eap; exarg_T *eap)
{ {
#ifdef FEAT_GUI #ifdef FEAT_GUI
# if !defined(FEAT_GUI_X11) && !defined(FEAT_GUI_GTK) \ # if !defined(FEAT_GUI_X11) && !defined(FEAT_GUI_GTK) \
@@ -2572,7 +2570,7 @@ netbeans_open(char *params, int doabort)
* before calling exit. * before calling exit.
*/ */
void void
netbeans_send_disconnect() netbeans_send_disconnect(void)
{ {
char buf[128]; char buf[128];
@@ -3400,8 +3398,7 @@ pos2off(buf_T *buf, pos_T *pos)
* doesn't normally call readfile, we do our own. * doesn't normally call readfile, we do our own.
*/ */
static void static void
print_read_msg(buf) print_read_msg(nbbuf_T *buf)
nbbuf_T *buf;
{ {
int lnum = buf->bufp->b_ml.ml_line_count; int lnum = buf->bufp->b_ml.ml_line_count;
off_t nchars = buf->bufp->b_orig_size; off_t nchars = buf->bufp->b_orig_size;
@@ -3438,9 +3435,7 @@ print_read_msg(buf)
* writing a file. * writing a file.
*/ */
static void static void
print_save_msg(buf, nchars) print_save_msg(nbbuf_T *buf, off_t nchars)
nbbuf_T *buf;
off_t nchars;
{ {
char_u c; char_u c;
char_u *p; char_u *p;

File diff suppressed because it is too large Load Diff

463
src/ops.c
View File

@@ -168,9 +168,7 @@ static char opchars[][3] =
* Must only be called with a valid operator name! * Must only be called with a valid operator name!
*/ */
int int
get_op_type(char1, char2) get_op_type(int char1, int char2)
int char1;
int char2;
{ {
int i; int i;
@@ -192,8 +190,7 @@ get_op_type(char1, char2)
* Return TRUE if operator "op" always works on whole lines. * Return TRUE if operator "op" always works on whole lines.
*/ */
int int
op_on_lines(op) op_on_lines(int op)
int op;
{ {
return opchars[op][2]; return opchars[op][2];
} }
@@ -203,8 +200,7 @@ op_on_lines(op)
* Returns 'g' or 'z' if there is another command character. * Returns 'g' or 'z' if there is another command character.
*/ */
int int
get_op_char(optype) get_op_char(int optype)
int optype;
{ {
return opchars[optype][0]; return opchars[optype][0];
} }
@@ -213,8 +209,7 @@ get_op_char(optype)
* Get second operator command character. * Get second operator command character.
*/ */
int int
get_extra_op_char(optype) get_extra_op_char(int optype)
int optype;
{ {
return opchars[optype][1]; return opchars[optype][1];
} }
@@ -223,10 +218,7 @@ get_extra_op_char(optype)
* op_shift - handle a shift operation * op_shift - handle a shift operation
*/ */
void void
op_shift(oap, curs_top, amount) op_shift(oparg_T *oap, int curs_top, int amount)
oparg_T *oap;
int curs_top;
int amount;
{ {
long i; long i;
int first_char; int first_char;
@@ -320,11 +312,11 @@ op_shift(oap, curs_top, amount)
* leaves cursor on first blank in the line * leaves cursor on first blank in the line
*/ */
void void
shift_line(left, round, amount, call_changed_bytes) shift_line(
int left; int left,
int round; int round,
int amount; int amount,
int call_changed_bytes; /* call changed_bytes() */ int call_changed_bytes) /* call changed_bytes() */
{ {
int count; int count;
int i, j; int i, j;
@@ -375,9 +367,7 @@ shift_line(left, round, amount, call_changed_bytes)
* Leaves cursor on first character in block. * Leaves cursor on first character in block.
*/ */
static void static void
shift_block(oap, amount) shift_block(oparg_T *oap, int amount)
oparg_T *oap;
int amount;
{ {
int left = (oap->op_type == OP_LSHIFT); int left = (oap->op_type == OP_LSHIFT);
int oldstate = State; int oldstate = State;
@@ -562,11 +552,11 @@ shift_block(oap, amount)
* Caller must prepare for undo. * Caller must prepare for undo.
*/ */
static void static void
block_insert(oap, s, b_insert, bdp) block_insert(
oparg_T *oap; oparg_T *oap,
char_u *s; char_u *s,
int b_insert; int b_insert,
struct block_def *bdp; struct block_def *bdp)
{ {
int p_ts; int p_ts;
int count = 0; /* extra spaces to replace a cut TAB */ int count = 0; /* extra spaces to replace a cut TAB */
@@ -687,9 +677,7 @@ block_insert(oap, s, b_insert, bdp)
* op_reindent - handle reindenting a block of lines. * op_reindent - handle reindenting a block of lines.
*/ */
void void
op_reindent(oap, how) op_reindent(oparg_T *oap, int (*how)(void))
oparg_T *oap;
int (*how)(void);
{ {
long i; long i;
char_u *l; char_u *l;
@@ -781,7 +769,7 @@ static char_u *expr_line = NULL;
* Returns '=' when OK, NUL otherwise. * Returns '=' when OK, NUL otherwise.
*/ */
int int
get_expr_register() get_expr_register(void)
{ {
char_u *new_line; char_u *new_line;
@@ -800,8 +788,7 @@ get_expr_register()
* Argument must be an allocated string. * Argument must be an allocated string.
*/ */
void void
set_expr_line(new_line) set_expr_line(char_u *new_line)
char_u *new_line;
{ {
vim_free(expr_line); vim_free(expr_line);
expr_line = new_line; expr_line = new_line;
@@ -812,7 +799,7 @@ set_expr_line(new_line)
* Returns a pointer to allocated memory, or NULL for failure. * Returns a pointer to allocated memory, or NULL for failure.
*/ */
char_u * char_u *
get_expr_line() get_expr_line(void)
{ {
char_u *expr_copy; char_u *expr_copy;
char_u *rv; char_u *rv;
@@ -843,7 +830,7 @@ get_expr_line()
* Get the '=' register expression itself, without evaluating it. * Get the '=' register expression itself, without evaluating it.
*/ */
char_u * char_u *
get_expr_line_src() get_expr_line_src(void)
{ {
if (expr_line == NULL) if (expr_line == NULL)
return NULL; return NULL;
@@ -856,9 +843,9 @@ get_expr_line_src()
* Note: There is no check for 0 (default register), caller should do this * Note: There is no check for 0 (default register), caller should do this
*/ */
int int
valid_yank_reg(regname, writing) valid_yank_reg(
int regname; int regname,
int writing; /* if TRUE check for writable registers */ int writing) /* if TRUE check for writable registers */
{ {
if ( (regname > 0 && ASCII_ISALNUM(regname)) if ( (regname > 0 && ASCII_ISALNUM(regname))
|| (!writing && vim_strchr((char_u *) || (!writing && vim_strchr((char_u *)
@@ -893,9 +880,7 @@ valid_yank_reg(regname, writing)
* If regname is 0 and reading, use previous register * If regname is 0 and reading, use previous register
*/ */
void void
get_yank_register(regname, writing) get_yank_register(int regname, int writing)
int regname;
int writing;
{ {
int i; int i;
@@ -942,8 +927,7 @@ get_yank_register(regname, writing)
* available return zero, otherwise return "regname". * available return zero, otherwise return "regname".
*/ */
int int
may_get_selection(regname) may_get_selection(int regname)
int regname;
{ {
if (regname == '*') if (regname == '*')
{ {
@@ -968,9 +952,9 @@ may_get_selection(regname)
* The returned pointer has allocated memory, use put_register() later. * The returned pointer has allocated memory, use put_register() later.
*/ */
void * void *
get_register(name, copy) get_register(
int name; int name,
int copy; /* make a copy, if FALSE make register empty. */ int copy) /* make a copy, if FALSE make register empty. */
{ {
struct yankreg *reg; struct yankreg *reg;
int i; int i;
@@ -1021,9 +1005,7 @@ get_register(name, copy)
* Put "reg" into register "name". Free any previous contents and "reg". * Put "reg" into register "name". Free any previous contents and "reg".
*/ */
void void
put_register(name, reg) put_register(int name, void *reg)
int name;
void *reg;
{ {
get_yank_register(name, 0); get_yank_register(name, 0);
free_yank_all(); free_yank_all();
@@ -1037,8 +1019,7 @@ put_register(name, reg)
} }
void void
free_register(reg) free_register(void *reg)
void *reg;
{ {
struct yankreg tmp; struct yankreg tmp;
@@ -1054,8 +1035,7 @@ free_register(reg)
* return TRUE if the current yank register has type MLINE * return TRUE if the current yank register has type MLINE
*/ */
int int
yank_register_mline(regname) yank_register_mline(int regname)
int regname;
{ {
if (regname != 0 && !valid_yank_reg(regname, FALSE)) if (regname != 0 && !valid_yank_reg(regname, FALSE))
return FALSE; return FALSE;
@@ -1072,8 +1052,7 @@ yank_register_mline(regname)
* Return FAIL for failure, OK otherwise. * Return FAIL for failure, OK otherwise.
*/ */
int int
do_record(c) do_record(int c)
int c;
{ {
char_u *p; char_u *p;
static int regname; static int regname;
@@ -1133,9 +1112,7 @@ do_record(c)
* return FAIL for failure, OK otherwise * return FAIL for failure, OK otherwise
*/ */
static int static int
stuff_yank(regname, p) stuff_yank(int regname, char_u *p)
int regname;
char_u *p;
{ {
char_u *lp; char_u *lp;
char_u **pp; char_u **pp;
@@ -1191,11 +1168,11 @@ static int execreg_lastc = NUL;
* return FAIL for failure, OK otherwise * return FAIL for failure, OK otherwise
*/ */
int int
do_execreg(regname, colon, addcr, silent) do_execreg(
int regname; int regname,
int colon; /* insert ':' before each line */ int colon, /* insert ':' before each line */
int addcr; /* always add '\n' to end of line */ int addcr, /* always add '\n' to end of line */
int silent; /* set "silent" flag in typeahead buffer */ int silent) /* set "silent" flag in typeahead buffer */
{ {
long i; long i;
char_u *p; char_u *p;
@@ -1317,8 +1294,7 @@ do_execreg(regname, colon, addcr, silent)
* used only after other typeahead has been processed. * used only after other typeahead has been processed.
*/ */
static void static void
put_reedit_in_typebuf(silent) put_reedit_in_typebuf(int silent)
int silent;
{ {
char_u buf[3]; char_u buf[3];
@@ -1347,11 +1323,11 @@ put_reedit_in_typebuf(silent)
* no remapping. * no remapping.
*/ */
static int static int
put_in_typebuf(s, esc, colon, silent) put_in_typebuf(
char_u *s; char_u *s,
int esc; int esc,
int colon; /* add ':' before the line */ int colon, /* add ':' before the line */
int silent; int silent)
{ {
int retval = OK; int retval = OK;
@@ -1386,9 +1362,9 @@ put_in_typebuf(s, esc, colon, silent)
* return FAIL for failure, OK otherwise * return FAIL for failure, OK otherwise
*/ */
int int
insert_reg(regname, literally) insert_reg(
int regname; int regname,
int literally; /* insert literally, not as if typed */ int literally) /* insert literally, not as if typed */
{ {
long i; long i;
int retval = OK; int retval = OK;
@@ -1450,9 +1426,7 @@ insert_reg(regname, literally)
* literally ("literally" TRUE) or interpret is as typed characters. * literally ("literally" TRUE) or interpret is as typed characters.
*/ */
static void static void
stuffescaped(arg, literally) stuffescaped(char_u *arg, int literally)
char_u *arg;
int literally;
{ {
int c; int c;
char_u *start; char_u *start;
@@ -1494,11 +1468,11 @@ stuffescaped(arg, literally)
* value in "argp". * value in "argp".
*/ */
int int
get_spec_reg(regname, argp, allocated, errmsg) get_spec_reg(
int regname; int regname,
char_u **argp; char_u **argp,
int *allocated; /* return: TRUE when value was allocated */ int *allocated, /* return: TRUE when value was allocated */
int errmsg; /* give error message when failing */ int errmsg) /* give error message when failing */
{ {
int cnt; int cnt;
@@ -1581,10 +1555,10 @@ get_spec_reg(regname, argp, allocated, errmsg)
* return FAIL for failure, OK otherwise * return FAIL for failure, OK otherwise
*/ */
int int
cmdline_paste_reg(regname, literally, remcr) cmdline_paste_reg(
int regname; int regname,
int literally; /* Insert text literally instead of "as typed" */ int literally, /* Insert text literally instead of "as typed" */
int remcr; /* don't add CR characters */ int remcr) /* don't add CR characters */
{ {
long i; long i;
@@ -1616,8 +1590,7 @@ cmdline_paste_reg(regname, literally, remcr)
* used always and the clipboard being available. * used always and the clipboard being available.
*/ */
void void
adjust_clip_reg(rp) adjust_clip_reg(int *rp)
int *rp;
{ {
/* If no reg. specified, and "unnamed" or "unnamedplus" is in 'clipboard', /* If no reg. specified, and "unnamed" or "unnamedplus" is in 'clipboard',
* use '*' or '+' reg, respectively. "unnamedplus" prevails. */ * use '*' or '+' reg, respectively. "unnamedplus" prevails. */
@@ -1643,8 +1616,7 @@ adjust_clip_reg(rp)
* Return FAIL if undo failed, OK otherwise. * Return FAIL if undo failed, OK otherwise.
*/ */
int int
op_delete(oap) op_delete(oparg_T *oap)
oparg_T *oap;
{ {
int n; int n;
linenr_T lnum; linenr_T lnum;
@@ -2013,8 +1985,7 @@ setmarks:
* Used for deletion. * Used for deletion.
*/ */
static void static void
mb_adjust_opend(oap) mb_adjust_opend(oparg_T *oap)
oparg_T *oap;
{ {
char_u *p; char_u *p;
@@ -2031,9 +2002,7 @@ mb_adjust_opend(oap)
* Replace a whole area with one character. * Replace a whole area with one character.
*/ */
int int
op_replace(oap, c) op_replace(oparg_T *oap, int c)
oparg_T *oap;
int c;
{ {
int n, numc; int n, numc;
#ifdef FEAT_MBYTE #ifdef FEAT_MBYTE
@@ -2282,8 +2251,7 @@ static int swapchars(int op_type, pos_T *pos, int length);
* Handle the (non-standard vi) tilde operator. Also for "gu", "gU" and "g?". * Handle the (non-standard vi) tilde operator. Also for "gu", "gU" and "g?".
*/ */
void void
op_tilde(oap) op_tilde(oparg_T *oap)
oparg_T *oap;
{ {
pos_T pos; pos_T pos;
struct block_def bd; struct block_def bd;
@@ -2403,10 +2371,7 @@ op_tilde(oap)
* Returns TRUE if some character was changed. * Returns TRUE if some character was changed.
*/ */
static int static int
swapchars(op_type, pos, length) swapchars(int op_type, pos_T *pos, int length)
int op_type;
pos_T *pos;
int length;
{ {
int todo; int todo;
int did_change = 0; int did_change = 0;
@@ -2438,9 +2403,7 @@ swapchars(op_type, pos, length)
* returns TRUE when something actually changed. * returns TRUE when something actually changed.
*/ */
int int
swapchar(op_type, pos) swapchar(int op_type, pos_T *pos)
int op_type;
pos_T *pos;
{ {
int c; int c;
int nc; int nc;
@@ -2510,9 +2473,7 @@ swapchar(op_type, pos)
* op_insert - Insert and append operators for Visual mode. * op_insert - Insert and append operators for Visual mode.
*/ */
void void
op_insert(oap, count1) op_insert(oparg_T *oap, long count1)
oparg_T *oap;
long count1;
{ {
long ins_len, pre_textlen = 0; long ins_len, pre_textlen = 0;
char_u *firstline, *ins_text; char_u *firstline, *ins_text;
@@ -2707,8 +2668,7 @@ op_insert(oap, count1)
* return TRUE if edit() returns because of a CTRL-O command * return TRUE if edit() returns because of a CTRL-O command
*/ */
int int
op_change(oap) op_change(oparg_T *oap)
oparg_T *oap;
{ {
colnr_T l; colnr_T l;
int retval; int retval;
@@ -2860,7 +2820,7 @@ op_change(oap)
* set all the yank registers to empty (called from main()) * set all the yank registers to empty (called from main())
*/ */
void void
init_yank() init_yank(void)
{ {
int i; int i;
@@ -2870,7 +2830,7 @@ init_yank()
#if defined(EXITFREE) || defined(PROTO) #if defined(EXITFREE) || defined(PROTO)
void void
clear_registers() clear_registers(void)
{ {
int i; int i;
@@ -2888,8 +2848,7 @@ clear_registers()
* Called for normal freeing and in case of error. * Called for normal freeing and in case of error.
*/ */
static void static void
free_yank(n) free_yank(long n)
long n;
{ {
if (y_current->y_array != NULL) if (y_current->y_array != NULL)
{ {
@@ -2923,7 +2882,7 @@ free_yank(n)
} }
static void static void
free_yank_all() free_yank_all(void)
{ {
free_yank(y_current->y_size); free_yank(y_current->y_size);
} }
@@ -2937,10 +2896,7 @@ free_yank_all()
* Return FAIL for failure, OK otherwise. * Return FAIL for failure, OK otherwise.
*/ */
int int
op_yank(oap, deleting, mess) op_yank(oparg_T *oap, int deleting, int mess)
oparg_T *oap;
int deleting;
int mess;
{ {
long y_idx; /* index in y_array[] */ long y_idx; /* index in y_array[] */
struct yankreg *curr; /* copy of y_current */ struct yankreg *curr; /* copy of y_current */
@@ -3265,9 +3221,7 @@ fail: /* free the allocated lines */
} }
static int static int
yank_copy_line(bd, y_idx) yank_copy_line(struct block_def *bd, long y_idx)
struct block_def *bd;
long y_idx;
{ {
char_u *pnew; char_u *pnew;
@@ -3290,8 +3244,7 @@ yank_copy_line(bd, y_idx)
* Make a copy of the y_current register to register "reg". * Make a copy of the y_current register to register "reg".
*/ */
static void static void
copy_yank_reg(reg) copy_yank_reg(struct yankreg *reg)
struct yankreg *reg;
{ {
struct yankreg *curr = y_current; struct yankreg *curr = y_current;
long j; long j;
@@ -3323,11 +3276,11 @@ copy_yank_reg(reg)
* PUT_LINE force linewise put (":put") * PUT_LINE force linewise put (":put")
*/ */
void void
do_put(regname, dir, count, flags) do_put(
int regname; int regname,
int dir; /* BACKWARD for 'P', FORWARD for 'p' */ int dir, /* BACKWARD for 'P', FORWARD for 'p' */
long count; long count,
int flags; int flags)
{ {
char_u *ptr; char_u *ptr;
char_u *newp, *oldp; char_u *newp, *oldp;
@@ -4000,7 +3953,7 @@ end:
* there move it left. * there move it left.
*/ */
void void
adjust_cursor_eol() adjust_cursor_eol(void)
{ {
if (curwin->w_cursor.col > 0 if (curwin->w_cursor.col > 0
&& gchar_cursor() == NUL && gchar_cursor() == NUL
@@ -4030,7 +3983,7 @@ adjust_cursor_eol()
* Return TRUE if lines starting with '#' should be left aligned. * Return TRUE if lines starting with '#' should be left aligned.
*/ */
int int
preprocs_left() preprocs_left(void)
{ {
return return
# ifdef FEAT_SMARTINDENT # ifdef FEAT_SMARTINDENT
@@ -4050,8 +4003,7 @@ preprocs_left()
/* Return the character name of the register with the given number */ /* Return the character name of the register with the given number */
int int
get_register_name(num) get_register_name(int num)
int num;
{ {
if (num == -1) if (num == -1)
return '"'; return '"';
@@ -4087,8 +4039,7 @@ get_register_name(num)
* ":dis" and ":registers": Display the contents of the yank registers. * ":dis" and ":registers": Display the contents of the yank registers.
*/ */
void void
ex_display(eap) ex_display(exarg_T *eap)
exarg_T *eap;
{ {
int i, n; int i, n;
long j; long j;
@@ -4251,9 +4202,9 @@ ex_display(eap)
* truncate at end of screen line * truncate at end of screen line
*/ */
static void static void
dis_msg(p, skip_esc) dis_msg(
char_u *p; char_u *p,
int skip_esc; /* if TRUE, ignore trailing ESC */ int skip_esc) /* if TRUE, ignore trailing ESC */
{ {
int n; int n;
#ifdef FEAT_MBYTE #ifdef FEAT_MBYTE
@@ -4292,11 +4243,11 @@ dis_msg(p, skip_esc)
* comment. * comment.
*/ */
static char_u * static char_u *
skip_comment(line, process, include_space, is_comment) skip_comment(
char_u *line; char_u *line,
int process; int process,
int include_space; int include_space,
int *is_comment; int *is_comment)
{ {
char_u *comment_flags = NULL; char_u *comment_flags = NULL;
int lead_len; int lead_len;
@@ -4364,12 +4315,12 @@ skip_comment(line, process, include_space, is_comment)
* return FAIL for failure, OK otherwise * return FAIL for failure, OK otherwise
*/ */
int int
do_join(count, insert_space, save_undo, use_formatoptions, setmark) do_join(
long count; long count,
int insert_space; int insert_space,
int save_undo; int save_undo,
int use_formatoptions UNUSED; int use_formatoptions UNUSED,
int setmark; int setmark)
{ {
char_u *curr = NULL; char_u *curr = NULL;
char_u *curr_start = NULL; char_u *curr_start = NULL;
@@ -4594,12 +4545,12 @@ theend:
* 'leader1' must match 'leader2_len' characters from 'leader2' -- webb * 'leader1' must match 'leader2_len' characters from 'leader2' -- webb
*/ */
static int static int
same_leader(lnum, leader1_len, leader1_flags, leader2_len, leader2_flags) same_leader(
linenr_T lnum; linenr_T lnum,
int leader1_len; int leader1_len,
char_u *leader1_flags; char_u *leader1_flags,
int leader2_len; int leader2_len,
char_u *leader2_flags; char_u *leader2_flags)
{ {
int idx1 = 0, idx2 = 0; int idx1 = 0, idx2 = 0;
char_u *p; char_u *p;
@@ -4669,9 +4620,9 @@ same_leader(lnum, leader1_len, leader1_flags, leader2_len, leader2_flags)
* Implementation of the format operator 'gq'. * Implementation of the format operator 'gq'.
*/ */
void void
op_format(oap, keep_cursor) op_format(
oparg_T *oap; oparg_T *oap,
int keep_cursor; /* keep cursor on same text char */ int keep_cursor) /* keep cursor on same text char */
{ {
long old_line_count = curbuf->b_ml.ml_line_count; long old_line_count = curbuf->b_ml.ml_line_count;
@@ -4742,8 +4693,7 @@ op_format(oap, keep_cursor)
* Implementation of the format operator 'gq' for when using 'formatexpr'. * Implementation of the format operator 'gq' for when using 'formatexpr'.
*/ */
void void
op_formatexpr(oap) op_formatexpr(oparg_T *oap)
oparg_T *oap;
{ {
if (oap->is_VIsual) if (oap->is_VIsual)
/* When there is no change: need to remove the Visual selection */ /* When there is no change: need to remove the Visual selection */
@@ -4756,10 +4706,10 @@ op_formatexpr(oap)
} }
int int
fex_format(lnum, count, c) fex_format(
linenr_T lnum; linenr_T lnum,
long count; long count,
int c; /* character to be inserted */ int c) /* character to be inserted */
{ {
int use_sandbox = was_set_insecurely((char_u *)"formatexpr", int use_sandbox = was_set_insecurely((char_u *)"formatexpr",
OPT_LOCAL); OPT_LOCAL);
@@ -4795,9 +4745,9 @@ fex_format(lnum, count, c)
* first line. * first line.
*/ */
void void
format_lines(line_count, avoid_fex) format_lines(
linenr_T line_count; linenr_T line_count,
int avoid_fex; /* don't use 'formatexpr' */ int avoid_fex) /* don't use 'formatexpr' */
{ {
int max_len; int max_len;
int is_not_par; /* current line not part of parag. */ int is_not_par; /* current line not part of parag. */
@@ -5069,8 +5019,7 @@ format_lines(line_count, avoid_fex)
* Return TRUE if line "lnum" ends in a white character. * Return TRUE if line "lnum" ends in a white character.
*/ */
static int static int
ends_in_white(lnum) ends_in_white(linenr_T lnum)
linenr_T lnum;
{ {
char_u *s = ml_get(lnum); char_u *s = ml_get(lnum);
size_t l; size_t l;
@@ -5093,11 +5042,11 @@ ends_in_white(lnum)
*/ */
#ifdef FEAT_COMMENTS #ifdef FEAT_COMMENTS
static int static int
fmt_check_par(lnum, leader_len, leader_flags, do_comments) fmt_check_par(
linenr_T lnum; linenr_T lnum,
int *leader_len; int *leader_len,
char_u **leader_flags; char_u **leader_flags,
int do_comments; int do_comments)
{ {
char_u *flags = NULL; /* init for GCC */ char_u *flags = NULL; /* init for GCC */
char_u *ptr; char_u *ptr;
@@ -5124,8 +5073,7 @@ fmt_check_par(lnum, leader_len, leader_flags, do_comments)
} }
#else #else
static int static int
fmt_check_par(lnum) fmt_check_par(linenr_T lnum)
linenr_T lnum;
{ {
return (*skipwhite(ml_get(lnum)) == NUL || startPS(lnum, NUL, FALSE)); return (*skipwhite(ml_get(lnum)) == NUL || startPS(lnum, NUL, FALSE));
} }
@@ -5136,8 +5084,7 @@ fmt_check_par(lnum)
* previous line is in the same paragraph. Used for auto-formatting. * previous line is in the same paragraph. Used for auto-formatting.
*/ */
int int
paragraph_start(lnum) paragraph_start(linenr_T lnum)
linenr_T lnum;
{ {
char_u *p; char_u *p;
#ifdef FEAT_COMMENTS #ifdef FEAT_COMMENTS
@@ -5201,11 +5148,11 @@ paragraph_start(lnum)
* that are to be yanked. * that are to be yanked.
*/ */
static void static void
block_prep(oap, bdp, lnum, is_del) block_prep(
oparg_T *oap; oparg_T *oap,
struct block_def *bdp; struct block_def *bdp,
linenr_T lnum; linenr_T lnum,
int is_del; int is_del)
{ {
int incr = 0; int incr = 0;
char_u *pend; char_u *pend;
@@ -5350,10 +5297,10 @@ block_prep(oap, bdp, lnum, is_del)
* Handle the add/subtract operator. * Handle the add/subtract operator.
*/ */
void void
op_addsub(oap, Prenum1, g_cmd) op_addsub(
oparg_T *oap; oparg_T *oap,
linenr_T Prenum1; /* Amount of add/subtract */ linenr_T Prenum1, /* Amount of add/subtract */
int g_cmd; /* was g<c-a>/g<c-x> */ int g_cmd) /* was g<c-a>/g<c-x> */
{ {
pos_T pos; pos_T pos;
struct block_def bd; struct block_def bd;
@@ -5464,11 +5411,11 @@ op_addsub(oap, Prenum1, g_cmd)
* Returns TRUE if some character was changed. * Returns TRUE if some character was changed.
*/ */
static int static int
do_addsub(op_type, pos, length, Prenum1) do_addsub(
int op_type; int op_type,
pos_T *pos; pos_T *pos,
int length; int length,
linenr_T Prenum1; linenr_T Prenum1)
{ {
int col; int col;
char_u *buf1; char_u *buf1;
@@ -5834,9 +5781,7 @@ theend:
#ifdef FEAT_VIMINFO #ifdef FEAT_VIMINFO
int int
read_viminfo_register(virp, force) read_viminfo_register(vir_T *virp, int force)
vir_T *virp;
int force;
{ {
int eof; int eof;
int do_it = TRUE; int do_it = TRUE;
@@ -5971,8 +5916,7 @@ read_viminfo_register(virp, force)
} }
void void
write_viminfo_registers(fp) write_viminfo_registers(FILE *fp)
FILE *fp;
{ {
int i, j; int i, j;
char_u *type; char_u *type;
@@ -6093,7 +6037,7 @@ write_viminfo_registers(fp)
*/ */
#if defined(FEAT_X11) && defined(FEAT_CLIPBOARD) #if defined(FEAT_X11) && defined(FEAT_CLIPBOARD)
void void
x11_export_final_selection() x11_export_final_selection(void)
{ {
Display *dpy; Display *dpy;
char_u *str = NULL; char_u *str = NULL;
@@ -6173,8 +6117,7 @@ x11_export_final_selection()
#endif #endif
void void
clip_free_selection(cbd) clip_free_selection(VimClipboard *cbd)
VimClipboard *cbd;
{ {
struct yankreg *y_ptr = y_current; struct yankreg *y_ptr = y_current;
@@ -6191,8 +6134,7 @@ clip_free_selection(cbd)
* Get the selected text and put it in the gui selection register '*' or '+'. * Get the selected text and put it in the gui selection register '*' or '+'.
*/ */
void void
clip_get_selection(cbd) clip_get_selection(VimClipboard *cbd)
VimClipboard *cbd;
{ {
struct yankreg *old_y_previous, *old_y_current; struct yankreg *old_y_previous, *old_y_current;
pos_T old_cursor; pos_T old_cursor;
@@ -6253,11 +6195,11 @@ clip_get_selection(cbd)
* Convert from the GUI selection string into the '*'/'+' register. * Convert from the GUI selection string into the '*'/'+' register.
*/ */
void void
clip_yank_selection(type, str, len, cbd) clip_yank_selection(
int type; int type,
char_u *str; char_u *str,
long len; long len,
VimClipboard *cbd; VimClipboard *cbd)
{ {
struct yankreg *y_ptr; struct yankreg *y_ptr;
@@ -6277,10 +6219,7 @@ clip_yank_selection(type, str, len, cbd)
* Returns the motion type, or -1 for failure. * Returns the motion type, or -1 for failure.
*/ */
int int
clip_convert_selection(str, len, cbd) clip_convert_selection(char_u **str, long_u *len, VimClipboard *cbd)
char_u **str;
long_u *len;
VimClipboard *cbd;
{ {
char_u *p; char_u *p;
int lnum; int lnum;
@@ -6345,7 +6284,7 @@ clip_convert_selection(str, len, cbd)
* If we have written to a clipboard register, send the text to the clipboard. * If we have written to a clipboard register, send the text to the clipboard.
*/ */
static void static void
may_set_selection() may_set_selection(void)
{ {
if (y_current == &(y_regs[STAR_REGISTER]) && clip_star.available) if (y_current == &(y_regs[STAR_REGISTER]) && clip_star.available)
{ {
@@ -6367,9 +6306,7 @@ may_set_selection()
* Replace the contents of the '~' register with str. * Replace the contents of the '~' register with str.
*/ */
void void
dnd_yank_drag_data(str, len) dnd_yank_drag_data(char_u *str, long len)
char_u *str;
long len;
{ {
struct yankreg *curr; struct yankreg *curr;
@@ -6389,9 +6326,7 @@ dnd_yank_drag_data(str, len)
* Returns MAUTO for error. * Returns MAUTO for error.
*/ */
char_u char_u
get_reg_type(regname, reglen) get_reg_type(int regname, long *reglen)
int regname;
long *reglen;
{ {
switch (regname) switch (regname)
{ {
@@ -6436,9 +6371,7 @@ static char_u *getreg_wrap_one_line(char_u *s, int flags);
* Otherwise just return "s". * Otherwise just return "s".
*/ */
static char_u * static char_u *
getreg_wrap_one_line(s, flags) getreg_wrap_one_line(char_u *s, int flags)
char_u *s;
int flags;
{ {
if (flags & GREG_LIST) if (flags & GREG_LIST)
{ {
@@ -6469,9 +6402,7 @@ getreg_wrap_one_line(s, flags)
* GREG_LIST Return a list of lines in place of a single string. * GREG_LIST Return a list of lines in place of a single string.
*/ */
char_u * char_u *
get_reg_contents(regname, flags) get_reg_contents(int regname, int flags)
int regname;
int flags;
{ {
long i; long i;
char_u *retval; char_u *retval;
@@ -6572,12 +6503,12 @@ get_reg_contents(regname, flags)
} }
static int static int
init_write_reg(name, old_y_previous, old_y_current, must_append, yank_type) init_write_reg(
int name; int name,
struct yankreg **old_y_previous; struct yankreg **old_y_previous,
struct yankreg **old_y_current; struct yankreg **old_y_current,
int must_append; int must_append,
int *yank_type UNUSED; int *yank_type UNUSED)
{ {
if (!valid_yank_reg(name, TRUE)) /* check for valid reg name */ if (!valid_yank_reg(name, TRUE)) /* check for valid reg name */
{ {
@@ -6596,10 +6527,10 @@ init_write_reg(name, old_y_previous, old_y_current, must_append, yank_type)
} }
static void static void
finish_write_reg(name, old_y_previous, old_y_current) finish_write_reg(
int name; int name,
struct yankreg *old_y_previous; struct yankreg *old_y_previous,
struct yankreg *old_y_current; struct yankreg *old_y_current)
{ {
# ifdef FEAT_CLIPBOARD # ifdef FEAT_CLIPBOARD
/* Send text of clipboard register to the clipboard. */ /* Send text of clipboard register to the clipboard. */
@@ -6622,23 +6553,23 @@ finish_write_reg(name, old_y_previous, old_y_current)
* If "str" ends in '\n' or '\r', use linewise, otherwise use characterwise. * If "str" ends in '\n' or '\r', use linewise, otherwise use characterwise.
*/ */
void void
write_reg_contents(name, str, maxlen, must_append) write_reg_contents(
int name; int name,
char_u *str; char_u *str,
int maxlen; int maxlen,
int must_append; int must_append)
{ {
write_reg_contents_ex(name, str, maxlen, must_append, MAUTO, 0L); write_reg_contents_ex(name, str, maxlen, must_append, MAUTO, 0L);
} }
void void
write_reg_contents_lst(name, strings, maxlen, must_append, yank_type, block_len) write_reg_contents_lst(
int name; int name,
char_u **strings; char_u **strings,
int maxlen UNUSED; int maxlen UNUSED,
int must_append; int must_append,
int yank_type; int yank_type,
long block_len; long block_len)
{ {
struct yankreg *old_y_previous, *old_y_current; struct yankreg *old_y_previous, *old_y_current;
@@ -6677,13 +6608,13 @@ write_reg_contents_lst(name, strings, maxlen, must_append, yank_type, block_len)
} }
void void
write_reg_contents_ex(name, str, maxlen, must_append, yank_type, block_len) write_reg_contents_ex(
int name; int name,
char_u *str; char_u *str,
int maxlen; int maxlen,
int must_append; int must_append,
int yank_type; int yank_type,
long block_len; long block_len)
{ {
struct yankreg *old_y_previous, *old_y_current; struct yankreg *old_y_previous, *old_y_current;
long len; long len;
@@ -6759,13 +6690,13 @@ write_reg_contents_ex(name, str, maxlen, must_append, yank_type, block_len)
* is appended. * is appended.
*/ */
static void static void
str_to_reg(y_ptr, yank_type, str, len, blocklen, str_list) str_to_reg(
struct yankreg *y_ptr; /* pointer to yank register */ struct yankreg *y_ptr, /* pointer to yank register */
int yank_type; /* MCHAR, MLINE, MBLOCK, MAUTO */ int yank_type, /* MCHAR, MLINE, MBLOCK, MAUTO */
char_u *str; /* string to put in register */ char_u *str, /* string to put in register */
long len; /* length of string */ long len, /* length of string */
long blocklen; /* width of Visual block */ long blocklen, /* width of Visual block */
int str_list; /* TRUE if str is char_u ** */ int str_list) /* TRUE if str is char_u ** */
{ {
int type; /* MCHAR, MLINE or MBLOCK */ int type; /* MCHAR, MLINE or MBLOCK */
int lnum; int lnum;
@@ -6899,8 +6830,7 @@ str_to_reg(y_ptr, yank_type, str, len, blocklen, str_list)
#endif /* FEAT_CLIPBOARD || FEAT_EVAL || PROTO */ #endif /* FEAT_CLIPBOARD || FEAT_EVAL || PROTO */
void void
clear_oparg(oap) clear_oparg(oparg_T *oap)
oparg_T *oap;
{ {
vim_memset(oap, 0, sizeof(oparg_T)); vim_memset(oap, 0, sizeof(oparg_T));
} }
@@ -6922,12 +6852,12 @@ static long line_count_info(char_u *line, long *wc, long *cc, long limit, int eo
* the size of the EOL character. * the size of the EOL character.
*/ */
static long static long
line_count_info(line, wc, cc, limit, eol_size) line_count_info(
char_u *line; char_u *line,
long *wc; long *wc,
long *cc; long *cc,
long limit; long limit,
int eol_size; int eol_size)
{ {
long i; long i;
long words = 0; long words = 0;
@@ -6975,8 +6905,7 @@ line_count_info(line, wc, cc, limit, eol_size)
* When "dict" is not NULL store the info there instead of showing it. * When "dict" is not NULL store the info there instead of showing it.
*/ */
void void
cursor_pos_info(dict) cursor_pos_info(dict_T *dict)
dict_T *dict;
{ {
char_u *p; char_u *p;
char_u buf1[50]; char_u buf1[50];

File diff suppressed because it is too large Load Diff

View File

@@ -746,6 +746,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
1211,
/**/ /**/
1210, 1210,
/**/ /**/