summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-01-30 21:29:58 +0100
committerBram Moolenaar <Bram@vim.org>2016-01-30 21:29:58 +0100
commitb638a7be952544ceb03052c25b84224577a6494b (patch)
tree4a37ca954a03fba25f9e7a81b7f54cf23c1013cb
parent764b23c8fd3369cb05ae9122abf3ca16fec539d7 (diff)
patch 7.4.1215v7.4.1215
Problem: Using old style function declarations. Solution: Change to new style function declarations. (script by Hirohito Higashi)
-rw-r--r--runtime/doc/doctags.c4
-rw-r--r--runtime/tools/xcmdsrv_client.c54
-rw-r--r--src/po/sjiscorr.c4
-rw-r--r--src/version.c38
-rw-r--r--src/winclip.c20
-rw-r--r--src/window.c593
-rw-r--r--src/workshop.c36
-rw-r--r--src/xpm_w32.c8
-rw-r--r--src/xxd/xxd.c25
9 files changed, 324 insertions, 458 deletions
diff --git a/runtime/doc/doctags.c b/runtime/doc/doctags.c
index 9213dd9c1e..53bf33c1d9 100644
--- a/runtime/doc/doctags.c
+++ b/runtime/doc/doctags.c
@@ -14,9 +14,7 @@
#define LINELEN 200
int
-main(argc, argv)
- int argc;
- char **argv;
+main(int argc, char **argv)
{
char line[LINELEN];
char *p1, *p2;
diff --git a/runtime/tools/xcmdsrv_client.c b/runtime/tools/xcmdsrv_client.c
index 88e8380776..c0a60d2164 100644
--- a/runtime/tools/xcmdsrv_client.c
+++ b/runtime/tools/xcmdsrv_client.c
@@ -94,12 +94,12 @@ static int got_x_error = FALSE;
*/
char *
-sendToVim(dpy, name, cmd, asKeys, code)
- Display *dpy; /* Where to send. */
- char *name; /* Where to send. */
- char *cmd; /* What to send. */
- int asKeys; /* Interpret as keystrokes or expr ? */
- int *code; /* Return code. 0 => OK */
+sendToVim(
+ Display *dpy, /* Where to send. */
+ char *name, /* Where to send. */
+ char *cmd, /* What to send. */
+ int asKeys, /* Interpret as keystrokes or expr ? */
+ int *code) /* Return code. 0 => OK */
{
Window w;
Atom *plist;
@@ -245,8 +245,7 @@ sendToVim(dpy, name, cmd, asKeys, code)
*/
static int
-SendInit(dpy)
- Display *dpy;
+SendInit(Display *dpy)
{
XErrorHandler old_handler;
@@ -289,11 +288,11 @@ SendInit(dpy)
*/
static Window
-LookupName(dpy, name, delete, loose)
- Display *dpy; /* Display whose registry to check. */
- char *name; /* Name of an interpreter. */
- int delete; /* If non-zero, delete info about name. */
- char **loose; /* Do another search matching -999 if not found
+LookupName(
+ Display *dpy, /* Display whose registry to check. */
+ char *name, /* Name of an interpreter. */
+ int delete, /* If non-zero, delete info about name. */
+ char **loose) /* Do another search matching -999 if not found
Return result here if a match is found */
{
unsigned char *regProp, *entry;
@@ -396,11 +395,11 @@ LookupName(dpy, name, delete, loose)
}
static char *
-SendEventProc(dpy, eventPtr, expected, code)
- Display *dpy;
- XEvent *eventPtr; /* Information about event. */
- int expected; /* The one were waiting for */
- int *code; /* Return code. 0 => OK */
+SendEventProc(
+ Display *dpy,
+ XEvent *eventPtr, /* Information about event. */
+ int expected, /* The one were waiting for */
+ int *code) /* Return code. 0 => OK */
{
unsigned char *propInfo;
unsigned char *p;
@@ -535,13 +534,13 @@ SendEventProc(dpy, eventPtr, expected, code)
*/
static int
-AppendPropCarefully(dpy, window, property, value, length)
- Display *dpy; /* Display on which to operate. */
- Window window; /* Window whose property is to
+AppendPropCarefully(
+ Display *dpy, /* Display on which to operate. */
+ Window window, /* Window whose property is to
* be modified. */
- Atom property; /* Name of property. */
- char *value; /* Characters to append to property. */
- int length; /* How much to append */
+ Atom property, /* Name of property. */
+ char *value, /* Characters to append to property. */
+ int length) /* How much to append */
{
XErrorHandler old_handler;
@@ -560,9 +559,7 @@ AppendPropCarefully(dpy, window, property, value, length)
*/
/* ARGSUSED */
static int
-x_error_check(dpy, error_event)
- Display *dpy;
- XErrorEvent *error_event;
+x_error_check(Display *dpy, XErrorEvent *error_event)
{
got_x_error = TRUE;
return 0;
@@ -573,8 +570,7 @@ x_error_check(dpy, error_event)
* Actually just checks if the name ends in a digit.
*/
static int
-IsSerialName(str)
- char *str;
+IsSerialName(char *str)
{
int len = strlen(str);
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