diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-01-30 21:29:58 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-01-30 21:29:58 +0100 |
commit | b638a7be952544ceb03052c25b84224577a6494b (patch) | |
tree | 4a37ca954a03fba25f9e7a81b7f54cf23c1013cb /src | |
parent | 764b23c8fd3369cb05ae9122abf3ca16fec539d7 (diff) |
patch 7.4.1215v7.4.1215
Problem: Using old style function declarations.
Solution: Change to new style function declarations. (script by Hirohito
Higashi)
Diffstat (limited to 'src')
-rw-r--r-- | src/po/sjiscorr.c | 4 | ||||
-rw-r--r-- | src/version.c | 38 | ||||
-rw-r--r-- | src/winclip.c | 20 | ||||
-rw-r--r-- | src/window.c | 593 | ||||
-rw-r--r-- | src/workshop.c | 36 | ||||
-rw-r--r-- | src/xpm_w32.c | 8 | ||||
-rw-r--r-- | src/xxd/xxd.c | 25 |
7 files changed, 298 insertions, 426 deletions
diff --git a/src/po/sjiscorr.c b/src/po/sjiscorr.c index b8f7e632ad..a0b09f02f3 100644 --- a/src/po/sjiscorr.c +++ b/src/po/sjiscorr.c @@ -7,9 +7,7 @@ #include <string.h> int -main(argc, argv) - int argc; - char **argv; +main(int argc, char **argv); { char buffer[BUFSIZ]; char *p; diff --git a/src/version.c b/src/version.c index 43837f5a25..5c21b6a1d7 100644 --- a/src/version.c +++ b/src/version.c @@ -36,7 +36,7 @@ char longVersion[sizeof(VIM_VERSION_LONG_DATE) + sizeof(__DATE__) + sizeof(__TIME__) + 3]; void -make_version() +make_version(void) { /* * Construct the long version string. Necessary because @@ -747,6 +747,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1215, +/**/ 1214, /**/ 1213, @@ -3192,7 +3194,7 @@ static char *(extra_patches[]) = }; int -highest_patch() +highest_patch(void) { int i; int h = 0; @@ -3208,8 +3210,7 @@ highest_patch() * Return TRUE if patch "n" has been included. */ int -has_patch(n) - int n; +has_patch(int n) { int i; @@ -3221,8 +3222,7 @@ has_patch(n) #endif void -ex_version(eap) - exarg_T *eap; +ex_version(exarg_T *eap) { /* * Ignore a ":version 9.99" command. @@ -3238,7 +3238,7 @@ ex_version(eap) * List all features aligned in columns, dictionary style. */ static void -list_features() +list_features(void) { int i; int ncol; @@ -3305,7 +3305,7 @@ list_features() } void -list_version() +list_version(void) { int i; int first; @@ -3598,8 +3598,7 @@ list_version() * newline, unless the message is too long to fit on the screen anyway. */ static void -version_msg(s) - char *s; +version_msg(char *s) { int len = (int)STRLEN(s); @@ -3616,7 +3615,7 @@ static void do_intro_line(int row, char_u *mesg, int add_version, int attr); * Show the intro message when not editing a file. */ void -maybe_intro_message() +maybe_intro_message(void) { if (bufempty() && curbuf->b_fname == NULL @@ -3633,8 +3632,8 @@ maybe_intro_message() * Or with the ":intro" command (for Sven :-). */ void -intro_message(colon) - int colon; /* TRUE for ":intro" */ +intro_message( + int colon) /* TRUE for ":intro" */ { int i; int row; @@ -3765,11 +3764,11 @@ intro_message(colon) } static void -do_intro_line(row, mesg, add_version, attr) - int row; - char_u *mesg; - int add_version; - int attr; +do_intro_line( + int row, + char_u *mesg, + int add_version, + int attr) { char_u vers[20]; int col; @@ -3842,8 +3841,7 @@ do_intro_line(row, mesg, add_version, attr) * ":intro": clear screen, display intro screen and wait for return. */ void -ex_intro(eap) - exarg_T *eap UNUSED; +ex_intro(exarg_T *eap UNUSED) { screenclear(); intro_message(TRUE); diff --git a/src/winclip.c b/src/winclip.c index f34c7d97ff..8ab723f938 100644 --- a/src/winclip.c +++ b/src/winclip.c @@ -779,11 +779,11 @@ utf16_to_enc(short_u *str, int *lenp) * The result is in allocated memory: "out[outlen]". With terminating NUL. */ void -acp_to_enc(str, str_size, out, outlen) - char_u *str; - int str_size; - char_u **out; - int *outlen; +acp_to_enc( + char_u *str, + int str_size, + char_u **out, + int *outlen) { LPWSTR widestr; @@ -804,11 +804,11 @@ acp_to_enc(str, str_size, out, outlen) * The result is in allocated memory: "out[outlen]". With terminating NUL. */ void -enc_to_acp(str, str_size, out, outlen) - char_u *str; - int str_size; - char_u **out; - int *outlen; +enc_to_acp( + char_u *str, + int str_size, + char_u **out, + int *outlen) { LPWSTR widestr; diff --git a/src/window.c b/src/window.c index a8f5fb42b9..ae17660bf8 100644 --- a/src/window.c +++ b/src/window.c @@ -95,10 +95,10 @@ static char *m_onlyone = N_("Already only one window"); * all CTRL-W window commands are handled here, called from normal_cmd(). */ void -do_window(nchar, Prenum, xchar) - int nchar; - long Prenum; - int xchar; /* extra char from ":wincmd gx" or NUL */ +do_window( + int nchar, + long Prenum, + int xchar) /* extra char from ":wincmd gx" or NUL */ { long Prenum1; win_T *wp; @@ -627,9 +627,7 @@ wingotofile: * Figure out the address type for ":wnncmd". */ void -get_wincmd_addr_type(arg, eap) - char_u *arg; - exarg_T *eap; +get_wincmd_addr_type(char_u *arg, exarg_T *eap) { switch (*arg) { @@ -728,11 +726,11 @@ get_wincmd_addr_type(arg, eap) } static void -cmd_with_count(cmd, bufp, bufsize, Prenum) - char *cmd; - char_u *bufp; - size_t bufsize; - long Prenum; +cmd_with_count( + char *cmd, + char_u *bufp, + size_t bufsize, + long Prenum) { size_t len = STRLEN(cmd); @@ -757,9 +755,7 @@ cmd_with_count(cmd, bufp, bufsize, Prenum) * return FAIL for failure, OK otherwise */ int -win_split(size, flags) - int size; - int flags; +win_split(int size, int flags) { /* When the ":tab" modifier was used open a new tab page instead. */ if (may_open_tabpage() == OK) @@ -790,11 +786,11 @@ win_split(size, flags) * return FAIL for failure, OK otherwise */ int -win_split_ins(size, flags, new_wp, dir) - int size; - int flags; - win_T *new_wp; - int dir; +win_split_ins( + int size, + int flags, + win_T *new_wp, + int dir) { win_T *wp = new_wp; win_T *oldwin; @@ -1334,10 +1330,7 @@ win_split_ins(size, flags, new_wp, dir) * being copied. */ static void -win_init(newp, oldp, flags) - win_T *newp; - win_T *oldp; - int flags UNUSED; +win_init(win_T *newp, win_T *oldp, int flags UNUSED) { int i; @@ -1403,9 +1396,7 @@ win_init(newp, oldp, flags) * Only the essential things are copied. */ static void -win_init_some(newp, oldp) - win_T *newp; - win_T *oldp; +win_init_some(win_T *newp, win_T *oldp) { /* Use the same argument list. */ newp->w_alist = oldp->w_alist; @@ -1423,8 +1414,7 @@ win_init_some(newp, oldp) * Check if "win" is a pointer to an existing window. */ int -win_valid(win) - win_T *win; +win_valid(win_T *win) { win_T *wp; @@ -1440,7 +1430,7 @@ win_valid(win) * Return the number of windows. */ int -win_count() +win_count(void) { win_T *wp; int count = 0; @@ -1457,9 +1447,9 @@ win_count() * (excluding the command line). */ int -make_windows(count, vertical) - int count; - int vertical UNUSED; /* split windows vertically if TRUE */ +make_windows( + int count, + int vertical UNUSED) /* split windows vertically if TRUE */ { int maxcount; int todo; @@ -1529,8 +1519,7 @@ make_windows(count, vertical) * Exchange current and next window */ static void -win_exchange(Prenum) - long Prenum; +win_exchange(long Prenum) { frame_T *frp; frame_T *frp2; @@ -1634,9 +1623,7 @@ win_exchange(Prenum) * if upwards FALSE the first window becomes the second one */ static void -win_rotate(upwards, count) - int upwards; - int count; +win_rotate(int upwards, int count) { win_T *wp1; win_T *wp2; @@ -1723,9 +1710,7 @@ win_rotate(upwards, count) * Move the current window to the very top/bottom/left/right of the screen. */ static void -win_totop(size, flags) - int size; - int flags; +win_totop(int size, int flags) { int dir; int height = curwin->w_height; @@ -1763,8 +1748,7 @@ win_totop(size, flags) * window. Only works within the same frame! */ void -win_move_after(win1, win2) - win_T *win1, *win2; +win_move_after(win_T *win1, win_T *win2) { int height; @@ -1828,10 +1812,10 @@ win_move_after(win1, win2) * rows. */ void -win_equal(next_curwin, current, dir) - win_T *next_curwin; /* pointer to current window to be or NULL */ - int current; /* do only frame with current window */ - int dir; /* 'v' for vertically, 'h' for horizontally, +win_equal( + win_T *next_curwin, /* pointer to current window to be or NULL */ + int current, /* do only frame with current window */ + int dir) /* 'v' for vertically, 'h' for horizontally, 'b' for both, 0 for using p_ead */ { if (dir == 0) @@ -1852,15 +1836,15 @@ win_equal(next_curwin, current, dir) * 'winheight' and 'winwidth' if possible. */ static void -win_equal_rec(next_curwin, current, topfr, dir, col, row, width, height) - win_T *next_curwin; /* pointer to current window to be or NULL */ - int current; /* do only frame with current window */ - frame_T *topfr; /* frame to set size off */ - int dir; /* 'v', 'h' or 'b', see win_equal() */ - int col; /* horizontal position for frame */ - int row; /* vertical position for frame */ - int width; /* new width of frame */ - int height; /* new height of frame */ +win_equal_rec( + win_T *next_curwin, /* pointer to current window to be or NULL */ + int current, /* do only frame with current window */ + frame_T *topfr, /* frame to set size off */ + int dir, /* 'v', 'h' or 'b', see win_equal() */ + int col, /* horizontal position for frame */ + int row, /* vertical position for frame */ + int width, /* new width of frame */ + int height) /* new height of frame */ { int n, m; int extra_sep = 0; @@ -2183,9 +2167,9 @@ win_equal_rec(next_curwin, current, topfr, dir, col, row, width, height) * close all windows for buffer 'buf' */ void -close_windows(buf, keep_curwin) - buf_T *buf; - int keep_curwin; /* don't close "curwin" */ +close_windows( + buf_T *buf, + int keep_curwin) /* don't close "curwin" */ { win_T *wp; tabpage_T *tp, *nexttp; @@ -2244,7 +2228,7 @@ close_windows(buf, keep_curwin) * Returns FALSE if there is a window, possibly in another tab page. */ static int -last_window() +last_window(void) { return (one_window() && first_tabpage->tp_next == NULL); } @@ -2254,7 +2238,7 @@ last_window() * current tab page. */ int -one_window() +one_window(void) { #ifdef FEAT_AUTOCMD win_T *wp; @@ -2280,10 +2264,10 @@ one_window() * Returns TRUE when the window was closed already. */ static int -close_last_window_tabpage(win, free_buf, prev_curtab) - win_T *win; - int free_buf; - tabpage_T *prev_curtab; +close_last_window_tabpage( + win_T *win, + int free_buf, + tabpage_T *prev_curtab) { if (firstwin == lastwin) { @@ -2333,9 +2317,7 @@ close_last_window_tabpage(win, free_buf, prev_curtab) * Returns FAIL when the window was not closed. */ int -win_close(win, free_buf) - win_T *win; - int free_buf; +win_close(win_T *win, int free_buf) { win_T *wp; #ifdef FEAT_AUTOCMD @@ -2557,10 +2539,7 @@ win_close(win, free_buf) * updated. */ void -win_close_othertab(win, free_buf, tp) - win_T *win; - int free_buf; - tabpage_T *tp; +win_close_othertab(win_T *win, int free_buf, tabpage_T *tp) { win_T *wp; int dir; @@ -2620,10 +2599,10 @@ win_close_othertab(win, free_buf, tp) * Returns a pointer to the window that got the freed up space. */ static win_T * -win_free_mem(win, dirp, tp) - win_T *win; - int *dirp; /* set to 'v' or 'h' for direction if 'ea' */ - tabpage_T *tp; /* tab page "win" is in, NULL for current */ +win_free_mem( + win_T *win, + int *dirp, /* set to 'v' or 'h' for direction if 'ea' */ + tabpage_T *tp) /* tab page "win" is in, NULL for current */ { frame_T *frp; win_T *wp; @@ -2644,7 +2623,7 @@ win_free_mem(win, dirp, tp) #if defined(EXITFREE) || defined(PROTO) void -win_free_all() +win_free_all(void) { int dummy; @@ -2675,10 +2654,10 @@ win_free_all() * Returns a pointer to the window that got the freed up space. */ win_T * -winframe_remove(win, dirp, tp) - win_T *win; - int *dirp UNUSED; /* set to 'v' or 'h' for direction if 'ea' */ - tabpage_T *tp; /* tab page "win" is in, NULL for current */ +winframe_remove( + win_T *win, + int *dirp UNUSED, /* set to 'v' or 'h' for direction if 'ea' */ + tabpage_T *tp) /* tab page "win" is in, NULL for current */ { frame_T *frp, *frp2, *frp3; frame_T *frp_close = win->w_frame; @@ -2839,9 +2818,9 @@ winframe_remove(win, dirp, tp) * layout. */ static frame_T * -win_altframe(win, tp) - win_T *win; - tabpage_T *tp; /* tab page "win" is in, NULL for current */ +win_altframe( + win_T *win, + tabpage_T *tp) /* tab page "win" is in, NULL for current */ { frame_T *frp; int b; @@ -2866,7 +2845,7 @@ win_altframe(win, tp) * Return the tabpage that will be used if the current one is closed. */ static tabpage_T * -alt_tabpage() +alt_tabpage(void) { tabpage_T *tp; @@ -2884,8 +2863,7 @@ alt_tabpage() * Find the left-upper window in frame "frp". */ static win_T * -frame2win(frp) - frame_T *frp; +frame2win(frame_T *frp) { while (frp->fr_win == NULL) frp = frp->fr_child; @@ -2896,9 +2874,7 @@ frame2win(frp) * Return TRUE if frame "frp" contains window "wp". */ static int -frame_has_win(frp, wp) - frame_T *frp; - win_T *wp; +frame_has_win(frame_T *frp, win_T *wp) { frame_T *p; @@ -2916,11 +2892,11 @@ frame_has_win(frp, wp) * frames and windows. Caller must take care of positions. */ static void -frame_new_height(topfrp, height, topfirst, wfh) - frame_T *topfrp; - int height; - int topfirst; /* resize topmost contained frame first */ - int wfh; /* obey 'winfixheight' when there is a choice; +frame_new_height( + frame_T *topfrp, + int height, + int topfirst, /* resize topmost contained frame first */ + int wfh) /* obey 'winfixheight' when there is a choice; may cause the height not to be set */ { frame_T *frp; @@ -3027,8 +3003,7 @@ frame_new_height(topfrp, height, topfirst, wfh) * the 'winfixheight' option. */ static int -frame_fixed_height(frp) - frame_T *frp; +frame_fixed_height(frame_T *frp) { /* frame with one window: fixed height if 'winfixheight' set. */ if (frp->fr_win != NULL) @@ -3058,8 +3033,7 @@ frame_fixed_height(frp) * the 'winfixwidth' option. */ static int -frame_fixed_width(frp) - frame_T *frp; +frame_fixed_width(frame_T *frp) { /* frame with one window: fixed width if 'winfixwidth' set. */ if (frp->fr_win != NULL) @@ -3088,8 +3062,7 @@ frame_fixed_width(frp) * Note: Does not check if there is room! */ static void -frame_add_statusline(frp) - frame_T *frp; +frame_add_statusline(frame_T *frp) { win_T *wp; @@ -3123,11 +3096,11 @@ frame_add_statusline(frp) * May remove separator line for windows at the right side (for win_close()). */ static void -frame_new_width(topfrp, width, leftfirst, wfw) - frame_T *topfrp; - int width; - int leftfirst; /* resize leftmost contained frame first */ - int wfw; /* obey 'winfixwidth' when there is a choice; +frame_new_width( + frame_T *topfrp, + int width, + int leftfirst, /* resize leftmost contained frame first */ + int wfw) /* obey 'winfixwidth' when there is a choice; may cause the width not to be set */ { frame_T *frp; @@ -3238,8 +3211,7 @@ frame_new_width(topfrp, width, leftfirst, wfw) * Note: Does not check if there is room! */ static void -frame_add_vsep(frp) - frame_T *frp; +frame_add_vsep(frame_T *frp) { win_T *wp; @@ -3273,8 +3245,7 @@ frame_add_vsep(frp) * Set frame width from the window it contains. */ static void -frame_fix_width(wp) - win_T *wp; +frame_fix_width(win_T *wp) { wp->w_frame->fr_width = wp->w_width + wp->w_vsep_width; } @@ -3284,8 +3255,7 @@ frame_fix_width(wp) * Set frame height from the window it contains. */ static void -frame_fix_height(wp) - win_T *wp; +frame_fix_height(win_T *wp) { wp->w_frame->fr_height = wp->w_height + wp->w_status_height; } @@ -3298,9 +3268,7 @@ frame_fix_height(wp) * window. */ static int -frame_minheight(topfrp, next_curwin) - frame_T *topfrp; - win_T *next_curwin; +frame_minheight(frame_T *topfrp, win_T *next_curwin) { frame_T *frp; int m; @@ -3353,9 +3321,9 @@ frame_minheight(topfrp, next_curwin) * window. */ static int -frame_minwidth(topfrp, next_curwin) - frame_T *topfrp; - win_T *next_curwin; /* use p_wh and p_wiw for next_curwin */ +frame_minwidth( + frame_T *topfrp, + win_T *next_curwin) /* use p_wh and p_wiw for next_curwin */ { frame_T *frp; int m, n; @@ -3405,9 +3373,9 @@ frame_minwidth(topfrp, next_curwin) * Used by ":bdel" and ":only". */ void -close_others(message, forceit) - int message; - int forceit; /* always hide all other windows */ +close_others( + int message, + int forceit) /* always hide all other windows */ { win_T *wp; win_T *nextwp; @@ -3473,14 +3441,13 @@ close_others(message, forceit) * Called when a new file is being edited. */ void -curwin_init() +curwin_init(void) { win_init_empty(curwin); } void -win_init_empty(wp) - win_T *wp; +win_init_empty(win_T *wp) { redraw_win_later(wp, NOT_VALID); wp->w_lines_valid = 0; @@ -3515,7 +3482,7 @@ win_init_empty(wp) * Return FAIL when something goes wrong (out of memory). */ int -win_alloc_first() +win_alloc_first(void) { if (win_alloc_firstwin(NULL) == FAIL) return FAIL; @@ -3537,7 +3504,7 @@ win_alloc_first() * window is fully initialized, thus it can't be in win_alloc_first(). */ void -win_alloc_aucmd_win() +win_alloc_aucmd_win(void) { aucmd_win = win_alloc(NULL, TRUE); if (aucmd_win != NULL) @@ -3557,8 +3524,7 @@ win_alloc_aucmd_win() * Return FAIL when something goes wrong (out of memory). */ static int -win_alloc_firstwin(oldwin) - win_T *oldwin; +win_alloc_firstwin(win_T *oldwin) { curwin = win_alloc(NULL, FALSE); if (oldwin == NULL) @@ -3622,7 +3588,7 @@ new_frame(win_T *wp) * Initialize the window and frame size to the maximum. */ void -win_init_size() +win_init_size(void) { firstwin->w_height = ROWS_AVAIL; topframe->fr_height = ROWS_AVAIL; @@ -3639,7 +3605,7 @@ win_init_size() * Returns NULL when out of memory. */ static tabpage_T * -alloc_tabpage() +alloc_tabpage(void) { tabpage_T *tp; # ifdef FEAT_GUI @@ -3675,8 +3641,7 @@ alloc_tabpage() } void -free_tabpage(tp) - tabpage_T *tp; +free_tabpage(tabpage_T *tp) { int idx; @@ -3710,8 +3675,7 @@ free_tabpage(tp) * Return FAIL or OK. */ int -win_new_tabpage(after) - int after; +win_new_tabpage(int after) { tabpage_T *tp = curtab; tabpage_T *newtp; @@ -3784,7 +3748,7 @@ win_new_tabpage(after) * Returns OK if a new tab page was created, FAIL otherwise. */ int -may_open_tabpage() +may_open_tabpage(void) { int n = (cmdmod.tab == 0) ? postponed_split_tab : cmdmod.tab; @@ -3802,8 +3766,7 @@ may_open_tabpage() * Returns the number of resulting tab pages. */ int -make_tabpages(maxcount) - int maxcount; +make_tabpages(int maxcount) { int count = maxcount; int todo; @@ -3836,8 +3799,7 @@ make_tabpages(maxcount) * Return TRUE when "tpc" points to a valid tab page. */ int -valid_tabpage(tpc) - tabpage_T *tpc; +valid_tabpage(tabpage_T *tpc) { tabpage_T *tp; @@ -3851,8 +3813,7 @@ valid_tabpage(tpc) * Find tab page "n" (first one is 1). Returns NULL when not found. */ tabpage_T * -find_tabpage(n) - int n; +find_tabpage(int n) { tabpage_T *tp; int i = 1; @@ -3867,8 +3828,7 @@ find_tabpage(n) * When not found returns number of tab pages plus one. */ int -tabpage_index(ftp) - tabpage_T *ftp; +tabpage_index(tabpage_T *ftp) { int i = 1; tabpage_T *tp; @@ -3885,10 +3845,10 @@ tabpage_index(ftp) * Careful: When OK is returned need to get a new tab page very very soon! */ static int -leave_tabpage(new_curbuf, trigger_leave_autocmds) - buf_T *new_curbuf UNUSED; /* what is going to be the new curbuf, +leave_tabpage( + buf_T *new_curbuf UNUSED, /* what is going to be the new curbuf, NULL if unknown */ - int trigger_leave_autocmds UNUSED; + int trigger_leave_autocmds UNUSED) { tabpage_T *tp = curtab; @@ -3933,11 +3893,11 @@ leave_tabpage(new_curbuf, trigger_leave_autocmds) * Only trigger *Leave autocommands when trigger_leave_autocmds is TRUE. */ static void -enter_tabpage(tp, old_curbuf, trigger_enter_autocmds, trigger_leave_autocmds) - tabpage_T *tp; - buf_T *old_curbuf UNUSED; - int trigger_enter_autocmds UNUSED; - int trigger_leave_autocmds UNUSED; +enter_tabpage( + tabpage_T *tp, + buf_T *old_curbuf UNUSED, + int trigger_enter_autocmds UNUSED, + int trigger_leave_autocmds UNUSED) { int old_off = tp->tp_firstwin->w_winrow; win_T *next_prevwin = tp->tp_prevwin; @@ -4002,8 +3962,7 @@ enter_tabpage(tp, old_curbuf, trigger_enter_autocmds, trigger_leave_autocmds) * When "n" is 9999 go to the last tab page. */ void -goto_tabpage(n) - int n; +goto_tabpage(int n) { tabpage_T *tp; tabpage_T *ttp; @@ -4082,10 +4041,10 @@ goto_tabpage(n) * Note: doesn't update the GUI tab. */ void -goto_tabpage_tp(tp, trigger_enter_autocmds, trigger_leave_autocmds) - tabpage_T *tp; - int trigger_enter_autocmds; - int trigger_leave_autocmds; +goto_tabpage_tp( + tabpage_T *tp, + int trigger_enter_autocmds, + int trigger_leave_autocmds) { /* Don't repeat a message in another tab page. */ set_keep_msg(NULL, 0); @@ -4107,9 +4066,7 @@ goto_tabpage_tp(tp, trigger_enter_autocmds, trigger_leave_autocmds) * Also updates the GUI tab. */ void -goto_tabpage_win(tp, wp) - tabpage_T *tp; - win_T *wp; +goto_tabpage_win(tabpage_T *tp, win_T *wp) { goto_tabpage_tp(tp, TRUE, TRUE); if (curtab == tp && win_valid(wp)) @@ -4126,8 +4083,7 @@ goto_tabpage_win(tp, wp) * Move the current tab page to after tab page "nr". */ void -tabpage_move(nr) - int nr; +tabpage_move(int nr) { int n = 1; tabpage_T *tp, *tp_dst; @@ -4182,8 +4138,7 @@ tabpage_move(nr) * position to keep the same Visual area. */ void -win_goto(wp) - win_T *wp; +win_goto(win_T *wp) { #ifdef FEAT_CONCEAL win_T *owp = curwin; @@ -4224,8 +4179,7 @@ win_goto(wp) * Find window number "winnr" (counting top to bottom). */ win_T * -win_find_nr(winnr) - int winnr; +win_find_nr(int winnr) { win_T *wp; @@ -4246,8 +4200,7 @@ win_find_nr(winnr) * Find the tabpage for window "win". */ tabpage_T * -win_find_tabpage(win) - win_T *win; +win_find_tabpage(win_T *win) { win_T *wp; tabpage_T *tp; @@ -4266,9 +4219,9 @@ win_find_tabpage(win) * Move to window above or below "count" times. */ static void -win_goto_ver(up, count) - int up; /* TRUE to go to win above */ - long count; +win_goto_ver( + int up, /* TRUE to go to win above */ + long count) { frame_T *fr; frame_T *nfr; @@ -4329,9 +4282,9 @@ end: * Move to left or right window. */ static void -win_goto_hor(left, count) - int left; /* TRUE to go to left win */ - long count; +win_goto_hor( + int left, /* TRUE to go to left win */ + long count) { frame_T *fr; frame_T *nfr; @@ -4393,9 +4346,7 @@ end: * Make window "wp" the current window. */ void -win_enter(wp, undo_sync) - win_T *wp; - int undo_sync; +win_enter(win_T *wp, int undo_sync) { win_enter_ext(wp, undo_sync, FALSE, TRUE, TRUE); } @@ -4406,12 +4357,12 @@ win_enter(wp, undo_sync) * been closed and isn't valid. */ static void -win_enter_ext(wp, undo_sync, curwin_invalid, trigger_enter_autocmds, trigger_leave_autocmds) - win_T *wp; - int undo_sync; - int curwin_invalid; - int trigger_enter_autocmds UNUSED; - int trigger_leave_autocmds UNUSED; +win_enter_ext( + win_T *wp, + int undo_sync, + int curwin_invalid, + int trigger_enter_autocmds UNUSED, + int trigger_leave_autocmds UNUSED) { #ifdef FEAT_AUTOCMD int other_buffer = FALSE; @@ -4539,8 +4490,7 @@ win_enter_ext(wp, undo_sync, curwin_invalid, trigger_enter_autocmds, trigger_lea * Returns a pointer to the window found, otherwise NULL. */ win_T * -buf_jump_open_win(buf) - buf_T *buf; +buf_jump_open_win(buf_T *buf) { win_T *wp = NULL; @@ -4563,8 +4513,7 @@ buf_jump_open_win(buf) * Returns a pointer to the window found, otherwise NULL. */ win_T * -buf_jump_open_tab(buf) - buf_T *buf; +buf_jump_open_tab(buf_T *buf) { win_T *wp = buf_jump_open_win(buf); # ifdef FEAT_WINDOWS @@ -4597,9 +4546,7 @@ buf_jump_open_tab(buf) * FALSE. */ static win_T * -win_alloc(after, hidden) - win_T *after UNUSED; - int hidden UNUSED; +win_alloc(win_T *after UNUSED, int hidden UNUSED) { win_T *new_wp; @@ -4689,9 +4636,9 @@ win_alloc(after, hidden) * Remove window 'wp' from the window list and free the structure. */ static void -win_free(wp, tp) - win_T *wp; - tabpage_T *tp; /* tab page "win" is in, NULL for current */ +win_free( + win_T *wp, + tabpage_T *tp) /* tab page "win" is in, NULL for current */ { int i; buf_T *buf; @@ -4810,8 +4757,7 @@ win_free(wp, tp) * Append window "wp" in the window list after window "after". */ void -win_append(after, wp) - win_T *after, *wp; +win_append(win_T *after, win_T *wp) { win_T *before; @@ -4836,9 +4782,9 @@ win_append(after, wp) * Remove a window from the window list. */ void -win_remove(wp, tp) - win_T *wp; - tabpage_T *tp; /* tab page "win" is in, NULL for current */ +win_remove( + win_T *wp, + tabpage_T *tp) /* tab page "win" is in, NULL for current */ { if (wp->w_prev != NULL) wp->w_prev->w_next = wp->w_next; @@ -4858,8 +4804,7 @@ win_remove(wp, tp) * Append frame "frp" in a frame list after frame "after". */ static void -frame_append(after, frp) - frame_T *after, *frp; +frame_append(frame_T *after, frame_T *frp) { frp->fr_next = after->fr_next; after->fr_next = frp; @@ -4872,8 +4817,7 @@ frame_append(after, frp) * Insert frame "frp" in a frame list before frame "before". */ static void -frame_insert(before, frp) - frame_T *before, *frp; +frame_insert(frame_T *before, frame_T *frp) { frp->fr_next = before; frp->fr_prev = before->fr_prev; @@ -4888,8 +4832,7 @@ frame_insert(before, frp) * Remove a frame from a frame list. */ static void -frame_remove(frp) - frame_T *frp; +frame_remove(frame_T *frp) { if (frp->fr_prev != NULL) frp->fr_prev->fr_next = frp->fr_next; @@ -4906,8 +4849,7 @@ frame_remove(frp) * Return FAIL for failure, OK for success. */ int -win_alloc_lines(wp) - win_T *wp; +win_alloc_lines(win_T *wp) { wp->w_lines_valid = 0; wp->w_lines = (wline_T *)alloc_clear((unsigned)(Rows * sizeof(wline_T))); @@ -4920,8 +4862,7 @@ win_alloc_lines(wp) * free lsize arrays for a window */ void -win_free_lsize(wp) - win_T *wp; +win_free_lsize(win_T *wp) { /* TODO: why would wp be NULL here? */ if (wp != NULL) @@ -4936,7 +4877,7 @@ win_free_lsize(wp) * This only does the current tab page, others must be done when made active. */ void -shell_new_rows() +shell_new_rows(void) { int h = (int)ROWS_AVAIL; @@ -4975,7 +4916,7 @@ shell_new_rows() * Called from win_new_shellsize() after Columns changed. */ void -shell_new_columns() +shell_new_columns(void) { if (firstwin == NULL) /* not initialized yet */ return; @@ -5000,8 +4941,7 @@ shell_new_columns() * Save the size of all windows in "gap". */ void -win_size_save(gap) - garray_T *gap; +win_size_save(garray_T *gap) { win_T *wp; @@ -5021,8 +4961,7 @@ win_size_save(gap) * Does not free the growarray. */ void -win_size_restore(gap) - garray_T *gap; +win_size_restore(garray_T *gap) { win_T *wp; int i, j; @@ -5053,7 +4992,7 @@ win_size_restore(gap) * Returns the row just after the last window. */ int -win_comp_pos() +win_comp_pos(void) { int row = tabline_height(); int col = 0; @@ -5069,10 +5008,7 @@ win_comp_pos() * to the bottom-right position plus one. */ static void -frame_comp_pos(topfrp, row, col) - frame_T *topfrp; - int *row; - int *col; +frame_comp_pos(frame_T *topfrp, int *row, int *col) { win_T *wp; frame_T *frp; @@ -5129,8 +5065,7 @@ frame_comp_pos(topfrp, row, col) * fit around it. */ void -win_setheight(height) - int height; +win_setheight(int height) { win_setheight_win(height, curwin); } @@ -5140,9 +5075,7 @@ win_setheight(height) * windows to fit around it. */ void -win_setheight_win(height, win) - int height; - win_T *win; +win_setheight_win(int height, win_T *win) { int row; @@ -5199,9 +5132,7 @@ win_setheight_win(height, win) * At the top level we can also use change the command line height. */ static void -frame_setheight(curfrp, height) - frame_T *curfrp; - int height; +frame_setheight(frame_T *curfrp, int height) { int room; /* total number of lines available */ int take; /* number of lines taken from other windows */ @@ -5379,16 +5310,13 @@ frame_setheight(curfrp, height) * fit around it. */ void -win_setwidth(width) - int width; +wi |