changeset 7829:2a8d6b2dd925 v7.4.1211

commit https://github.com/vim/vim/commit/9b57814db13c29ecb08260b36923c0e1c8a373a9 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jan 30 19:39:49 2016 +0100 patch 7.4.1211 Problem: Using old style function declarations. Solution: Change to new style function declarations. (script by Hirohito Higashi)
author Christian Brabandt <cb@256bit.org>
date Sat, 30 Jan 2016 19:45:04 +0100
parents 5330235de65e
children 043b9e07f3f9
files src/misc1.c src/misc2.c src/move.c src/netbeans.c src/normal.c src/ops.c src/option.c src/version.c
diffstat 8 files changed, 1155 insertions(+), 1783 deletions(-) [+]
line wrap: on
line diff
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -30,7 +30,7 @@ static garray_T	ga_users;
  * Count the size (in window cells) of the indent in the current line.
  */
     int
-get_indent()
+get_indent(void)
 {
     return get_indent_str(ml_get_curline(), (int)curbuf->b_p_ts, FALSE);
 }
@@ -39,8 +39,7 @@ get_indent()
  * Count the size (in window cells) of the indent in line "lnum".
  */
     int
-get_indent_lnum(lnum)
-    linenr_T	lnum;
+get_indent_lnum(linenr_T lnum)
 {
     return get_indent_str(ml_get(lnum), (int)curbuf->b_p_ts, FALSE);
 }
@@ -51,9 +50,7 @@ get_indent_lnum(lnum)
  * "buf".
  */
     int
-get_indent_buf(buf, lnum)
-    buf_T	*buf;
-    linenr_T	lnum;
+get_indent_buf(buf_T *buf, linenr_T lnum)
 {
     return get_indent_str(ml_get_buf(buf, lnum, FALSE), (int)buf->b_p_ts, FALSE);
 }
@@ -64,10 +61,10 @@ get_indent_buf(buf, lnum)
  * 'tabstop' at "ts"
  */
     int
-get_indent_str(ptr, ts, list)
-    char_u	*ptr;
-    int		ts;
-    int		list; /* if TRUE, count only screen size for tabs */
+get_indent_str(
+    char_u	*ptr,
+    int		ts,
+    int		list) /* if TRUE, count only screen size for tabs */
 {
     int		count = 0;
 
@@ -101,9 +98,9 @@ get_indent_str(ptr, ts, list)
  * Returns TRUE if the line was changed.
  */
     int
-set_indent(size, flags)
-    int		size;		    /* measured in spaces */
-    int		flags;
+set_indent(
+    int		size,		    /* measured in spaces */
+    int		flags)
 {
     char_u	*p;
     char_u	*newline;
@@ -338,9 +335,7 @@ set_indent(size, flags)
  * Returns TRUE if the line was changed.
  */
     static int
-copy_indent(size, src)
-    int		size;
-    char_u	*src;
+copy_indent(int size, char_u *src)
 {
     char_u	*p = NULL;
     char_u	*line = NULL;
@@ -442,8 +437,7 @@ copy_indent(size, src)
  * Since a pattern is used it can actually handle more than numbers.
  */
     int
-get_number_indent(lnum)
-    linenr_T	lnum;
+get_number_indent(linenr_T lnum)
 {
     colnr_T	col;
     pos_T	pos;
@@ -491,9 +485,9 @@ get_number_indent(lnum)
  * necessarily always the current one.
  */
     int
-get_breakindent_win(wp, line)
-    win_T	*wp;
-    char_u	*line; /* start of the line */
+get_breakindent_win(
+    win_T	*wp,
+    char_u	*line) /* start of the line */
 {
     static int	    prev_indent = 0;  /* cached indent value */
     static long	    prev_ts     = 0L; /* cached tabstop value */
@@ -547,8 +541,7 @@ static int cin_is_cinword(char_u *line);
  * Return TRUE if the string "line" starts with a word from 'cinwords'.
  */
     static int
-cin_is_cinword(line)
-    char_u	*line;
+cin_is_cinword(char_u *line)
 {
     char_u	*cinw;
     char_u	*cinw_buf;
@@ -598,10 +591,10 @@ cin_is_cinword(line)
  * Return TRUE for success, FALSE for failure
  */
     int
-open_line(dir, flags, second_line_indent)
-    int		dir;		/* FORWARD or BACKWARD */
-    int		flags;
-    int		second_line_indent;
+open_line(
+    int		dir,		/* FORWARD or BACKWARD */
+    int		flags,
+    int		second_line_indent)
 {
     char_u	*saved_line;		/* copy of the original line */
     char_u	*next_line = NULL;	/* copy of the next line */
@@ -1662,11 +1655,11 @@ theend:
  * length.
  */
     int
-get_leader_len(line, flags, backward, include_space)
-    char_u	*line;
-    char_u	**flags;
-    int		backward;
-    int		include_space;
+get_leader_len(
+    char_u	*line,
+    char_u	**flags,
+    int		backward,
+    int		include_space)
 {
     int		i, j;
     int		result;
@@ -1807,9 +1800,7 @@ get_leader_len(line, flags, backward, in
  * recognized comment leader.
  */
     int
-get_last_leader_offset(line, flags)
-    char_u	*line;
-    char_u	**flags;
+get_last_leader_offset(char_u *line, char_u **flags)
 {
     int		result = -1;
     int		i, j;
@@ -1950,17 +1941,16 @@ get_last_leader_offset(line, flags)
  * Return the number of window lines occupied by buffer line "lnum".
  */
     int
-plines(lnum)
-    linenr_T	lnum;
+plines(linenr_T lnum)
 {
     return plines_win(curwin, lnum, TRUE);
 }
 
     int
-plines_win(wp, lnum, winheight)
-    win_T	*wp;
-    linenr_T	lnum;
-    int		winheight;	/* when TRUE limit to window height */
+plines_win(
+    win_T	*wp,
+    linenr_T	lnum,
+    int		winheight)	/* when TRUE limit to window height */
 {
 #if defined(FEAT_DIFF) || defined(PROTO)
     /* Check for filler lines above this buffer line.  When folded the result
@@ -1969,17 +1959,16 @@ plines_win(wp, lnum, winheight)
 }
 
     int
-plines_nofill(lnum)
-    linenr_T	lnum;
+plines_nofill(linenr_T lnum)
 {
     return plines_win_nofill(curwin, lnum, TRUE);
 }
 
     int
-plines_win_nofill(wp, lnum, winheight)
-    win_T	*wp;
-    linenr_T	lnum;
-    int		winheight;	/* when TRUE limit to window height */
+plines_win_nofill(
+    win_T	*wp,
+    linenr_T	lnum,
+    int		winheight)	/* when TRUE limit to window height */
 {
 #endif
     int		lines;
@@ -2010,9 +1999,7 @@ plines_win_nofill(wp, lnum, winheight)
  * "wp".  Does not care about folding, 'wrap' or 'diff'.
  */
     int
-plines_win_nofold(wp, lnum)
-    win_T	*wp;
-    linenr_T	lnum;
+plines_win_nofold(win_T *wp, linenr_T lnum)
 {
     char_u	*s;
     long	col;
@@ -2048,10 +2035,7 @@ plines_win_nofold(wp, lnum)
  * used from the start of the line to the given column number.
  */
     int
-plines_win_col(wp, lnum, column)
-    win_T	*wp;
-    linenr_T	lnum;
-    long	column;
+plines_win_col(win_T *wp, linenr_T lnum, long column)
 {
     long	col;
     char_u	*s;
@@ -2106,9 +2090,7 @@ plines_win_col(wp, lnum, column)
 }
 
     int
-plines_m_win(wp, first, last)
-    win_T	*wp;
-    linenr_T	first, last;
+plines_m_win(win_T *wp, linenr_T first, linenr_T last)
 {
     int		count = 0;
 
@@ -2146,8 +2128,7 @@ plines_m_win(wp, first, last)
  * Handles Replace mode and multi-byte characters.
  */
     void
-ins_bytes(p)
-    char_u	*p;
+ins_bytes(char_u *p)
 {
     ins_bytes_len(p, (int)STRLEN(p));
 }
@@ -2160,9 +2141,7 @@ ins_bytes(p)
  * Handles Replace mode and multi-byte characters.
  */
     void
-ins_bytes_len(p, len)
-    char_u	*p;
-    int		len;
+ins_bytes_len(char_u *p, int len)
 {
     int		i;
 # ifdef FEAT_MBYTE
@@ -2193,8 +2172,7 @@ ins_bytes_len(p, len)
  * convert bytes to a character.
  */
     void
-ins_char(c)
-    int		c;
+ins_char(int c)
 {
 #if defined(FEAT_MBYTE) || defined(PROTO)
     char_u	buf[MB_MAXBYTES + 1];
@@ -2211,9 +2189,7 @@ ins_char(c)
 }
 
     void
-ins_char_bytes(buf, charlen)
-    char_u	*buf;
-    int		charlen;
+ins_char_bytes(char_u *buf, int charlen)
 {
     int		c = buf[0];
 #endif
@@ -2398,8 +2374,7 @@ ins_char_bytes(buf, charlen)
  * Caller must have prepared for undo.
  */
     void
-ins_str(s)
-    char_u	*s;
+ins_str(char_u *s)
 {
     char_u	*oldp, *newp;
     int		newlen = (int)STRLEN(s);
@@ -2436,8 +2411,7 @@ ins_str(s)
  * return FAIL for failure, OK otherwise
  */
     int
-del_char(fixpos)
-    int		fixpos;
+del_char(int fixpos)
 {
 #ifdef FEAT_MBYTE
     if (has_mbyte)
@@ -2457,9 +2431,7 @@ del_char(fixpos)
  * Like del_bytes(), but delete characters instead of bytes.
  */
     int
-del_chars(count, fixpos)
-    long	count;
-    int		fixpos;
+del_chars(long count, int fixpos)
 {
     long	bytes = 0;
     long	i;
@@ -2485,10 +2457,10 @@ del_chars(count, fixpos)
  * return FAIL for failure, OK otherwise
  */
     int
-del_bytes(count, fixpos_arg, use_delcombine)
-    long	count;
-    int		fixpos_arg;
-    int		use_delcombine UNUSED;	    /* 'delcombine' option applies */
+del_bytes(
+    long	count,
+    int		fixpos_arg,
+    int		use_delcombine UNUSED)	    /* 'delcombine' option applies */
 {
     char_u	*oldp, *newp;
     colnr_T	oldlen;
@@ -2602,8 +2574,8 @@ del_bytes(count, fixpos_arg, use_delcomb
  * return FAIL for failure, OK otherwise
  */
     int
-truncate_line(fixpos)
-    int		fixpos;	    /* if TRUE fix the cursor position when done */
+truncate_line(
+    int		fixpos)	    /* if TRUE fix the cursor position when done */
 {
     char_u	*newp;
     linenr_T	lnum = curwin->w_cursor.lnum;
@@ -2636,9 +2608,9 @@ truncate_line(fixpos)
  * Saves the lines for undo first if "undo" is TRUE.
  */
     void
-del_lines(nlines, undo)
-    long	nlines;		/* number of lines to delete */
-    int		undo;		/* if TRUE, prepare for undo */
+del_lines(
+    long	nlines,		/* number of lines to delete */
+    int		undo)		/* if TRUE, prepare for undo */
 {
     long	n;
     linenr_T	first = curwin->w_cursor.lnum;
@@ -2673,8 +2645,7 @@ del_lines(nlines, undo)
 }
 
     int
-gchar_pos(pos)
-    pos_T *pos;
+gchar_pos(pos_T *pos)
 {
     char_u	*ptr = ml_get_pos(pos);
 
@@ -2686,7 +2657,7 @@ gchar_pos(pos)
 }
 
     int
-gchar_cursor()
+gchar_cursor(void)
 {
 #ifdef FEAT_MBYTE
     if (has_mbyte)
@@ -2700,8 +2671,7 @@ gchar_cursor()
  * It is directly written into the block.
  */
     void
-pchar_cursor(c)
-    int c;
+pchar_cursor(int c)
 {
     *(ml_get_buf(curbuf, curwin->w_cursor.lnum, TRUE)
 						  + curwin->w_cursor.col) = c;
@@ -2714,8 +2684,7 @@ pchar_cursor(c)
  *		    the line.
  */
     int
-inindent(extra)
-    int	    extra;
+inindent(int extra)
 {
     char_u	*ptr;
     colnr_T	col;
@@ -2732,8 +2701,7 @@ inindent(extra)
  * Skip to next part of an option argument: Skip space and comma.
  */
     char_u *
-skip_to_option_part(p)
-    char_u  *p;
+skip_to_option_part(char_u *p)
 {
     if (*p == ',')
 	++p;
@@ -2751,7 +2719,7 @@ skip_to_option_part(p)
  * Careful: may trigger autocommands that reload the buffer.
  */
     void
-changed()
+changed(void)
 {
 #if defined(FEAT_XIM) && defined(FEAT_GUI_GTK)
     /* The text of the preediting area is inserted, but this doesn't
@@ -2806,7 +2774,7 @@ changed()
  * Internal part of changed(), no user interaction.
  */
     void
-changed_int()
+changed_int(void)
 {
     curbuf->b_changed = TRUE;
     ml_setflags(curbuf);
@@ -2831,9 +2799,7 @@ static void changed_common(linenr_T lnum
  * Careful: may trigger autocommands that reload the buffer.
  */
     void
-changed_bytes(lnum, col)
-    linenr_T	lnum;
-    colnr_T	col;
+changed_bytes(linenr_T lnum, colnr_T col)
 {
     changedOneline(curbuf, lnum);
     changed_common(lnum, col, lnum + 1, 0L);
@@ -2858,9 +2824,7 @@ changed_bytes(lnum, col)
 }
 
     static void
-changedOneline(buf, lnum)
-    buf_T	*buf;
-    linenr_T	lnum;
+changedOneline(buf_T *buf, linenr_T lnum)
 {
     if (buf->b_mod_set)
     {
@@ -2886,9 +2850,7 @@ changedOneline(buf, lnum)
  * Takes care of marking the buffer to be redrawn and sets the changed flag.
  */
     void
-appended_lines(lnum, count)
-    linenr_T	lnum;
-    long	count;
+appended_lines(linenr_T lnum, long count)
 {
     changed_lines(lnum + 1, 0, lnum + 1, count);
 }
@@ -2897,9 +2859,7 @@ appended_lines(lnum, count)
  * Like appended_lines(), but adjust marks first.
  */
     void
-appended_lines_mark(lnum, count)
-    linenr_T	lnum;
-    long	count;
+appended_lines_mark(linenr_T lnum, long count)
 {
     mark_adjust(lnum + 1, (linenr_T)MAXLNUM, count, 0L);
     changed_lines(lnum + 1, 0, lnum + 1, count);
@@ -2911,9 +2871,7 @@ appended_lines_mark(lnum, count)
  * Takes care of marking the buffer to be redrawn and sets the changed flag.
  */
     void
-deleted_lines(lnum, count)
-    linenr_T	lnum;
-    long	count;
+deleted_lines(linenr_T lnum, long count)
 {
     changed_lines(lnum, 0, lnum + count, -count);
 }
@@ -2924,9 +2882,7 @@ deleted_lines(lnum, count)
  * be triggered to display the cursor.
  */
     void
-deleted_lines_mark(lnum, count)
-    linenr_T	lnum;
-    long	count;
+deleted_lines_mark(linenr_T lnum, long count)
 {
     mark_adjust(lnum, (linenr_T)(lnum + count - 1), (long)MAXLNUM, -count);
     changed_lines(lnum, 0, lnum + count, -count);
@@ -2945,11 +2901,11 @@ deleted_lines_mark(lnum, count)
  * Careful: may trigger autocommands that reload the buffer.
  */
     void
-changed_lines(lnum, col, lnume, xtra)
-    linenr_T	lnum;	    /* first line with change */
-    colnr_T	col;	    /* column in first line with change */
-    linenr_T	lnume;	    /* line below last changed line */
-    long	xtra;	    /* number of extra lines (negative when deleting) */
+changed_lines(
+    linenr_T	lnum,	    /* first line with change */
+    colnr_T	col,	    /* column in first line with change */
+    linenr_T	lnume,	    /* line below last changed line */
+    long	xtra)	    /* number of extra lines (negative when deleting) */
 {
     changed_lines_buf(curbuf, lnum, lnume, xtra);
 
@@ -2978,11 +2934,11 @@ changed_lines(lnum, col, lnume, xtra)
 }
 
     static void
-changed_lines_buf(buf, lnum, lnume, xtra)
-    buf_T	*buf;
-    linenr_T	lnum;	    /* first line with change */
-    linenr_T	lnume;	    /* line below last changed line */
-    long	xtra;	    /* number of extra lines (negative when deleting) */
+changed_lines_buf(
+    buf_T	*buf,
+    linenr_T	lnum,	    /* first line with change */
+    linenr_T	lnume,	    /* line below last changed line */
+    long	xtra)	    /* number of extra lines (negative when deleting) */
 {
     if (buf->b_mod_set)
     {
@@ -3016,11 +2972,11 @@ changed_lines_buf(buf, lnum, lnume, xtra
  * Careful: may trigger autocommands that reload the buffer.
  */
     static void
-changed_common(lnum, col, lnume, xtra)
-    linenr_T	lnum;
-    colnr_T	col;
-    linenr_T	lnume;
-    long	xtra;
+changed_common(
+    linenr_T	lnum,
+    colnr_T	col,
+    linenr_T	lnume,
+    long	xtra)
 {
     win_T	*wp;
 #ifdef FEAT_WINDOWS
@@ -3217,9 +3173,9 @@ changed_common(lnum, col, lnume, xtra)
  * unchanged() is called when the changed flag must be reset for buffer 'buf'
  */
     void
-unchanged(buf, ff)
-    buf_T	*buf;
-    int		ff;	/* also reset 'fileformat' */
+unchanged(
+    buf_T	*buf,
+    int		ff)	/* also reset 'fileformat' */
 {
     if (buf->b_changed || (ff && file_ff_differs(buf, FALSE)))
     {
@@ -3247,8 +3203,7 @@ unchanged(buf, ff)
  *		 need to be updated
  */
     void
-check_status(buf)
-    buf_T	*buf;
+check_status(buf_T *buf)
 {
     win_T	*wp;
 
@@ -3271,8 +3226,8 @@ check_status(buf)
  * Careful: may trigger autocommands that reload the buffer.
  */
     void
-change_warning(col)
-    int	    col;		/* column for message; non-zero when in insert
+change_warning(
+    int	    col)		/* column for message; non-zero when in insert
 				   mode and 'showmode' is on */
 {
     static char *w_readonly = N_("W10: Warning: Changing a readonly file");
@@ -3327,9 +3282,7 @@ change_warning(col)
  * return the 'y' or 'n'
  */
     int
-ask_yesno(str, direct)
-    char_u  *str;
-    int	    direct;
+ask_yesno(char_u *str, int direct)
 {
     int	    r = ' ';
     int	    save_State = State;
@@ -3376,8 +3329,7 @@ ask_yesno(str, direct)
  * Return TRUE if "c" is a mouse key.
  */
     int
-is_mouse_key(c)
-    int c;
+is_mouse_key(int c)
 {
     return c == K_LEFTMOUSE
 	|| c == K_LEFTMOUSE_NM
@@ -3412,7 +3364,7 @@ is_mouse_key(c)
  * Translates the interrupt character for unix to ESC.
  */
     int
-get_keystroke()
+get_keystroke(void)
 {
     char_u	*buf = NULL;
     int		buflen = 150;
@@ -3536,9 +3488,9 @@ get_keystroke()
  * When "mouse_used" is not NULL allow using the mouse.
  */
     int
-get_number(colon, mouse_used)
-    int	    colon;			/* allow colon to abort */
-    int	    *mouse_used;
+get_number(
+    int	    colon,			/* allow colon to abort */
+    int	    *mouse_used)
 {
     int	n = 0;
     int	c;
@@ -3607,8 +3559,7 @@ get_number(colon, mouse_used)
  * the line number.
  */
     int
-prompt_for_number(mouse_used)
-    int		*mouse_used;
+prompt_for_number(int *mouse_used)
 {
     int		i;
     int		save_cmdline_row;
@@ -3645,8 +3596,7 @@ prompt_for_number(mouse_used)
 }
 
     void
-msgmore(n)
-    long n;
+msgmore(long n)
 {
     long pn;
 
@@ -3699,7 +3649,7 @@ msgmore(n)
  * flush map and typeahead buffers and give a warning for an error
  */
     void
-beep_flush()
+beep_flush(void)
 {
     if (emsg_silent == 0)
     {
@@ -3712,8 +3662,8 @@ beep_flush()
  * Give a warning for an error.
  */
     void
-vim_beep(val)
-    unsigned val; /* one of the BO_ values, e.g., BO_OPER */
+vim_beep(
+    unsigned val) /* one of the BO_ values, e.g., BO_OPER */
 {
     if (emsg_silent == 0)
     {
@@ -3772,7 +3722,7 @@ vim_beep(val)
 static char_u	*homedir = NULL;
 
     void
-init_homedir()
+init_homedir(void)
 {
     char_u  *var;
 
@@ -3891,14 +3841,14 @@ init_homedir()
 
 #if defined(EXITFREE) || defined(PROTO)
     void
-free_homedir()
+free_homedir(void)
 {
     vim_free(homedir);
 }
 
 # ifdef FEAT_CMDL_COMPL
     void
-free_users()
+free_users(void)
 {
     ga_clear_strings(&ga_users);
 }
@@ -3911,8 +3861,7 @@ free_users()
  * again soon.
  */
     char_u *
-expand_env_save(src)
-    char_u	*src;
+expand_env_save(char_u *src)
 {
     return expand_env_save_opt(src, FALSE);
 }
@@ -3922,9 +3871,7 @@ expand_env_save(src)
  * expand "~" at the start.
  */
     char_u *
-expand_env_save_opt(src, one)
-    char_u	*src;
-    int		one;
+expand_env_save_opt(char_u *src, int one)
 {
     char_u	*p;
 
@@ -3941,22 +3888,22 @@ expand_env_save_opt(src, one)
  * If anything fails no expansion is done and dst equals src.
  */
     void
-expand_env(src, dst, dstlen)
-    char_u	*src;		/* input string e.g. "$HOME/vim.hlp" */
-    char_u	*dst;		/* where to put the result */
-    int		dstlen;		/* maximum length of the result */
+expand_env(
+    char_u	*src,		/* input string e.g. "$HOME/vim.hlp" */
+    char_u	*dst,		/* where to put the result */
+    int		dstlen)		/* maximum length of the result */
 {
     expand_env_esc(src, dst, dstlen, FALSE, FALSE, NULL);
 }
 
     void
-expand_env_esc(srcp, dst, dstlen, esc, one, startstr)
-    char_u	*srcp;		/* input string e.g. "$HOME/vim.hlp" */
-    char_u	*dst;		/* where to put the result */
-    int		dstlen;		/* maximum length of the result */
-    int		esc;		/* escape spaces in expanded variables */
-    int		one;		/* "srcp" is one file name */
-    char_u	*startstr;	/* start again after this (can be NULL) */
+expand_env_esc(
+    char_u	*srcp,		/* input string e.g. "$HOME/vim.hlp" */
+    char_u	*dst,		/* where to put the result */
+    int		dstlen,		/* maximum length of the result */
+    int		esc,		/* escape spaces in expanded variables */
+    int		one,		/* "srcp" is one file name */
+    char_u	*startstr)	/* start again after this (can be NULL) */
 {
     char_u	*src;
     char_u	*tail;
@@ -4241,9 +4188,7 @@ expand_env_esc(srcp, dst, dstlen, esc, o
  * initialized to FALSE by the caller.
  */
     char_u *
-vim_getenv(name, mustfree)
-    char_u	*name;
-    int		*mustfree;
+vim_getenv(char_u *name, int *mustfree)
 {
     char_u	*p;
     char_u	*pend;
@@ -4469,8 +4414,7 @@ vim_getenv(name, mustfree)
  * Return NULL if not, return its name in allocated memory otherwise.
  */
     static char_u *
-vim_version_dir(vimdir)
-    char_u	*vimdir;
+vim_version_dir(char_u *vimdir)
 {
     char_u	*p;
 
@@ -4492,10 +4436,7 @@ vim_version_dir(vimdir)
  * the length of "name/".  Otherwise return "pend".
  */
     static char_u *
-remove_tail(p, pend, name)
-    char_u	*p;
-    char_u	*pend;
-    char_u	*name;
+remove_tail(char_u *p, char_u *pend, char_u *name)
 {
     int		len = (int)STRLEN(name) + 1;
     char_u	*newend = pend - len;
@@ -4511,9 +4452,7 @@ remove_tail(p, pend, name)
  * Our portable version of setenv.
  */
     void
-vim_setenv(name, val)
-    char_u	*name;
-    char_u	*val;
+vim_setenv(char_u *name, char_u *val)
 {
 #ifdef HAVE_SETENV
     mch_setenv((char *)name, (char *)val, 1);
@@ -4554,9 +4493,9 @@ vim_setenv(name, val)
  * Function given to ExpandGeneric() to obtain an environment variable name.
  */
     char_u *
-get_env_name(xp, idx)
-    expand_T	*xp UNUSED;
-    int		idx;
+get_env_name(
+    expand_T	*xp UNUSED,
+    int		idx)
 {
 # if defined(AMIGA) || defined(__MRC__) || defined(__SC__)
     /*
@@ -4593,7 +4532,7 @@ get_env_name(xp, idx)
  * Done only once and then cached.
  */
     static void
-init_users()
+init_users(void)
 {
     static int	lazy_init_done = FALSE;
 
@@ -4629,9 +4568,7 @@ init_users()
  * Function given to ExpandGeneric() to obtain an user names.
  */
     char_u*
-get_users(xp, idx)
-    expand_T	*xp UNUSED;
-    int		idx;
+get_users(expand_T *xp UNUSED, int idx)
 {
     init_users();
     if (idx < ga_users.ga_len)
@@ -4645,8 +4582,7 @@ get_users(xp, idx)
  * 1 if name partially matches the beginning of a user name.
  * 2 is name fully matches a user name.
  */
-int match_user(name)
-    char_u* name;
+int match_user(char_u* name)
 {
     int i;
     int n = (int)STRLEN(name);
@@ -4670,12 +4606,12 @@ int match_user(name)
  * If anything fails (except when out of space) dst equals src.
  */
     void
-home_replace(buf, src, dst, dstlen, one)
-    buf_T	*buf;	/* when not NULL, check for help files */
-    char_u	*src;	/* input file name */
-    char_u	*dst;	/* where to put the result */
-    int		dstlen;	/* maximum length of the result */
-    int		one;	/* if TRUE, only replace one file name, include
+home_replace(
+    buf_T	*buf,	/* when not NULL, check for help files */
+    char_u	*src,	/* input file name */
+    char_u	*dst,	/* where to put the result */
+    int		dstlen,	/* maximum length of the result */
+    int		one)	/* if TRUE, only replace one file name, include
 			   spaces and commas in the file name. */
 {
     size_t	dirlen = 0, envlen = 0;
@@ -4794,9 +4730,9 @@ home_replace(buf, src, dst, dstlen, one)
  * When something fails, NULL is returned.
  */
     char_u  *
-home_replace_save(buf, src)
-    buf_T	*buf;	/* when not NULL, check for help files */
-    char_u	*src;	/* input file name */
+home_replace_save(
+    buf_T	*buf,	/* when not NULL, check for help files */
+    char_u	*src)	/* input file name */
 {
     char_u	*dst;
     unsigned	len;
@@ -4820,9 +4756,10 @@ home_replace_save(buf, src)
  * For the first name environment variables are expanded
  */
     int
-fullpathcmp(s1, s2, checkname)
-    char_u *s1, *s2;
-    int	    checkname;		/* when both don't exist, check file names */
+fullpathcmp(
+    char_u *s1,
+    char_u *s2,
+    int	    checkname)		/* when both don't exist, check file names */
 {
 #ifdef UNIX
     char_u	    exp1[MAXPATHL];
@@ -4896,8 +4833,7 @@ fullpathcmp(s1, s2, checkname)
  * Fail safe: never returns NULL.
  */
     char_u *
-gettail(fname)
-    char_u *fname;
+gettail(char_u *fname)
 {
     char_u  *p1, *p2;
 
@@ -4922,8 +4858,7 @@ static char_u *gettail_dir(char_u *fname
  *	 ^	       ^	     ^	      ^
  */
     static char_u *
-gettail_dir(fname)
-    char_u *fname;
+gettail_dir(char_u *fname)
 {
     char_u	*dir_end = fname;
     char_u	*next_dir_end = fname;
@@ -4958,8 +4893,7 @@ gettail_dir(fname)
  * Always returns a valid pointer.
  */
     char_u *
-gettail_sep(fname)
-    char_u	*fname;
+gettail_sep(char_u *fname)
 {
     char_u	*p;
     char_u	*t;
@@ -4979,8 +4913,7 @@ gettail_sep(fname)
  * get the next path component (just after the next path separator).
  */
     char_u *
-getnextcomp(fname)
-    char_u *fname;
+getnextcomp(char_u *fname)
 {
     while (*fname && !vim_ispathsep(*fname))
 	mb_ptr_adv(fname);
@@ -4995,8 +4928,7 @@ getnextcomp(fname)
  * If there is no head, path is returned.
  */
     char_u *
-get_past_head(path)
-    char_u  *path;
+get_past_head(char_u *path)
 {
     char_u  *retval;
 
@@ -5028,8 +4960,7 @@ get_past_head(path)
  * Note that for MS-Windows this includes the colon.
  */
     int
-vim_ispathsep(c)
-    int c;
+vim_ispathsep(int c)
 {
 #ifdef UNIX
     return (c == '/');	    /* UNIX has ':' inside file names */
@@ -5052,8 +4983,7 @@ vim_ispathsep(c)
  * Like vim_ispathsep(c), but exclude the colon for MS-Windows.
  */
     int
-vim_ispathsep_nocolon(c)
-    int c;
+vim_ispathsep_nocolon(int c)
 {
     return vim_ispathsep(c)
 #ifdef BACKSLASH_IN_FILENAME
@@ -5067,8 +4997,7 @@ vim_ispathsep_nocolon(c)
  * return TRUE if 'c' is a path list separator.
  */
     int
-vim_ispathlistsep(c)
-    int c;
+vim_ispathlistsep(int c)
 {
 #ifdef UNIX
     return (c == ':');
@@ -5085,8 +5014,7 @@ vim_ispathlistsep(c)
  * It's done in-place.
  */
     void
-shorten_dir(str)
-    char_u *str;
+shorten_dir(char_u *str)
 {
     char_u	*tail, *s, *d;
     int		skip = FALSE;
@@ -5131,8 +5059,7 @@ shorten_dir(str)
  * "fname" must be writable!.
  */
     int
-dir_of_file_exists(fname)
-    char_u	*fname;
+dir_of_file_exists(char_u *fname)
 {
     char_u	*p;
     int		c;
@@ -5153,8 +5080,7 @@ dir_of_file_exists(fname)
  * and deal with 'fileignorecase'.
  */
     int
-vim_fnamecmp(x, y)
-    char_u	*x, *y;
+vim_fnamecmp(char_u *x, char_u *y)
 {
 #ifdef BACKSLASH_IN_FILENAME
     return vim_fnamencmp(x, y, MAXPATHL);
@@ -5166,9 +5092,7 @@ vim_fnamecmp(x, y)
 }
 
     int
-vim_fnamencmp(x, y, len)
-    char_u	*x, *y;
-    size_t	len;
+vim_fnamencmp(char_u *x, char_u *y, size_t len)
 {
 #ifdef BACKSLASH_IN_FILENAME
     char_u	*px = x;
@@ -5204,10 +5128,7 @@ vim_fnamencmp(x, y, len)
  * Only add a '/' or '\\' when 'sep' is TRUE and it is necessary.
  */
     char_u  *
-concat_fnames(fname1, fname2, sep)
-    char_u  *fname1;
-    char_u  *fname2;
-    int	    sep;
+concat_fnames(char_u *fname1, char_u *fname2, int sep)
 {
     char_u  *dest;
 
@@ -5227,9 +5148,7 @@ concat_fnames(fname1, fname2, sep)
  * Returns NULL when out of memory.
  */
     char_u  *
-concat_str(str1, str2)
-    char_u  *str1;
-    char_u  *str2;
+concat_str(char_u *str1, char_u *str2)
 {
     char_u  *dest;
     size_t  l = STRLEN(str1);
@@ -5248,8 +5167,7 @@ concat_str(str1, str2)
  * separator.
  */
     void
-add_pathsep(p)
-    char_u	*p;
+add_pathsep(char_u *p)
 {
     if (*p != NUL && !after_pathsep(p, p + STRLEN(p)))
 	STRCAT(p, PATHSEPSTR);
@@ -5260,9 +5178,9 @@ add_pathsep(p)
  * Returns NULL when out of memory.
  */
     char_u  *
-FullName_save(fname, force)
-    char_u	*fname;
-    int		force;		/* force expansion, even when it already looks
+FullName_save(
+    char_u	*fname,
+    int		force)		/* force expansion, even when it already looks
 				 * like a full path name */
 {
     char_u	*buf;
@@ -5296,14 +5214,13 @@ static pos_T *find_start_rawstring(int i
  * Return NULL when not inside a comment.
  */
     static pos_T *
-ind_find_start_comment()	    /* XXX */
+ind_find_start_comment(void)	    /* XXX */
 {
     return find_start_comment(curbuf->b_ind_maxcomment);
 }
 
     pos_T *
-find_start_comment(ind_maxcomment)	    /* XXX */
-    int		ind_maxcomment;
+find_start_comment(int ind_maxcomment)	/* XXX */
 {
     pos_T	*pos;
     char_u	*line;
@@ -5343,7 +5260,7 @@ find_start_comment(ind_maxcomment)	    /
  * "CORS" -> Comment Or Raw String
  */
     static pos_T *
-ind_find_start_CORS()	    /* XXX */
+ind_find_start_CORS(void)	    /* XXX */
 {
     static pos_T comment_pos_copy;
     pos_T	*comment_pos;
@@ -5372,8 +5289,7 @@ ind_find_start_CORS()	    /* XXX */
  * Return NULL when not inside a raw string.
  */
     static pos_T *
-find_start_rawstring(ind_maxcomment)	    /* XXX */
-    int		ind_maxcomment;
+find_start_rawstring(int ind_maxcomment)	/* XXX */
 {
     pos_T	*pos;
     char_u	*line;
@@ -5410,8 +5326,7 @@ find_start_rawstring(ind_maxcomment)	   
  * If there is no string or character, return argument unmodified.
  */
     static char_u *
-skip_string(p)
-    char_u  *p;
+skip_string(char_u *p)
 {
     int	    i;
 
@@ -5484,7 +5399,7 @@ skip_string(p)
  * Do C or expression indenting on the current line.
  */
     void
-do_c_expr_indent()
+do_c_expr_indent(void)
 {
 # ifdef FEAT_EVAL
     if (*curbuf->b_p_inde != NUL)
@@ -5551,8 +5466,7 @@ static int	cin_is_cpp_namespace(char_u *
  * Also skip over Perl/shell comments if desired.
  */
     static char_u *
-cin_skipcomment(s)
-    char_u	*s;
+cin_skipcomment(char_u *s)
 {
     while (*s)
     {
@@ -5592,8 +5506,7 @@ cin_skipcomment(s)
  * not considered code.
  */
     static int
-cin_nocode(s)
-    char_u	*s;
+cin_nocode(char_u *s)
 {
     return *cin_skipcomment(s) == NUL;
 }
@@ -5602,7 +5515,7 @@ cin_nocode(s)
  * Check previous lines for a "//" line comment, skipping over blank lines.
  */
     static pos_T *
-find_line_comment() /* XXX */
+find_line_comment(void) /* XXX */
 {
     static pos_T pos;
     char_u	 *line;
@@ -5628,8 +5541,7 @@ find_line_comment() /* XXX */
  * Return TRUE if "text" starts with "key:".
  */
     static int
-cin_has_js_key(text)
-    char_u *text;
+cin_has_js_key(char_u *text)
 {
     char_u *s = skipwhite(text);
     int	    quote = -1;
@@ -5659,8 +5571,7 @@ cin_has_js_key(text)
  * "*s" must point to the start of the label, if there is one.
  */
     static int
-cin_islabel_skip(s)
-    char_u	**s;
+cin_islabel_skip(char_u **s)
 {
     if (!vim_isIDc(**s))	    /* need at least one ID character */
 	return FALSE;
@@ -5679,7 +5590,7 @@ cin_islabel_skip(s)
  * Note: curwin->w_cursor must be where we are looking for the label.
  */
     int
-cin_islabel()		/* XXX */
+cin_islabel(void)		/* XXX */
 {
     char_u	*s;
 
@@ -5784,9 +5695,9 @@ cin_isinit(void)
  * Recognize a switch label: "case .*:" or "default:".
  */
      int
-cin_iscase(s, strict)
-    char_u *s;
-    int strict; /* Allow relaxed check of case statement for JS */
+cin_iscase(
+    char_u *s,
+    int strict) /* Allow relaxed check of case statement for JS */
 {
     s = cin_skipcomment(s);
     if (cin_starts_with(s, "case"))
@@ -5826,8 +5737,7 @@ cin_iscase(s, strict)
  * Recognize a "default" switch label.
  */
     static int
-cin_isdefault(s)
-    char_u  *s;
+cin_isdefault(char_u *s)
 {
     return (STRNCMP(s, "default", 7) == 0
 	    && *(s = cin_skipcomment(s + 7)) == ':'
@@ -5838,8 +5748,7 @@ cin_isdefault(s)
  * Recognize a "public/private/protected" scope declaration label.
  */
     int
-cin_isscopedecl(s)
-    char_u	*s;
+cin_isscopedecl(char_u *s)
 {
     int		i;
 
@@ -5862,8 +5771,7 @@ cin_isscopedecl(s)
  * Recognize a "namespace" scope declaration.
  */
     static int
-cin_is_cpp_namespace(s)
-    char_u	*s;
+cin_is_cpp_namespace(char_u *s)
 {
     char_u	*p;
     int		has_name = FALSE;
@@ -5906,8 +5814,7 @@ cin_is_cpp_namespace(s)
  *		       ^
  */
     static char_u *
-after_label(l)
-    char_u  *l;
+after_label(char_u *l)
 {
     for ( ; *l; ++l)
     {
@@ -5934,8 +5841,7 @@ after_label(l)
  * Return 0 if there is nothing after the label.
  */
     static int
-get_indent_nolabel(lnum)		/* XXX */
-    linenr_T	lnum;
+get_indent_nolabel (linenr_T lnum)	/* XXX */
 {
     char_u	*l;
     pos_T	fp;
@@ -5960,9 +5866,7 @@ get_indent_nolabel(lnum)		/* XXX */
  *		^
  */
     static int
-skip_label(lnum, pp)
-    linenr_T	lnum;
-    char_u	**pp;
+skip_label(linenr_T lnum, char_u **pp)
 {
     char_u	*l;
     int		amount;
@@ -5998,7 +5902,7 @@ skip_label(lnum, pp)
  * Returns zero when it doesn't look like a declaration.
  */
     static int
-cin_first_id_amount()
+cin_first_id_amount(void)
 {
     char_u	*line, *p, *s;
     int		len;
@@ -6049,8 +5953,7 @@ cin_first_id_amount()
  *	       here";
  */
     static int
-cin_get_equal_amount(lnum)
-    linenr_T	lnum;
+cin_get_equal_amount(linenr_T lnum)
 {
     char_u	*line;
     char_u	*s;
@@ -6092,8 +5995,7 @@ cin_get_equal_amount(lnum)
  * Recognize a preprocessor statement: Any line that starts with '#'.
  */
     static int
-cin_ispreproc(s)
-    char_u *s;
+cin_ispreproc(char_u *s)
 {
     if (*skipwhite(s) == '#')
 	return TRUE;
@@ -6106,9 +6008,7 @@ cin_ispreproc(s)
  * start and return the line in "*pp".
  */
     static int
-cin_ispreproc_cont(pp, lnump)
-    char_u	**pp;
-    linenr_T	*lnump;
+cin_ispreproc_cont(char_u **pp, linenr_T *lnump)
 {
     char_u	*line = *pp;
     linenr_T	lnum = *lnump;
@@ -6138,8 +6038,7 @@ cin_ispreproc_cont(pp, lnump)
  * Recognize the start of a C or C++ comment.
  */
     static int
-cin_iscomment(p)
-    char_u  *p;
+cin_iscomment(char_u *p)
 {
     return (p[0] == '/' && (p[1] == '*' || p[1] == '/'));
 }
@@ -6148,8 +6047,7 @@ cin_iscomment(p)
  * Recognize the start of a "//" comment.
  */
     static int
-cin_islinecomment(p)
-    char_u *p;
+cin_islinecomment(char_u *p)
 {
     return (p[0] == '/' && p[1] == '/');
 }
@@ -6164,10 +6062,10 @@ cin_islinecomment(p)
  * both apply in order to determine initializations).
  */
     static int
-cin_isterminated(s, incl_open, incl_comma)
-    char_u	*s;
-    int		incl_open;	/* include '{' at the end as terminator */
-    int		incl_comma;	/* recognize a trailing comma */
+cin_isterminated(
+    char_u	*s,
+    int		incl_open,	/* include '{' at the end as terminator */
+    int		incl_comma)	/* recognize a trailing comma */
 {
     char_u	found_start = 0;
     unsigned	n_open = 0;
@@ -6216,10 +6114,10 @@ cin_isterminated(s, incl_open, incl_comm
  * "min_lnum" is the line before which we will not be looking.
  */
     static int
-cin_isfuncdecl(sp, first_lnum, min_lnum)
-    char_u	**sp;
-    linenr_T	first_lnum;
-    linenr_T	min_lnum;
+cin_isfuncdecl(
+    char_u	**sp,
+    linenr_T	first_lnum,
+    linenr_T	min_lnum)
 {
     char_u	*s;
     linenr_T	lnum = first_lnum;
@@ -6326,15 +6224,14 @@ done:
 }
 
     static int
-cin_isif(p)
-    char_u  *p;
-{
-    return (STRNCMP(p, "if", 2) == 0 && !vim_isIDc(p[2]));
+cin_isif(char_u *p)
+{
+ return (STRNCMP(p, "if", 2) == 0 && !vim_isIDc(p[2]));
 }
 
     static int
-cin_iselse(p)
-    char_u  *p;
+cin_iselse(
+    char_u  *p)
 {
     if (*p == '}')	    /* accept "} else" */
 	p = cin_skipcomment(p + 1);
@@ -6342,8 +6239,7 @@ cin_iselse(p)
 }
 
     static int
-cin_isdo(p)
-    char_u  *p;
+cin_isdo(char_u *p)
 {
     return (STRNCMP(p, "do", 2) == 0 && !vim_isIDc(p[2]));
 }
@@ -6354,9 +6250,7 @@ cin_isdo(p)
  * ')' and ';'. The condition may be spread over several lines.
  */
     static int
-cin_iswhileofdo(p, lnum)	    /* XXX */
-    char_u	*p;
-    linenr_T	lnum;
+cin_iswhileofdo (char_u *p, linenr_T lnum)	/* XXX */
 {
     pos_T	cursor_save;
     pos_T	*trypos;
@@ -6392,9 +6286,7 @@ cin_iswhileofdo(p, lnum)	    /* XXX */
  * string was found.
  */
     static int
-cin_is_if_for_while_before_offset(line, poffset)
-    char_u *line;
-    int    *poffset;
+cin_is_if_for_while_before_offset(char_u *line, int *poffset)
 {
     int offset = *poffset;
 
@@ -6440,8 +6332,7 @@ probablyFound:
  * Adjust the cursor to the line with "while".
  */
     static int
-cin_iswhileofdo_end(terminated)
-    int	    terminated;
+cin_iswhileofdo_end(int terminated)
 {
     char_u	*line;
     char_u	*p;
@@ -6490,8 +6381,7 @@ cin_iswhileofdo_end(terminated)
 }
 
     static int
-cin_isbreak(p)
-    char_u  *p;
+cin_isbreak(char_u *p)
 {
     return (STRNCMP(p, "break", 5) == 0 && !vim_isIDc(p[5]));
 }
@@ -6510,8 +6400,8 @@ cin_isbreak(p)
  * This is a lot of guessing.  Watch out for "cond ? func() : foo".
  */
     static int
-cin_is_cpp_baseclass(cached)
-    cpp_baseclass_cache_T *cached; /* input and output */
+cin_is_cpp_baseclass(
+    cpp_baseclass_cache_T *cached) /* input and output */
 {
     lpos_T	*pos = &cached->lpos;	    /* find position */
     char_u	*s;
@@ -6672,8 +6562,7 @@ cin_is_cpp_baseclass(cached)
 }
 
     static int
-get_baseclass_amount(col)
-    int		col;
+get_baseclass_amount(int col)
 {
     int		amount;
     colnr_T	vcol;
@@ -6705,10 +6594,7 @@ get_baseclass_amount(col)
  * Ignore "ignore" after "find" if it's not NULL.
  */
     static int
-cin_ends_in(s, find, ignore)
-    char_u	*s;
-    char_u	*find;
-    char_u	*ignore;
+cin_ends_in(char_u *s, char_u *find, char_u *ignore)
 {
     char_u	*p = s;
     char_u	*r;
@@ -6735,9 +6621,7 @@ cin_ends_in(s, find, ignore)
  * Return TRUE when "s" starts with "word" and then a non-ID character.
  */
     static int
-cin_starts_with(s, word)
-    char_u *s;
-    char *word;
+cin_starts_with(char_u *s, char *word)
 {
     int l = (int)STRLEN(word);
 
@@ -6749,8 +6633,7 @@ cin_starts_with(s, word)
  * Return the column found.
  */
     static int
-cin_skip2pos(trypos)
-    pos_T	*trypos;
+cin_skip2pos(pos_T *trypos)
 {
     char_u	*line;
     char_u	*p;
@@ -6779,7 +6662,7 @@ cin_skip2pos(trypos)
 /* }	    */
 
     static pos_T *
-find_start_brace()	    /* XXX */
+find_start_brace(void)	    /* XXX */
 {
     pos_T	cursor_save;
     pos_T	*trypos;
@@ -6809,16 +6692,13 @@ find_start_brace()	    /* XXX */
  * Return NULL if no match found.
  */
     static pos_T *
-find_match_paren(ind_maxparen)	    /* XXX */
-    int		ind_maxparen;
-{
-    return find_match_char('(', ind_maxparen);
+find_match_paren(int ind_maxparen)	/* XXX */
+{
+ return find_match_char('(', ind_maxparen);
 }
 
     static pos_T *
-find_match_char(c, ind_maxparen)	    /* XXX */
-    int		c;
-    int		ind_maxparen;
+find_match_char (int c, int ind_maxparen)	/* XXX */
 {
     pos_T	cursor_save;
     pos_T	*trypos;
@@ -6872,8 +6752,7 @@ retry:
  * Return NULL if no match found.
  */
     static pos_T *
-find_match_paren_after_brace(ind_maxparen)	    /* XXX */
-    int		ind_maxparen;
+find_match_paren_after_brace (int ind_maxparen)	    /* XXX */
 {
     pos_T	*trypos = find_match_paren(ind_maxparen);
 
@@ -6899,8 +6778,7 @@ find_match_paren_after_brace(ind_maxpare
  * looking a few lines further.
  */
     static int
-corr_ind_maxparen(startpos)
-    pos_T	*startpos;
+corr_ind_maxparen(pos_T *startpos)
 {
     long	n = (long)startpos->lnum - (long)curwin->w_cursor.lnum;
 
@@ -6914,9 +6792,7 @@ corr_ind_maxparen(startpos)
  * line "l".  "l" must point to the start of the line.
  */
     static int
-find_last_paren(l, start, end)
-    char_u	*l;
-    int		start, end;
+find_last_paren(char_u *l, int start, int end)
 {
     int		i;
     int		retval = FALSE;
@@ -6949,8 +6825,7 @@ find_last_paren(l, start, end)
  * Must be called when 'cinoptions', 'shiftwidth' and/or 'tabstop' changes.
  */
     void
-parse_cino(buf)
-    buf_T	*buf;
+parse_cino(buf_T *buf)
 {
     char_u	*p;
     char_u	*l;
@@ -7169,7 +7044,7 @@ parse_cino(buf)
  * Return -1 if the indent should be left alone (inside a raw string).
  */
     int
-get_c_indent()
+get_c_indent(void)
 {
     pos_T	cur_curpos;
     int		amount;
@@ -9172,9 +9047,7 @@ laterend:
 }
 
     static int
-find_match(lookfor, ourscope)
-    int		lookfor;
-    linenr_T	ourscope;
+find_match(int lookfor, linenr_T ourscope)
 {
     char_u	*look;
     pos_T	*theirscope;
@@ -9290,7 +9163,7 @@ find_match(lookfor, ourscope)
  * Get indent level from 'indentexpr'.
  */
     int
-get_expr_indent()
+get_expr_indent(void)
 {
     int		indent;
     pos_T	save_pos;
@@ -9340,8 +9213,7 @@ get_expr_indent()
 static int lisp_match(char_u *p);
 
     static int
-lisp_match(p)
-    char_u	*p;
+lisp_match(char_u *p)
 {
     char_u	buf[LSIZE];
     int		len;
@@ -9374,7 +9246,7 @@ lisp_match(p)
  * I tried to fix the first two issues.
  */
     int
-get_lisp_indent()
+get_lisp_indent(void)
 {
     pos_T	*pos, realpos, paren;
     int		amount;
@@ -9560,7 +9432,7 @@ get_lisp_indent()
 #endif /* FEAT_LISP */
 
     void
-prepare_to_exit()
+prepare_to_exit(void)
 {
 #if defined(SIGHUP) && defined(SIG_IGN)
     /* Ignore SIGHUP, because a dropped connection causes a read error, which
@@ -9600,7 +9472,7 @@ prepare_to_exit()
  * functions, such as allocating memory.
  */
     void
-preserve_exit()
+preserve_exit(void)
 {
     buf_T	*buf;
 
@@ -9639,8 +9511,7 @@ preserve_exit()
  * return TRUE if "fname" exists.
  */
     int
-vim_fexists(fname)
-    char_u  *fname;
+vim_fexists(char_u *fname)
 {
     struct stat st;
 
@@ -9667,7 +9538,7 @@ vim_fexists(fname)
 static int	breakcheck_count = 0;
 
     void
-line_breakcheck()
+line_breakcheck(void)
 {
     if (++breakcheck_count >= BREAKCHECK_SKIP)
     {
@@ -9680,7 +9551,7 @@ line_breakcheck()
  * Like line_breakcheck() but check 10 times less often.
  */
     void
-fast_breakcheck()
+fast_breakcheck(void)
 {
     if (++breakcheck_count >= BREAKCHECK_SKIP * 10)
     {
@@ -9695,11 +9566,11 @@ fast_breakcheck()
  * Returns OK or FAIL.
  */
     int
-expand_wildcards_eval(pat, num_file, file, flags)
-    char_u	 **pat;		/* pointer to input pattern */
-    int		  *num_file;	/* resulting number of files */
-    char_u	***file;	/* array of resulting files */
-    int		   flags;	/* EW_DIR, etc. */
+expand_wildcards_eval(
+    char_u	 **pat,		/* pointer to input pattern */
+    int		  *num_file,	/* resulting number of files */
+    char_u	***file,	/* array of resulting files */
+    int		   flags)	/* EW_DIR, etc. */
 {
     int		ret = FAIL;
     char_u	*eval_pat = NULL;
@@ -9735,12 +9606,12 @@ expand_wildcards_eval(pat, num_file, fil
  * Returns OK or FAIL.  When FAIL then "num_files" won't be set.
  */
     int
-expand_wildcards(num_pat, pat, num_files, files, flags)
-    int		   num_pat;	/* number of input patterns */
-    char_u	 **pat;		/* array of input patterns */
-    int		  *num_files;	/* resulting number of files */
-    char_u	***files;	/* array of resulting files */
-    int		   flags;	/* EW_DIR, etc. */
+expand_wildcards(
+    int		   num_pat,	/* number of input patterns */
+    char_u	 **pat,		/* array of input patterns */
+    int		  *num_files,	/* resulting number of files */
+    char_u	***files,	/* array of resulting files */
+    int		   flags)	/* EW_DIR, etc. */
 {
     int		retval;
     int		i, j;
@@ -9821,8 +9692,7 @@ expand_wildcards(num_pat, pat, num_files
  * Return TRUE if "fname" matches with an entry in 'suffixes'.
  */
     int
-match_suffix(fname)
-    char_u	*fname;
+match_suffix(char_u *fname)
 {
     int		fnamelen, setsuflen;
     char_u	*setsuf;
@@ -10219,8 +10089,7 @@ mch_expandpath(
 static int	pstrcmp(const void *, const void *);
 
     static int
-pstrcmp(a, b)
-    const void *a, *b;
+pstrcmp(const void *a, const void *b)
 {
     return (pathcmp(*(char **)a, *(char **)b, -1));
 }
@@ -10234,12 +10103,12 @@ pstrcmp(a, b)
  * NOTE: much of this is identical to dos_expandpath(), keep in sync!
  */
     int
-unix_expandpath(gap, path, wildoff, flags, didstar)
-    garray_T	*gap;
-    char_u	*path;
-    int		wildoff;
-    int		flags;		/* EW_* flags */
-    int		didstar;	/* expanded "**" once already */
+unix_expandpath(
+    garray_T	*gap,
+    char_u	*path,
+    int		wildoff,
+    int		flags,		/* EW_* flags */
+    int		didstar)	/* expanded "**" once already */
 {
     char_u	*buf;
     char_u	*path_end;
@@ -10462,9 +10331,7 @@ static int expand_in_path(garray_T *gap,
  * Returns FAIL is "*psep" ends up at the beginning of "path".
  */
     static int
-find_previous_pathsep(path, psep)
-    char_u *path;
-    char_u **psep;
+find_previous_pathsep(char_u *path, char_u **psep)
 {
     /* skip the current separator */
     if (*psep > path && vim_ispathsep(**psep))
@@ -10486,10 +10353,7 @@ find_previous_pathsep(path, psep)
  * "maybe_unique" is the end portion of "((char_u **)gap->ga_data)[i]".
  */
     static int
-is_unique(maybe_unique, gap, i)
-    char_u	*maybe_unique;
-    garray_T	*gap;
-    int		i;
+is_unique(char_u *maybe_unique, garray_T *gap, int i)
 {
     int	    j;
     int	    candidate_len;
@@ -10526,9 +10390,7 @@ is_unique(maybe_unique, gap, i)
  * expanding each into their equivalent path(s).
  */
     static void
-expand_path_option(curdir, gap)
-    char_u	*curdir;
-    garray_T	*gap;
+expand_path_option(char_u *curdir, garray_T *gap)
 {
     char_u	*path_option = *curbuf->b_p_path == NUL
 						  ? p_path : curbuf->b_p_path;
@@ -10608,9 +10470,7 @@ expand_path_option(curdir, gap)
  * returns:		 ^this
  */
     static char_u *
-get_path_cutoff(fname, gap)
-    char_u *fname;
-    garray_T *gap;
+get_path_cutoff(char_u *fname, garray_T *gap)
 {
     int	    i;
     int	    maxlen = 0;
@@ -10648,9 +10508,7 @@ get_path_cutoff(fname, gap)
  * that matches the pattern. Beware, this is at least O(n^2) wrt "gap->ga_len".
  */
     static void
-uniquefy_paths(gap, pattern)
-    garray_T	*gap;
-    char_u	*pattern;
+uniquefy_paths(garray_T *gap, char_u *pattern)
 {
     int		i;
     int		len;
@@ -10816,10 +10674,10 @@ theend:
  * Returns the total number of matches.
  */
     static int
-expand_in_path(gap, pattern, flags)
-    garray_T	*gap;
-    char_u	*pattern;
-    int		flags;		/* EW_* flags */
+expand_in_path(
+    garray_T	*gap,
+    char_u	*pattern,
+    int		flags)		/* EW_* flags */
 {
     char_u	*curdir;
     garray_T	path_ga;
@@ -10853,8 +10711,7 @@ expand_in_path(gap, pattern, flags)
  * list of file names in allocated memory.
  */
     void
-remove_duplicates(gap)
-    garray_T	*gap;
+remove_duplicates(garray_T *gap)
 {
     int	    i;
     int	    j;
@@ -10879,8 +10736,7 @@ static int has_env_var(char_u *p);
  * Allowing for escaping.
  */
     static int
-has_env_var(p)
-    char_u *p;
+has_env_var(char_u *p)
 {
     for ( ; *p; mb_ptr_adv(p))
     {
@@ -10906,8 +10762,7 @@ static int has_special_wildchar(char_u *
  * Allowing for escaping.
  */
     static int
-has_special_wildchar(p)
-    char_u  *p;
+has_special_wildchar(char_u *p)
 {
     for ( ; *p; mb_ptr_adv(p))
     {
@@ -10932,12 +10787,12 @@ has_special_wildchar(p)
  * matches, "file" to the array of matches.  Call FreeWild() later.
  */
     int
-gen_expand_wildcards(num_pat, pat, num_file, file, flags)
-    int		num_pat;	/* number of input patterns */
-    char_u	**pat;		/* array of input patterns */
-    int		*num_file;	/* resulting number of files */
-    char_u	***file;	/* array of resulting files */
-    int		flags;		/* EW_* flags */
+gen_expand_wildcards(
+    int		num_pat,	/* number of input patterns */
+    char_u	**pat,		/* array of input patterns */
+    int		*num_file,	/* resulting number of files */
+    char_u	***file,	/* array of resulting files */
+    int		flags)		/* EW_* flags */
 {
     int			i;
     garray_T		ga;
@@ -11096,8 +10951,7 @@ gen_expand_wildcards(num_pat, pat, num_f
  * Return TRUE if we can expand this backtick thing here.
  */
     static int
-vim_backtick(p)
-    char_u	*p;
+vim_backtick(char_u *p)
 {
     return (*p == '`' && *(p + 1) != NUL && *(p + STRLEN(p) - 1) == '`');
 }
@@ -11108,10 +10962,10 @@ vim_backtick(p)
  * Returns number of file names found, -1 if an error is encountered.
  */
     static int
-expand_backtick(gap, pat, flags)
-    garray_T	*gap;
-    char_u	*pat;
-    int		flags;	/* EW_* flags */
+expand_backtick(
+    garray_T	*gap,
+    char_u	*pat,
+    int		flags)	/* EW_* flags */
 {
     char_u	*p;
     char_u	*cmd;
@@ -11171,10 +11025,10 @@ expand_backtick(gap, pat, flags)
  * EW_ALLLINKS	add symlink also when the referred file does not exist
  */
     void
-addfile(gap, f, flags)
-    garray_T	*gap;
-    char_u	*f;	/* filename */
-    int		flags;
+addfile(
+    garray_T	*gap,
+    char_u	*f,	/* filename */
+    int		flags)
 {
     char_u	*p;
     int		isdir;
@@ -11240,11 +11094,11 @@ addfile(gap, f, flags)
  * Returns an allocated string, or NULL for error.
  */
     char_u *
-get_cmd_output(cmd, infile, flags, ret_len)
-    char_u	*cmd;
-    char_u	*infile;	/* optional input file name */
-    int		flags;		/* can be SHELL_SILENT */
-    int		*ret_len;
+get_cmd_output(
+    char_u	*cmd,
+    char_u	*infile,	/* optional input file name */
+    int		flags,		/* can be SHELL_SILENT */
+    int		*ret_len)
 {
     char_u	*tempname;
     char_u	*command;
@@ -11337,9 +11191,7 @@ done:
  * functions.
  */
     void
-FreeWild(count, files)
-    int	    count;
-    char_u  **files;
+FreeWild(int count, char_u **files)
 {
     if (count <= 0 || files == NULL)
 	return;
@@ -11362,7 +11214,7 @@ FreeWild(count, files)
  * Don't do this when inside a ":normal" command.
  */
     int
-goto_im()
+goto_im(void)
 {
     return (p_im && stuff_empty() && typebuf_typed());
 }
@@ -11376,7 +11228,7 @@ goto_im()
  * But don't do that for Windows, it's common to have a space in the path.
  */
     char_u *
-get_isolated_shell_name()
+get_isolated_shell_name(void)
 {
     char_u *p;
 
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -23,7 +23,7 @@ static int coladvance2(pos_T *pos, int a
  * Return TRUE if in the current mode we need to use virtual.
  */
     int
-virtual_active()
+virtual_active(void)
 {
     /* While an operator is being executed we return "virtual_op", because
      * VIsual_active has already been reset, thus we can't check for "block"
@@ -39,7 +39,7 @@ virtual_active()
  * Get the screen position of the cursor.
  */
     int
-getviscol()
+getviscol(void)
 {
     colnr_T	x;
 
@@ -51,9 +51,7 @@ getviscol()
  * Get the screen position of character col with a coladd in the cursor line.
  */
     int
-getviscol2(col, coladd)
-    colnr_T	col;
-    colnr_T	coladd;
+getviscol2(colnr_T col, colnr_T coladd)
 {
     colnr_T	x;
     pos_T	pos;
@@ -71,8 +69,7 @@ getviscol2(col, coladd)
  * The caller must have saved the cursor line for undo!
  */
     int
-coladvance_force(wcol)
-    colnr_T wcol;
+coladvance_force(colnr_T wcol)
 {
     int rc = coladvance2(&curwin->w_cursor, TRUE, FALSE, wcol);
 
@@ -98,8 +95,7 @@ coladvance_force(wcol)
  * return OK if desired column is reached, FAIL if not
  */
     int
-coladvance(wcol)
-    colnr_T	wcol;
+coladvance(colnr_T wcol)
 {
     int rc = getvpos(&curwin->w_cursor, wcol);
 
@@ -119,20 +115,18 @@ coladvance(wcol)
  * return OK if desired column is reached, FAIL if not
  */
     int
-getvpos(pos, wcol)
-    pos_T   *pos;
-    colnr_T wcol;
+getvpos(pos_T *pos, colnr_T wcol)
 {
 #ifdef FEAT_VIRTUALEDIT
     return coladvance2(pos, FALSE, virtual_active(), wcol);
 }
 
     static int
-coladvance2(pos, addspaces, finetune, wcol)
-    pos_T	*pos;
-    int		addspaces;	/* change the text to achieve our goal? */
-    int		finetune;	/* change char offset for the exact column */
-    colnr_T	wcol;		/* column to move to */
+coladvance2(
+    pos_T	*pos,
+    int		addspaces,	/* change the text to achieve our goal? */
+    int		finetune,	/* change char offset for the exact column */
+    colnr_T	wcol)		/* column to move to */
 {
 #endif
     int		idx;
@@ -341,7 +335,7 @@ coladvance2(pos, addspaces, finetune, wc
  * Increment the cursor position.  See inc() for return values.
  */
     int
-inc_cursor()
+inc_cursor(void)
 {
     return inc(&curwin->w_cursor);
 }
@@ -354,8 +348,7 @@ inc_cursor()
  * Return 0 otherwise.
  */
     int
-inc(lp)
-    pos_T  *lp;
+inc(pos_T *lp)
 {
     char_u  *p = ml_get_pos(lp);
 
@@ -392,8 +385,7 @@ inc(lp)
  * incl(lp): same as inc(), but skip the NUL at the end of non-empty lines
  */
     int
-incl(lp)
-    pos_T    *lp;
+incl(pos_T *lp)
 {
     int	    r;
 
@@ -409,14 +401,13 @@ incl(lp)
  * Return 1 when crossing a line, -1 when at start of file, 0 otherwise.
  */
     int
-dec_cursor()
+dec_cursor(void)
 {
-    return dec(&curwin->w_cursor);
+ return dec(&curwin->w_cursor);
 }
 
     int
-dec(lp)
-    pos_T  *lp;
+dec(pos_T *lp)
 {
     char_u	*p;
 
@@ -453,8 +444,7 @@ dec(lp)
  * decl(lp): same as dec(), but skip the NUL at the end of non-empty lines
  */
     int
-decl(lp)
-    pos_T    *lp;
+decl(pos_T *lp)
 {
     int	    r;
 
@@ -469,9 +459,9 @@ decl(lp)
  * can be visible, folded lines don't count.
  */
     linenr_T
-get_cursor_rel_lnum(wp, lnum)
-    win_T	*wp;
-    linenr_T	lnum;		    /* line number to get the result for */
+get_cursor_rel_lnum(
+    win_T	*wp,
+    linenr_T	lnum)		    /* line number to get the result for */
 {
     linenr_T	cursor = wp->w_cursor.lnum;
     linenr_T	retval = 0;
@@ -518,7 +508,7 @@ get_cursor_rel_lnum(wp, lnum)
  * Make sure curwin->w_cursor.lnum is valid.
  */
     void
-check_cursor_lnum()
+check_cursor_lnum(void)
 {
     if (curwin->w_cursor.lnum > curbuf->b_ml.ml_line_count)
     {
@@ -538,7 +528,7 @@ check_cursor_lnum()
  * Make sure curwin->w_cursor.col is valid.
  */
     void
-check_cursor_col()
+check_cursor_col(void)
 {
     check_cursor_col_win(curwin);
 }
@@ -547,8 +537,7 @@ check_cursor_col()
  * Make sure win->w_cursor.col is valid.
  */
     void
-check_cursor_col_win(win)
-    win_T *win;
+check_cursor_col_win(win_T *win)
 {
     colnr_T len;
 #ifdef FEAT_VIRTUALEDIT
@@ -606,7 +595,7 @@ check_cursor_col_win(win)
  * make sure curwin->w_cursor in on a valid character
  */
     void
-check_cursor()
+check_cursor(void)
 {
     check_cursor_lnum();
     check_cursor_col();
@@ -618,7 +607,7 @@ check_cursor()
  * Allow it when in Visual mode and 'selection' is not "old".
  */
     void
-adjust_cursor_col()
+adjust_cursor_col(void)
 {
     if (curwin->w_cursor.col > 0
 	    && (!VIsual_active || *p_sel == 'o')
@@ -632,7 +621,7 @@ adjust_cursor_col()
  * Return TRUE if the cursor was moved.
  */
     int
-leftcol_changed()
+leftcol_changed(void)
 {
     long	lastcol;
     colnr_T	s, e;
@@ -705,23 +694,21 @@ static void mem_post_alloc(void **pp, si
 static void mem_pre_free(void **pp);
 
     static void
-mem_pre_alloc_s(sizep)
-    size_t *sizep;
+mem_pre_alloc_s(size_t *sizep)
 {
     *sizep += sizeof(size_t);
 }
 
     static void
-mem_pre_alloc_l(sizep)
-    long_u *sizep;
+mem_pre_alloc_l(long_u *sizep)
 {
     *sizep += sizeof(size_t);
 }
 
     static void
-mem_post_alloc(pp, size)
-    void **pp;
-    size_t size;
+mem_post_alloc(
+    void **pp,
+    size_t size)
 {
     if (*pp == NULL)
 	return;
@@ -739,8 +726,7 @@ mem_post_alloc(pp, size)
 }
 
     static void
-mem_pre_free(pp)
-    void **pp;
+mem_pre_free(void **pp)
 {
     long_u size;
 
@@ -758,7 +744,7 @@ mem_pre_free(pp)
  * called on exit via atexit()
  */
     void
-vim_mem_profile_dump()
+vim_mem_profile_dump(void)
 {
     int i, j;
 
@@ -801,8 +787,7 @@ vim_mem_profile_dump()
 static int alloc_does_fail(long_u size);
 
     static int
-alloc_does_fail(size)
-    long_u size;
+alloc_does_fail(long_u size)
 {
     if (alloc_fail_countdown == 0)
     {
@@ -833,8 +818,7 @@ alloc_does_fail(size)
  * Use lalloc for larger blocks.
  */
     char_u *
-alloc(size)
-    unsigned	    size;
+alloc(unsigned size)
 {
     return (lalloc((long_u)size, TRUE));
 }
@@ -843,9 +827,7 @@ alloc(size)
  * alloc() with an ID for alloc_fail().
  */
     char_u *
-alloc_id(size, id)
-    unsigned	size;
-    alloc_id_T	id UNUSED;
+alloc_id(unsigned size, alloc_id_T id UNUSED)
 {
 #ifdef FEAT_EVAL
     if (alloc_fail_id == id && alloc_does_fail((long_u)size))
@@ -858,8 +840,7 @@ alloc_id(size, id)
  * Allocate memory and set all bytes to zero.
  */
     char_u *
-alloc_clear(size)
-    unsigned	    size;
+alloc_clear(unsigned size)
 {
     char_u *p;
 
@@ -873,8 +854,7 @@ alloc_clear(size)
  * alloc() with check for maximum line length
  */
     char_u *
-alloc_check(size)
-    unsigned	    size;
+alloc_check(unsigned size)
 {
 #if !defined(UNIX) && !defined(__EMX__)
     if (sizeof(int) == 2 && size > 0x7fff)
@@ -892,9 +872,7 @@ alloc_check(size)
  * Allocate memory like lalloc() and set all bytes to zero.
  */
     char_u *
-lalloc_clear(size, message)
-    long_u	size;
-    int		message;
+lalloc_clear(long_u size, int message)
 {
     char_u *p;
 
@@ -909,9 +887,7 @@ lalloc_clear(size, message)
  * This is used often, KEEP IT FAST!
  */
     char_u *
-lalloc(size, message)
-    long_u	size;
-    int		message;
+lalloc(long_u size, int message)
 {
     char_u	*p;		    /* pointer to new storage space */
     static int	releasing = FALSE;  /* don't do mf_release_all() recursive */
@@ -1006,10 +982,7 @@ theend:
  * lalloc() with an ID for alloc_fail().
  */
     char_u *
-lalloc_id(size, message, id)
-    long_u	size;
-    int		message;
-    alloc_id_T	id UNUSED;
+lalloc_id(long_u size, int message, alloc_id_T id UNUSED)
 {
 #ifdef FEAT_EVAL
     if (alloc_fail_id == id && alloc_does_fail(size))
@@ -1023,9 +996,7 @@ lalloc_id(size, message, id)
  * realloc() with memory profiling.
  */
     void *
-mem_realloc(ptr, size)
-    void *ptr;
-    size_t size;
+mem_realloc(void *ptr, size_t size)
 {
     void *p;
 
@@ -1045,8 +1016,7 @@ mem_realloc(ptr, size)
 * Did_outofmem_msg is reset when a character is read.
 */
     void
-do_outofmem_msg(size)
-    long_u	size;
+do_outofmem_msg(long_u size)
 {
     if (!did_outofmem_msg)
     {
@@ -1075,7 +1045,7 @@ static void free_findfile(void);
  * Some things can't be freed, esp. things local to a library function.
  */
     void
-free_all_mem()
+free_all_mem(void)
 {
     buf_T	*buf, *nextbuf;
     static int	entered = FALSE;
@@ -1283,8 +1253,7 @@ free_all_mem()
  * Copy "string" into newly allocated memory.
  */
     char_u *
-vim_strsave(string)
-    char_u	*string;
+vim_strsave(char_u *string)
 {
     char_u	*p;
     unsigned	len;
@@ -1303,9 +1272,7 @@ vim_strsave(string)
  * shorter.
  */
     char_u *
-vim_strnsave(string, len)
-    char_u	*string;
-    int		len;
+vim_strnsave(char_u *string, int len)
 {
     char_u	*p;
 
@@ -1323,9 +1290,7 @@ vim_strnsave(string, len)
  * by a backslash.
  */
     char_u *
-vim_strsave_escaped(string, esc_chars)
-    char_u	*string;
-    char_u	*esc_chars;
+vim_strsave_escaped(char_u *string, char_u *esc_chars)
 {
     return vim_strsave_escaped_ext(string, esc_chars, '\\', FALSE);
 }
@@ -1336,11 +1301,11 @@ vim_strsave_escaped(string, esc_chars)
  * Escape the characters with "cc".
  */
     char_u *
-vim_strsave_escaped_ext(string, esc_chars, cc, bsl)
-    char_u	*string;
-    char_u	*esc_chars;
-    int		cc;
-    int		bsl;
+vim_strsave_escaped_ext(
+    char_u	*string,
+    char_u	*esc_chars,
+    int		cc,
+    int		bsl)
 {
     char_u	*p;
     char_u	*p2;
@@ -1397,7 +1362,7 @@ vim_strsave_escaped_ext(string, esc_char
  * Return TRUE when 'shell' has "csh" in the tail.
  */
     int
-csh_like_shell()
+csh_like_shell(void)
 {
     return (strstr((char *)gettail(p_sh), "csh") != NULL);
 }
@@ -1413,10 +1378,7 @@ csh_like_shell()
  * Returns the result in allocated memory, NULL if we have run out.
  */
     char_u *
-vim_strsave_shellescape(string, do_special, do_newline)
-    char_u	*string;
-    int		do_special;
-    int		do_newline;
+vim_strsave_shellescape(char_u *string, int do_special, int do_newline)
 {
     unsigned	length;
     char_u	*p;
@@ -1535,8 +1497,7 @@ vim_strsave_shellescape(string, do_speci
  * This uses ASCII lower-to-upper case translation, language independent.
  */
     char_u *
-vim_strsave_up(string)
-    char_u	*string;
+vim_strsave_up(char_u *string)
 {
     char_u *p1;
 
@@ -1550,9 +1511,7 @@ vim_strsave_up(string)
  * This uses ASCII lower-to-upper case translation, language independent.
  */
     char_u *
-vim_strnsave_up(string, len)
-    char_u	*string;
-    int		len;
+vim_strnsave_up(char_u *string, int len)
 {
     char_u *p1;
 
@@ -1565,8 +1524,8 @@ vim_strnsave_up(string, len)
  * ASCII lower-to-upper case translation, language independent.
  */
     void
-vim_strup(p)
-    char_u	*p;
+vim_strup(
+    char_u	*p)
 {
     char_u  *p2;
     int	    c;
@@ -1590,8 +1549,7 @@ vim_strup(p)
  * Returns NULL when out of memory.
  */
     char_u *
-strup_save(orig)
-    char_u	*orig;
+strup_save(char_u *orig)
 {
     char_u	*p;
     char_u	*res;
@@ -1650,8 +1608,7 @@ strup_save(orig)
  * delete spaces at the end of a string
  */
     void
-del_trailing_spaces(ptr)
-    char_u	*ptr;
+del_trailing_spaces(char_u *ptr)
 {
     char_u	*q;
 
@@ -1665,10 +1622,7 @@ del_trailing_spaces(ptr)
  * "to" must be "len + 1" long!
  */
     void
-vim_strncpy(to, from, len)
-    char_u	*to;
-    char_u	*from;
-    size_t	len;
+vim_strncpy(char_u *to, char_u *from, size_t len)
 {
     STRNCPY(to, from, len);
     to[len] = NUL;
@@ -1679,10 +1633,7 @@ vim_strncpy(to, from, len)
  * always NUL terminated.
  */
     void
-vim_strcat(to, from, tosize)
-    char_u	*to;
-    char_u	*from;
-    size_t	tosize;
+vim_strcat(char_u *to, char_u *from, size_t tosize)
 {
     size_t tolen = STRLEN(to);
     size_t fromlen = STRLEN(from);
@@ -1704,11 +1655,11 @@ vim_strcat(to, from, tosize)
  * The length is returned.
  */
     int
-copy_option_part(option, buf, maxlen, sep_chars)
-    char_u	**option;
-    char_u	*buf;
-    int		maxlen;
-    char	*sep_chars;
+copy_option_part(
+    char_u	**option,
+    char_u	*buf,
+    int		maxlen,
+    char	*sep_chars)
 {
     int	    len = 0;
     char_u  *p = *option;
@@ -1743,8 +1694,7 @@ copy_option_part(option, buf, maxlen, se
  * signal that was caused by a crash in free().
  */
     void
-vim_free(x)
-    void *x;
+vim_free(void *x)
 {
     if (x != NULL && !really_exiting)
     {
@@ -1757,10 +1707,7 @@ vim_free(x)
 
 #ifndef HAVE_MEMSET
     void *
-vim_memset(ptr, c, size)
-    void    *ptr;
-    int	    c;
-    size_t  size;
+vim_memset(void *ptr, int c, size_t size)
 {
     char *p = ptr;
 
@@ -1776,10 +1723,7 @@ vim_memset(ptr, c, size)
  * Return non-zero otherwise.
  */
     int
-vim_memcmp(b1, b2, len)
-    void    *b1;
-    void    *b2;
-    size_t  len;
+vim_memcmp(void *b1, void *b2, size_t len)
 {
     char_u  *p1 = (char_u *)b1, *p2 = (char_u *)b2;
 
@@ -1800,9 +1744,7 @@ vim_memcmp(b1, b2, len)
  * For systems that don't have a function that is guaranteed to do that (SYSV).
  */
     void
-mch_memmove(dst_arg, src_arg, len)
-    void    *src_arg, *dst_arg;
-    size_t  len;
+mch_memmove(void *src_arg, *dst_arg, size_t len)
 {
     /*
      * A void doesn't have a size, we use char pointers.
@@ -1830,9 +1772,7 @@ mch_memmove(dst_arg, src_arg, len)
  * return 0 for match, < 0 for smaller, > 0 for bigger
  */
     int
-vim_stricmp(s1, s2)
-    char	*s1;
-    char	*s2;
+vim_stricmp(char *s1, char *s2)
 {
     int		i;
 
@@ -1857,10 +1797,7 @@ vim_stricmp(s1, s2)
  * return 0 for match, < 0 for smaller, > 0 for bigger
  */
     int
-vim_strnicmp(s1, s2, len)
-    char	*s1;
-    char	*s2;
-    size_t	len;
+vim_strnicmp(char *s1, char *s2, size_t len)
 {
     int		i;
 
@@ -1885,9 +1822,7 @@ vim_strnicmp(s1, s2, len)
  * pointer to the NUL at the end of the string.
  */
     char_u  *
-vim_strchr(string, c)
-    char_u	*string;
-    int		c;
+vim_strchr(char_u *string, int c)
 {
     char_u	*p;
     int		b;
@@ -1946,9 +1881,7 @@ vim_strchr(string, c)
  * pointer to the NUL at the end of the string.
  */
     char_u  *
-vim_strbyte(string, c)
-    char_u	*string;
-    int		c;
+vim_strbyte(char_u *string, int c)
 {
     char_u	*p = string;
 
@@ -1967,9 +1900,7 @@ vim_strbyte(string, c)
  * Does not handle multi-byte char for "c"!
  */
     char_u  *
-vim_strrchr(string, c)
-    char_u	*string;
-    int		c;
+vim_strrchr(char_u *string, int c)
 {
     char_u	*retval = NULL;
     char_u	*p = string;
@@ -1993,9 +1924,7 @@ vim_strrchr(string, c)
 #   undef vim_strpbrk
 #  endif
     char_u *
-vim_strpbrk(s, charset)
-    char_u	*s;
-    char_u	*charset;
+vim_strpbrk(char_u *s, char_u *charset)
 {
     while (*s)
     {
@@ -2013,8 +1942,7 @@ vim_strpbrk(s, charset)
  * can't handle characters above 128.
  */
     int
-vim_isspace(x)
-    int	    x;
+vim_isspace(int x)
 {
     return ((x >= 9 && x <= 13) || x == ' ');
 }
@@ -2027,8 +1955,7 @@ vim_isspace(x)
  * Clear an allocated growing array.
  */
     void
-ga_clear(gap)
-    garray_T *gap;
+ga_clear(garray_T *gap)
 {
     vim_free(gap->ga_data);
     ga_init(gap);
@@ -2038,8 +1965,7 @@ ga_clear(gap)
  * Clear a growing array that contains a list of strings.
  */
     void
-ga_clear_strings(gap)
-    garray_T *gap;
+ga_clear_strings(garray_T *gap)
 {
     int		i;
 
@@ -2053,8 +1979,7 @@ ga_clear_strings(gap)
  * ga_growsize!  Or use ga_init2().
  */
     void
-ga_init(gap)
-    garray_T *gap;
+ga_init(garray_T *gap)
 {
     gap->ga_data = NULL;
     gap->ga_maxlen = 0;
@@ -2062,10 +1987,7 @@ ga_init(gap)
 }
 
     void
-ga_init2(gap, itemsize, growsize)
-    garray_T	*gap;
-    int		itemsize;
-    int		growsize;
+ga_init2(garray_T *gap, int itemsize, int growsize)
 {
     ga_init(gap);
     gap->ga_itemsize = itemsize;
@@ -2077,9 +1999,7 @@ ga_init2(gap, itemsize, growsize)
  * Return FAIL for failure, OK otherwise.
  */
     int
-ga_grow(gap, n)
-    garray_T	*gap;
-    int		n;
+ga_grow(garray_T *gap, int n)
 {
     size_t	old_len;
     size_t	new_len;
@@ -2108,9 +2028,7 @@ ga_grow(gap, n)
  * Returns NULL when out of memory.
  */
     char_u *
-ga_concat_strings(gap, sep)
-    garray_T *gap;
-    char     *sep;
+ga_concat_strings(garray_T *gap, char *sep)
 {
     int		i;
     int		len = 0;
@@ -2166,9 +2084,7 @@ ga_add_string(garray_T *gap, char_u *p)
  * Note: Does NOT copy the NUL at the end!
  */
     void
-ga_concat(gap, s)
-    garray_T	*gap;
-    char_u	*s;
+ga_concat(garray_T *gap, char_u *s)
 {
     int    len;
 
@@ -2186,9 +2102,7 @@ ga_concat(gap, s)
  * Append one byte to a growarray which contains bytes.
  */
     void
-ga_append(gap, c)
-    garray_T	*gap;
-    int		c;
+ga_append(garray_T *gap, int c)
 {
     if (ga_grow(gap, 1) == OK)
     {
@@ -2203,8 +2117,7 @@ ga_append(gap, c)
  * Append the text in "gap" below the cursor line and clear "gap".
  */
     void
-append_ga_line(gap)
-    garray_T	*gap;
+append_ga_line(garray_T *gap)
 {
     /* Remove trailing CR. */
     if (gap->ga_len > 0
@@ -2560,8 +2473,7 @@ static struct mousetable
  * modifier name ('S' for Shift, 'C' for Ctrl etc).
  */
     int
-name_to_mod_mask(c)
-    int	    c;
+name_to_mod_mask(int c)
 {
     int	    i;
 
@@ -2577,9 +2489,7 @@ name_to_mod_mask(c)
  * modifiers specified.
  */
     int
-simplify_key(key, modifiers)
-    int	    key;
-    int	    *modifiers;
+simplify_key(int key, int *modifiers)
 {
     int	    i;
     int	    key0;
@@ -2612,8 +2522,7 @@ simplify_key(key, modifiers)
  * Change <xHome> to <Home>, <xUp> to <Up>, etc.
  */
     int
-handle_x_keys(key)
-    int	    key;
+handle_x_keys(int key)
 {
     switch (key)
     {
@@ -2642,9 +2551,7 @@ handle_x_keys(key)
  * modifiers are down.
  */
     char_u *
-get_special_key_name(c, modifiers)
-    int	    c;
-    int	    modifiers;
+get_special_key_name(int c, int modifiers)
 {
     static char_u string[MAX_KEY_NAME_LEN + 1];
 
@@ -2762,10 +2669,10 @@ get_special_key_name(c, modifiers)
  * dst[] must be big enough to hold the result (up to six characters)!
  */
     int
-trans_special(srcp, dst, keycode)
-    char_u	**srcp;
-    char_u	*dst;
-    int		keycode; /* prefer key code, e.g. K_DEL instead of DEL */
+trans_special(
+    char_u	**srcp,
+    char_u	*dst,
+    int		keycode) /* prefer key code, e.g. K_DEL instead of DEL */
 {
     int		modifiers = 0;
     int		key;
@@ -2807,11 +2714,11 @@ trans_special(srcp, dst, keycode)
  * returns 0 if there is no match.
  */
     int
-find_special_key(srcp, modp, keycode, keep_x_key)
-    char_u	**srcp;
-    int		*modp;
-    int		keycode;     /* prefer key code, e.g. K_DEL instead of DEL */
-    int		keep_x_key;  /* don't translate xHome to Home key */
+find_special_key(
+    char_u	**srcp,
+    int		*modp,
+    int		keycode,     /* prefer key code, e.g. K_DEL instead of DEL */
+    int		keep_x_key)  /* don't translate xHome to Home key */
 {
     char_u	*last_dash;
     char_u	*end_of_name;
@@ -2947,9 +2854,7 @@ find_special_key(srcp, modp, keycode, ke
  * Changes "Shift-a" to 'A', "Alt-A" to 0xc0, etc.
  */
     int
-extract_modifiers(key, modp)
-    int	    key;
-    int	    *modp;
+extract_modifiers(int key, int *modp)
 {
     int	modifiers = *modp;
 
@@ -3003,8 +2908,7 @@ extract_modifiers(key, modp)
  * Return the index when found, -1 when not found.
  */
     int
-find_special_key_in_table(c)
-    int	    c;
+find_special_key_in_table(int c)
 {
     int	    i;
 
@@ -3024,8 +2928,7 @@ find_special_key_in_table(c)
  * Return the key code, or 0 if not found.
  */
     int
-get_special_key_code(name)
-    char_u  *name;
+get_special_key_code(char_u *name)
 {
     char_u  *table_name;
     char_u  string[3];
@@ -3057,8 +2960,7 @@ get_special_key_code(name)
 
 #if defined(FEAT_CMDL_COMPL) || defined(PROTO)
     char_u *
-get_key_name(i)
-    int	    i;
+get_key_name(int i)
 {
     if (i >= (int)KEY_NAMES_TABLE_LEN)
 	return NULL;
@@ -3072,10 +2974,7 @@ get_key_name(i)
  * arguments.  Return which button is down or was released.
  */
     int
-get_mouse_button(code, is_click, is_drag)
-    int	    code;
-    int	    *is_click;
-    int	    *is_drag;
+get_mouse_button(int code, int *is_click, int *is_drag)
 {
     int	    i;
 
@@ -3095,10 +2994,10 @@ get_mouse_button(code, is_click, is_drag
  * mouse was clicked, dragged or released.
  */
     int
-get_pseudo_mouse_code(button, is_click, is_drag)
-    int	    button;	/* eg MOUSE_LEFT */
-    int	    is_click;
-    int	    is_drag;
+get_pseudo_mouse_code(
+    int	    button,	/* eg MOUSE_LEFT */
+    int	    is_click,
+    int	    is_drag)
 {
     int	    i;
 
@@ -3133,8 +3032,7 @@ get_pseudo_mouse_code(button, is_click, 
  * Return the current end-of-line type: EOL_DOS, EOL_UNIX or EOL_MAC.
  */
     int
-get_fileformat(buf)
-    buf_T	*buf;
+get_fileformat(buf_T *buf)
 {
     int		c = *buf->b_p_ff;
 
@@ -3150,9 +3048,9 @@ get_fileformat(buf)
  * argument.
  */
     int
-get_fileformat_force(buf, eap)
-    buf_T	*buf;
-    exarg_T	*eap;	    /* can be NULL! */
+get_fileformat_force(
+    buf_T	*buf,
+    exarg_T	*eap)	    /* can be NULL! */
 {
     int		c;
 
@@ -3178,9 +3076,9 @@ get_fileformat_force(buf, eap)
  * Note: Does _not_ set global value of 'textmode'!
  */
     void
-set_fileformat(t, opt_flags)
-    int		t;
-    int		opt_flags;	/* OPT_LOCAL and/or OPT_GLOBAL */
+set_fileformat(
+    int		t,
+    int		opt_flags)	/* OPT_LOCAL and/or OPT_GLOBAL */
 {
     char	*p = NULL;
 
@@ -3217,7 +3115,7 @@ set_fileformat(t, opt_flags)
  * Return the default fileformat from 'fileformats'.
  */
     int
-default_fileformat()
+default_fileformat(void)
 {
     switch (*p_ffs)
     {
@@ -3231,9 +3129,7 @@ default_fileformat()
  * Call shell.	Calls mch_call_shell, with 'shellxquote' added.
  */
     int
-call_shell(cmd, opt)
-    char_u	*cmd;
-    int		opt;
+call_shell(char_u *cmd, int opt)
 {
     char_u	*ncmd;
     int		retval;
@@ -3329,7 +3225,7 @@ call_shell(cmd, opt)
  * NORMAL State with a condition.  This function returns the real State.
  */
     int
-get_real_state()
+get_real_state(void)
 {
     if (State & NORMAL)
     {
@@ -3352,9 +3248,7 @@ get_real_state()
  * "b" must point to the start of the file name
  */
     int
-after_pathsep(b, p)
-    char_u	*b;
-    char_u	*p;
+after_pathsep(char_u *b, char_u *p)
 {
     return p > b && vim_ispathsep(p[-1])
 			     && (!has_mbyte || (*mb_head_off)(b, p - 1) == 0);
@@ -3366,9 +3260,7 @@ after_pathsep(b, p)
  * "f1" may be a short name, "f2" must be a full path.
  */
     int
-same_directory(f1, f2)
-    char_u	*f1;
-    char_u	*f2;
+same_directory(char_u *f1, char_u *f2)
 {
     char_u	ffname[MAXPATHL];
     char_u	*t1;
@@ -3396,8 +3288,7 @@ same_directory(f1, f2)
  * Return OK or FAIL.
  */
     int
-vim_chdirfile(fname)
-    char_u	*fname;
+vim_chdirfile(char_u *fname)
 {
     char_u	dir[MAXPATHL];
 
@@ -3414,8 +3305,7 @@ vim_chdirfile(fname)
  * The Vim code assumes a trailing slash is only ignored for a directory.
  */
     int
-illegal_slash(name)
-    char *name;
+illegal_slash(char *name)
 {
     if (name[0] == NUL)
 	return FALSE;	    /* no file name is not illegal */
@@ -3490,8 +3380,7 @@ static char * mshape_names[] =
  * Returns error message for an illegal option, NULL otherwise.
  */
     char_u *
-parse_shape_opt(what)
-    int		what;
+parse_shape_opt(int what)
 {
     char_u	*modep;
     char_u	*colonp;
@@ -3737,8 +3626,7 @@ parse_shape_opt(what)
  * When "mouse" is TRUE, consider indexes valid for the mouse pointer.
  */
     int
-get_shape_idx(mouse)
-    int	mouse;
+get_shape_idx(int mouse)
 {
 #ifdef FEAT_MOUSESHAPE
     if (mouse && (State == HITRETURN || State == ASKMORE))
@@ -3800,8 +3688,7 @@ static int old_mouse_shape = 0;
  * when the mouse moves off the status or command line).
  */
     void
-update_mouseshape(shape_idx)
-    int	shape_idx;
+update_mouseshape(int shape_idx)
 {
     int new_mouse_shape;
 
@@ -4060,10 +3947,7 @@ static char_u e_pathtoolong[] = N_("E854
 static void *ff_fn_search_context = NULL;
 
     char_u *
-vim_findfirst(path, filename, level)
-    char_u	*path;
-    char_u	*filename;
-    int		level;
+vim_findfirst(char_u *path, char_u *filename, int level)
 {
     ff_fn_search_context =
 	vim_findfile_init(path, filename, NULL, level, TRUE, FALSE,
@@ -4075,7 +3959,7 @@ vim_findfirst(path, filename, level)
 }
 
     char_u *
-vim_findnext()
+vim_findnext(void)
 {
     char_u *ret = vim_findfile(ff_fn_search_context);
 
@@ -4141,17 +4025,16 @@ vim_findnext()
  * limited functionality then.
  */
     void *
-vim_findfile_init(path, filename, stopdirs, level, free_visited, find_what,
-					   search_ctx_arg, tagfile, rel_fname)
-    char_u	*path;
-    char_u	*filename;
-    char_u	*stopdirs UNUSED;
-    int		level;
-    int		free_visited;
-    int		find_what;
-    void	*search_ctx_arg;
-    int		tagfile;	/* expanding names of tags files */
-    char_u	*rel_fname;	/* file name to use for "." */
+vim_findfile_init(
+    char_u	*path,
+    char_u	*filename,
+    char_u	*stopdirs UNUSED,
+    int		level,
+    int		free_visited,
+    int		find_what,
+    void	*search_ctx_arg,
+    int		tagfile,	/* expanding names of tags files */
+    char_u	*rel_fname)	/* file name to use for "." */
 {
 #ifdef FEAT_PATH_EXTRA
     char_u		*wc_part;
@@ -4491,8 +4374,7 @@ error_return:
  * Get the stopdir string.  Check that ';' is not escaped.
  */
     char_u *
-vim_findfile_stopdir(buf)
-    char_u	*buf;
+vim_findfile_stopdir(char_u *buf)
 {
     char_u	*r_ptr = buf;
 
@@ -4522,8 +4404,7 @@ vim_findfile_stopdir(buf)
  * Clean up the given search context. Can handle a NULL pointer.
  */
     void
-vim_findfile_cleanup(ctx)
-    void	*ctx;
+vim_findfile_cleanup(void *ctx)
 {
     if (ctx == NULL)
 	return;
@@ -4546,8 +4427,7 @@ vim_findfile_cleanup(ctx)
  * top of the list).
  */
     char_u *
-vim_findfile(search_ctx_arg)
-    void	*search_ctx_arg;
+vim_findfile(void *search_ctx_arg)
 {
     char_u	*file_path;
 #ifdef FEAT_PATH_EXTRA
@@ -4997,8 +4877,7 @@ vim_findfile(search_ctx_arg)
  * Can handle it if the passed search_context is NULL;
  */
     void
-vim_findfile_free_visited(search_ctx_arg)
-    void	*search_ctx_arg;
+vim_findfile_free_visited(void *search_ctx_arg)
 {
     ff_search_ctx_T *search_ctx;
 
@@ -5011,8 +4890,7 @@ vim_findfile_free_visited(search_ctx_arg
 }
 
     static void
-vim_findfile_free_visited_list(list_headp)
-    ff_visited_list_hdr_T	**list_headp;
+vim_findfile_free_visited_list(ff_visited_list_hdr_T **list_headp)
 {
     ff_visited_list_hdr_T *vp;
 
@@ -5029,8 +4907,7 @@ vim_findfile_free_visited_list(list_head
 }
 
     static void
-ff_free_visited_list(vl)
-    ff_visited_T *vl;
+ff_free_visited_list(ff_visited_T *vl)
 {
     ff_visited_T *vp;
 
@@ -5051,9 +4928,9 @@ ff_free_visited_list(vl)
  * allocates a new one.
  */
     static ff_visited_list_hdr_T*
-ff_get_visited_list(filename, list_headp)
-    char_u			*filename;
-    ff_visited_list_hdr_T	**list_headp;
+ff_get_visited_list(
+    char_u			*filename,
+    ff_visited_list_hdr_T	**list_headp)
 {
     ff_visited_list_hdr_T  *retptr = NULL;
 
@@ -5124,9 +5001,7 @@ ff_get_visited_list(filename, list_headp
  *    '**\20' is equal to '**\24'
  */
     static int
-ff_wc_equal(s1, s2)
-    char_u	*s1;
-    char_u	*s2;
+ff_wc_equal(char_u *s1, char_u *s2)
 {
     int		i, j;
     int		c1 = NUL;
@@ -5168,16 +5043,13 @@ ff_wc_equal(s1, s2)
  *	    never.
  */
     static int
-ff_check_visited(visited_list, fname
+ff_check_visited(
+    ff_visited_T	**visited_list,
+    char_u		*fname
 #ifdef FEAT_PATH_EXTRA
-	, wc_path
-#endif
-	)
-    ff_visited_T	**visited_list;
-    char_u		*fname;
-#ifdef FEAT_PATH_EXTRA
-    char_u		*wc_path;
-#endif
+    , char_u		*wc_path
+#endif
+    )
 {
     ff_visited_T	*vp;
 #ifdef UNIX
@@ -5268,17 +5140,13 @@ ff_check_visited(visited_list, fname
  * create stack element from given path pieces
  */
     static ff_stack_T *
-ff_create_stack_element(fix_part,
+ff_create_stack_element(
+    char_u	*fix_part,
 #ifdef FEAT_PATH_EXTRA
-	wc_part,
-#endif
-	level, star_star_empty)
-    char_u	*fix_part;
-#ifdef FEAT_PATH_EXTRA
-    char_u	*wc_part;
-#endif
-    int		level;
-    int		star_star_empty;
+    char_u	*wc_part,
+#endif
+    int		level,
+    int		star_star_empty)
 {
     ff_stack_T	*new;
 
@@ -5322,9 +5190,7 @@ ff_create_stack_element(fix_part,
  * Push a dir on the directory stack.
  */
     static void
-ff_push(search_ctx, stack_ptr)
-    ff_search_ctx_T *search_ctx;
-    ff_stack_T	    *stack_ptr;
+ff_push(ff_search_ctx_T *search_ctx, ff_stack_T *stack_ptr)
 {
     /* check for NULL pointer, not to return an error to the user, but
      * to prevent a crash */
@@ -5340,8 +5206,7 @@ ff_push(search_ctx, stack_ptr)
  * Returns NULL if stack is empty.
  */
     static ff_stack_T *
-ff_pop(search_ctx)
-    ff_search_ctx_T *search_ctx;
+ff_pop(ff_search_ctx_T *search_ctx)
 {
     ff_stack_T  *sptr;
 
@@ -5356,8 +5221,7 @@ ff_pop(search_ctx)
  * free the given stack element
  */
     static void
-ff_free_stack_element(stack_ptr)
-    ff_stack_T  *stack_ptr;
+ff_free_stack_element(ff_stack_T *stack_ptr)
 {
     /* vim_free handles possible NULL pointers */
     vim_free(stack_ptr->ffs_fix_path);
@@ -5375,8 +5239,7 @@ ff_free_stack_element(stack_ptr)
  * Clear the search context, but NOT the visited list.
  */
     static void
-ff_clear(search_ctx)
-    ff_search_ctx_T *search_ctx;
+ff_clear(ff_search_ctx_T *search_ctx)
 {
     ff_stack_T   *sptr;
 
@@ -5422,10 +5285,7 @@ ff_clear(search_ctx)
  * returns TRUE if yes else FALSE
  */
     static int
-ff_path_in_stoplist(path, path_len, stopdirs_v)
-    char_u	*path;
-    int		path_len;
-    char_u	**stopdirs_v;
+ff_path_in_stoplist(char_u *path, int path_len, char_u **stopdirs_v)
 {
     int		i = 0;
 
@@ -5486,12 +5346,12 @@ ff_path_in_stoplist(path, path_len, stop
  *
  */
     char_u *
-find_file_in_path(ptr, len, options, first, rel_fname)
-    char_u	*ptr;		/* file name */
-    int		len;		/* length of file name */
-    int		options;
-    int		first;		/* use count'th matching file name */
-    char_u	*rel_fname;	/* file name searching relative to */
+find_file_in_path(
+    char_u	*ptr,		/* file name */
+    int		len,		/* length of file name */
+    int		options,
+    int		first,		/* use count'th matching file name */
+    char_u	*rel_fname)	/* file name searching relative to */
 {
     return find_file_in_path_option(ptr, len, options, first,
 	    *curbuf->b_p_path == NUL ? p_path : curbuf->b_p_path,
@@ -5503,7 +5363,7 @@ static void	*fdip_search_ctx = NULL;
 
 #if defined(EXITFREE)
     static void
-free_findfile()
+free_findfile(void)
 {
     vim_free(ff_file_to_find);
     vim_findfile_cleanup(fdip_search_ctx);
@@ -5522,27 +5382,26 @@ free_findfile()
  * Returns an allocated string for the file name.  NULL for error.
  */
     char_u *
-find_directory_in_path(ptr, len, options, rel_fname)
-    char_u	*ptr;		/* file name */
-    int		len;		/* length of file name */
-    int		options;
-    char_u	*rel_fname;	/* file name searching relative to */
+find_directory_in_path(
+    char_u	*ptr,		/* file name */
+    int		len,		/* length of file name */
+    int		options,
+    char_u	*rel_fname)	/* file name searching relative to */
 {
     return find_file_in_path_option(ptr, len, options, TRUE, p_cdpath,
 				       FINDFILE_DIR, rel_fname, (char_u *)"");
 }
 
     char_u *
-find_file_in_path_option(ptr, len, options, first, path_option,
-			 find_what, rel_fname, suffixes)
-    char_u	*ptr;		/* file name */
-    int		len;		/* length of file name */
-    int		options;
-    int		first;		/* use count'th matching file name */
-    char_u	*path_option;	/* p_path or p_cdpath */
-    int		find_what;	/* FINDFILE_FILE, _DIR or _BOTH */
-    char_u	*rel_fname;	/* file name we are looking relative to. */
-    char_u	*suffixes;	/* list of suffixes, 'suffixesadd' option */
+find_file_in_path_option(
+    char_u	*ptr,		/* file name */
+    int		len,		/* length of file name */
+    int		options,
+    int		first,		/* use count'th matching file name */
+    char_u	*path_option,	/* p_path or p_cdpath */
+    int		find_what,	/* FINDFILE_FILE, _DIR or _BOTH */
+    char_u	*rel_fname,	/* file name we are looking relative to. */
+    char_u	*suffixes)	/* list of suffixes, 'suffixesadd' option */
 {
     static char_u	*dir;
     static int		did_findfile_init = FALSE;
@@ -5764,8 +5623,7 @@ theend:
  * 'cdpath' for relative directory names, otherwise just mch_chdir().
  */
     int
-vim_chdir(new_dir)
-    char_u	*new_dir;
+vim_chdir(char_u *new_dir)
 {
 #ifndef FEAT_SEARCHPATH
     return mch_chdir((char *)new_dir);
@@ -5791,9 +5649,7 @@ vim_chdir(new_dir)
  * Returns OK or FAIL.
  */
     int
-get_user_name(buf, len)
-    char_u	*buf;
-    int		len;
+get_user_name(char_u *buf, int len)
 {
     if (username == NULL)
     {
@@ -5812,11 +5668,11 @@ get_user_name(buf, len)
  * It's simple and slow.  From the K&R C book.
  */
     void
-qsort(base, elm_count, elm_size, cmp)
-    void	*base;
-    size_t	elm_count;
-    size_t	elm_size;
-    int (*cmp)(const void *, const void *);
+qsort(
+    void	*base,
+    size_t	elm_count,
+    size_t	elm_size,
+    int (*cmp)(const void *, const void *))
 {
     char_u	*buf;
     char_u	*p1;
@@ -5860,17 +5716,15 @@ sort_compare(const void *s1, const void 
 #ifdef __BORLANDC__
 _RTLENTRYF
 #endif
-sort_compare(s1, s2)
-    const void	*s1;
-    const void	*s2;
+sort_compare(const void *s1, const void *s2)
 {
     return STRCMP(*(char **)s1, *(char **)s2);
 }
 
     void
-sort_strings(files, count)
-    char_u	**files;
-    int		count;
+sort_strings(
+    char_u	**files,
+    int		count)
 {
     qsort((void *)files, (size_t)count, sizeof(char_u *), sort_compare);
 }
@@ -5882,9 +5736,7 @@ sort_strings(files, count)
  * Return value like strcmp(p, q), but consider path separators.
  */
     int
-pathcmp(p, q, maxlen)
-    const char *p, *q;
-    int maxlen;
+pathcmp(const char *p, const char *q, int maxlen)
 {
     int		i, j;
     int		c1, c2;
@@ -5994,8 +5846,7 @@ static int  newenv(void);	/* copy env. f
 static int  moreenv(void);	/* incr. size of env. */
 
     int
-putenv(string)
-    const char *string;
+putenv(const char *string)
 {
     int	    i;
     char    *p;
@@ -6034,8 +5885,7 @@ putenv(string)
 }
 
     static int
-findenv(name)
-    char *name;
+findenv(char *name)
 {
     char    *namechar, *envchar;
     int	    i, found;
@@ -6056,7 +5906,7 @@ findenv(name)
 }
 
     static int
-newenv()
+newenv(void)
 {
     char    **env, *elem;
     int	    i, esize;
@@ -6091,7 +5941,7 @@ newenv()
 }
 
     static int
-moreenv()
+moreenv(void)
 {
     int	    esize;
     char    **env;
@@ -6107,8 +5957,7 @@ moreenv()
 
 # ifdef USE_VIMPTY_GETENV
     char_u *
-vimpty_getenv(string)
-    const char_u *string;
+vimpty_getenv(const char_u *string)
 {
     int i;
     char_u *p;
@@ -6134,8 +5983,7 @@ vimpty_getenv(string)
  * rights to write into.
  */
     int
-filewritable(fname)
-    char_u	*fname;
+filewritable(char_u *fname)
 {
     int		retval = 0;
 #if defined(UNIX) || defined(VMS)
@@ -6171,8 +6019,7 @@ filewritable(fname)
  * This is not in message.c to avoid a warning for prototypes.
  */
     int
-emsg3(s, a1, a2)
-    char_u *s, *a1, *a2;
+emsg3(char_u *s, char_u *a1, char_u *a2)
 {
     if (emsg_not_now())
 	return TRUE;		/* no error messages at the moment */
@@ -6189,9 +6036,7 @@ emsg3(s, a1, a2)
  * This is not in message.c to avoid a warning for prototypes.
  */
     int
-emsgn(s, n)
-    char_u	*s;
-    long	n;
+emsgn(char_u *s, long n)
 {
     if (emsg_not_now())
 	return TRUE;		/* no error messages at the moment */
@@ -6204,8 +6049,7 @@ emsgn(s, n)
  * Read 2 bytes from "fd" and turn them into an int, MSB first.
  */
     int
-get2c(fd)
-    FILE	*fd;
+get2c(FILE *fd)
 {
     int		n;
 
@@ -6218,8 +6062,7 @@ get2c(fd)
  * Read 3 bytes from "fd" and turn them into an int, MSB first.
  */
     int
-get3c(fd)
-    FILE	*fd;
+get3c(FILE *fd)
 {
     int		n;
 
@@ -6233,8 +6076,7 @@ get3c(fd)
  * Read 4 bytes from "fd" and turn them into an int, MSB first.
  */
     int
-get4c(fd)
-    FILE	*fd;
+get4c(FILE *fd)
 {
     /* Use unsigned rather than int otherwise result is undefined
      * when left-shift sets the MSB. */
@@ -6251,8 +6093,7 @@ get4c(fd)
  * Read 8 bytes from "fd" and turn them into a time_t, MSB first.
  */
     time_t
-get8ctime(fd)
-    FILE	*fd;
+get8ctime(FILE *fd)
 {
     time_t	n = 0;
     int		i;
@@ -6267,9 +6108,7 @@ get8ctime(fd)
  * Returns NULL when out of memory or unable to read that many bytes.
  */
     char_u *
-read_string(fd, cnt)
-    FILE	*fd;
-    int		cnt;
+read_string(FILE *fd, int cnt)
 {
     char_u	*str;
     int		i;
@@ -6299,10 +6138,7 @@ read_string(fd, cnt)
  * Write a number to file "fd", MSB first, in "len" bytes.
  */
     int
-put_bytes(fd, nr, len)
-    FILE    *fd;
-    long_u  nr;
-    int	    len;
+put_bytes(FILE *fd, long_u nr, int len)
 {
     int	    i;
 
@@ -6325,9 +6161,7 @@ put_bytes(fd, nr, len)
  * Returns FAIL when the write failed.
  */
     int
-put_time(fd, the_time)
-    FILE	*fd;
-    time_t	the_time;
+put_time(FILE *fd, time_t the_time)
 {
     char_u	buf[8];
 
@@ -6339,9 +6173,7 @@ put_time(fd, the_time)
  * Write time_t to "buf[8]".
  */
     void
-time_to_bytes(the_time, buf)
-    time_t	the_time;
-    char_u	*buf;
+time_to_bytes(time_t the_time, char_u *buf)
 {
     int		c;
     int		i;
@@ -6387,8 +6219,7 @@ time_to_bytes(the_time, buf)
  * When "s" is NULL FALSE is returned.
  */
     int
-has_non_ascii(s)
-    char_u	*s;
+has_non_ascii(char_u *s)
 {
     char_u	*p;
 
@@ -6407,7 +6238,7 @@ has_non_ascii(s)
  * it is safe to do so.
  */
     void
-parse_queued_messages()
+parse_queued_messages(void)
 {
 # ifdef FEAT_NETBEANS_INTG
     /* Process the queued netbeans messages. */
--- a/src/move.c
+++ b/src/move.c
@@ -48,8 +48,7 @@ static void max_topfill(void);
  * wp->w_topline changed.
  */
     static void
-comp_botline(wp)
-    win_T	*wp;
+comp_botline(win_T *wp)
 {
     int		n;
     linenr_T	lnum;
@@ -129,8 +128,7 @@ comp_botline(wp)
  * set.
  */
     static void
-redraw_for_cursorline(wp)
-    win_T *wp;
+redraw_for_cursorline(win_T *wp)
 {
     if ((wp->w_p_rnu
 #ifdef FEAT_SYN_HL
@@ -150,7 +148,7 @@ redraw_for_cursorline(wp)
  * Used to update the screen before printing a message.
  */
     void
-update_topline_redraw()
+update_topline_redraw(void)
 {
     update_topline();
     if (must_redraw)
@@ -161,7 +159,7 @@ update_topline_redraw()
  * Update curwin->w_topline to move the cursor onto the screen.
  */
     void
-update_topline()
+update_topline(void)
 {
     long	line_count;
     int		halfheight;
@@ -420,7 +418,7 @@ update_topline()
  * When 'scrolljump' is negative use it as a percentage of the window height.
  */
     static int
-scrolljump_value()
+scrolljump_value(void)
 {
     if (p_sj >= 0)
 	return (int)p_sj;
@@ -432,7 +430,7 @@ scrolljump_value()
  * current window.
  */
     static int
-check_top_offset()
+check_top_offset(void)
 {
     lineoff_T	loff;
     int		n;
@@ -470,7 +468,7 @@ check_top_offset()
 }
 
     void
-update_curswant()
+update_curswant(void)
 {
     if (curwin->w_set_curswant)
     {
@@ -484,8 +482,7 @@ update_curswant()
  * Check if the cursor has moved.  Set the w_valid flag accordingly.
  */
     void
-check_cursor_moved(wp)
-    win_T	*wp;
+check_cursor_moved(win_T *wp)
 {
     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.
  */
     void
-changed_window_setting()
+changed_window_setting(void)
 {
     changed_window_setting_win(curwin);
 }
 
     void
-changed_window_setting_win(wp)
-    win_T	*wp;
+changed_window_setting_win(win_T *wp)
 {
     wp->w_lines_valid = 0;
     changed_line_abv_curs_win(wp);
@@ -535,9 +531,7 @@ changed_window_setting_win(wp)
  * Set wp->w_topline to a certain number.
  */
     void
-set_topline(wp, lnum)
-    win_T	*wp;
-    linenr_T	lnum;
+set_topline(win_T *wp, linenr_T lnum)
 {
 #ifdef FEAT_FOLDING
     /* go to first of folded lines */
@@ -563,15 +557,14 @@ set_topline(wp, lnum)
  * Need to take care of w_botline separately!
  */
     void
-changed_cline_bef_curs()
+changed_cline_bef_curs(void)
 {
     curwin->w_valid &= ~(VALID_WROW|VALID_WCOL|VALID_VIRTCOL
 						|VALID_CHEIGHT|VALID_TOPLINE);
 }
 
     void
-changed_cline_bef_curs_win(wp)
-    win_T	*wp;
+changed_cline_bef_curs_win(win_T *wp)
 {
     wp->w_valid &= ~(VALID_WROW|VALID_WCOL|VALID_VIRTCOL
 						|VALID_CHEIGHT|VALID_TOPLINE);
@@ -583,15 +576,14 @@ changed_cline_bef_curs_win(wp)
  * Need to take care of w_botline separately!
  */
     void
-changed_line_abv_curs()
+changed_line_abv_curs(void)
 {
     curwin->w_valid &= ~(VALID_WROW|VALID_WCOL|VALID_VIRTCOL|VALID_CROW
 						|VALID_CHEIGHT|VALID_TOPLINE);
 }
 
     void
-changed_line_abv_curs_win(wp)
-    win_T	*wp;
+changed_line_abv_curs_win(win_T *wp)
 {
     wp->w_valid &= ~(VALID_WROW|VALID_WCOL|VALID_VIRTCOL|VALID_CROW
 						|VALID_CHEIGHT|VALID_TOPLINE);
@@ -601,7 +593,7 @@ changed_line_abv_curs_win(wp)
  * Make sure the value of curwin->w_botline is valid.
  */
     void
-validate_botline()
+validate_botline(void)
 {
     if (!(curwin->w_valid & VALID_BOTLINE))
 	comp_botline(curwin);
@@ -611,21 +603,20 @@ validate_botline()
  * Mark curwin->w_botline as invalid (because of some change in the buffer).
  */
     void
-invalidate_botline()
+invalidate_botline(void)
 {
     curwin->w_valid &= ~(VALID_BOTLINE|VALID_BOTLINE_AP);
 }
 
     void
-invalidate_botline_win(wp)
-    win_T	*wp;
+invalidate_botline_win(win_T *wp)
 {
     wp->w_valid &= ~(VALID_BOTLINE|VALID_BOTLINE_AP);
 }
 
     void
-approximate_botline_win(wp)
-    win_T	*wp;
+approximate_botline_win(
+    win_T	*wp)
 {
     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.
  */
     int
-cursor_valid()
+cursor_valid(void)
 {
     check_cursor_moved(curwin);
     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!
  */
     void
-validate_cursor()
+validate_cursor(void)
 {
     check_cursor_moved(curwin);
     if ((curwin->w_valid & (VALID_WCOL|VALID_WROW)) != (VALID_WCOL|VALID_WROW))
@@ -658,7 +649,7 @@ validate_cursor()
  * validate w_cline_row.
  */
     void
-validate_cline_row()
+validate_cline_row(void)
 {
     /*
      * First make sure that w_topline is valid (after moving the cursor).
@@ -675,8 +666,7 @@ validate_cline_row()
  * of wp->w_topline.
  */
     static void
-curs_rows(wp)
-    win_T	*wp;
+curs_rows(win_T *wp)
 {
     linenr_T	lnum;
     int		i;
@@ -801,7 +791,7 @@ curs_rows(wp)
  * Validate curwin->w_virtcol only.
  */
     void
-validate_virtcol()
+validate_virtcol(void)
 {
     validate_virtcol_win(curwin);
 }
@@ -810,8 +800,7 @@ validate_virtcol()
  * Validate wp->w_virtcol only.
  */
     void
-validate_virtcol_win(wp)
-    win_T	*wp;
+validate_virtcol_win(win_T *wp)
 {
     check_cursor_moved(wp);
     if (!(wp->w_valid & VALID_VIRTCOL))
@@ -833,7 +822,7 @@ validate_virtcol_win(wp)
  * Validate curwin->w_cline_height only.
  */
     static void
-validate_cheight()
+validate_cheight(void)
 {
     check_cursor_moved(curwin);
     if (!(curwin->w_valid & VALID_CHEIGHT))
@@ -856,7 +845,7 @@ validate_cheight()
  * Validate w_wcol and w_virtcol only.
  */
     void
-validate_cursor_col()
+validate_cursor_col(void)
 {
     colnr_T off;
     colnr_T col;
@@ -891,8 +880,7 @@ validate_cursor_col()
  * fold column and sign column (these don't move when scrolling horizontally).
  */
     int
-win_col_off(wp)
-    win_T	*wp;
+win_col_off(win_T *wp)
 {
     return (((wp->w_p_nu || wp->w_p_rnu) ? number_width(wp) + 1 : 0)
 #ifdef FEAT_CMDWIN
@@ -913,7 +901,7 @@ win_col_off(wp)
 }
 
     int
-curwin_col_off()
+curwin_col_off(void)
 {
     return win_col_off(curwin);
 }
@@ -924,8 +912,7 @@ curwin_col_off()
  * 'cpoptions'.
  */
     int
-win_col_off2(wp)
-    win_T	*wp;
+win_col_off2(win_T *wp)
 {
     if ((wp->w_p_nu || wp->w_p_rnu) && vim_strchr(p_cpo, CPO_NUMCOL) != NULL)
 	return number_width(wp) + 1;
@@ -933,7 +920,7 @@ win_col_off2(wp)
 }
 
     int
-curwin_col_off2()
+curwin_col_off2(void)
 {
     return win_col_off2(curwin);
 }
@@ -944,8 +931,8 @@ curwin_col_off2()
  * Also updates curwin->w_leftcol.
  */
     void
-curs_columns(may_scroll)
-    int		may_scroll;	/* when TRUE, may scroll horizontally */
+curs_columns(
+    int		may_scroll)	/* when TRUE, may scroll horizontally */
 {
     int		diff;
     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"
  */
     void
-scrolldown(line_count, byfold)
-    long	line_count;
-    int		byfold UNUSED;	/* TRUE: count a closed fold as one line */
+scrolldown(
+    long	line_count,
+    int		byfold UNUSED)	/* TRUE: count a closed fold as one line */
 {
     long	done = 0;	/* total # of physical lines done */
     int		wrow;
@@ -1314,9 +1301,9 @@ scrolldown(line_count, byfold)
  * Scroll the current window up by "line_count" logical lines.  "CTRL-E"
  */
     void
-scrollup(line_count, byfold)
-    long	line_count;
-    int		byfold UNUSED;	/* TRUE: count a closed fold as one line */
+scrollup(
+    long	line_count,
+    int		byfold UNUSED)	/* TRUE: count a closed fold as one line */
 {
 #if defined(FEAT_FOLDING) || defined(FEAT_DIFF)
     linenr_T	lnum;
@@ -1396,9 +1383,9 @@ scrollup(line_count, byfold)
  * Don't end up with too many filler lines in the window.
  */
     void
-check_topfill(wp, down)
-    win_T	*wp;
-    int		down;	/* when TRUE scroll down when not enough space */
+check_topfill(
+    win_T	*wp,
+    int		down)	/* when TRUE scroll down when not enough space */
 {
     int		n;
 
@@ -1427,7 +1414,7 @@ check_topfill(wp, down)
  * is still visible.
  */
     static void
-max_topfill()
+max_topfill(void)
 {
     int		n;
 
@@ -1449,7 +1436,7 @@ max_topfill()
  * cursor off the screen.
  */
     void
-scrolldown_clamp()
+scrolldown_clamp(void)
 {
     int		end_row;
 #ifdef FEAT_DIFF
@@ -1520,7 +1507,7 @@ scrolldown_clamp()
  * off the screen.
  */
     void
-scrollup_clamp()
+scrollup_clamp(void)
 {
     int	    start_row;
 
@@ -1579,8 +1566,7 @@ scrollup_clamp()
  * Lines above the first one are incredibly high: MAXCOL.
  */
     static void
-topline_back(lp)
-    lineoff_T	*lp;
+topline_back(lineoff_T *lp)
 {
 #ifdef FEAT_DIFF
     if (lp->fill < diff_check_fill(curwin, lp->lnum))
@@ -1616,8 +1602,7 @@ topline_back(lp)
  * Lines below the last one are incredibly high.
  */
     static void
-botline_forw(lp)
-    lineoff_T	*lp;
+botline_forw(lineoff_T *lp)
 {
 #ifdef FEAT_DIFF
     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.
  */
     static void
-botline_topline(lp)
-    lineoff_T	*lp;
+botline_topline(lineoff_T *lp)
 {
     if (lp->fill > 0)
     {
@@ -1671,8 +1655,7 @@ botline_topline(lp)
  * When there are no filler lines nothing changes.
  */
     static void
-topline_botline(lp)
-    lineoff_T	*lp;
+topline_botline(lineoff_T *lp)
 {
     if (lp->fill > 0)
     {
@@ -1688,9 +1671,7 @@ topline_botline(lp)
  * If "always" is TRUE, always set topline (for "zt").
  */
     void
-scroll_cursor_top(min_scroll, always)
-    int		min_scroll;
-    int		always;
+scroll_cursor_top(int min_scroll, int always)
 {
     int		scrolled = 0;
     int		extra = 0;
@@ -1828,9 +1809,7 @@ scroll_cursor_top(min_scroll, always)
  * screen lines for text lines.
  */
     void
-set_empty_rows(wp, used)
-    win_T	*wp;
-    int		used;
+set_empty_rows(win_T *wp, int used)
 {
 #ifdef FEAT_DIFF
     wp->w_filler_rows = 0;
@@ -1863,9 +1842,7 @@ set_empty_rows(wp, used)
  * This is messy stuff!!!
  */
     void
-scroll_cursor_bot(min_scroll, set_topbot)
-    int		min_scroll;
-    int		set_topbot;
+scroll_cursor_bot(int min_scroll, int set_topbot)
 {
     int		used;
     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.
  */
     void
-scroll_cursor_halfway(atend)
-    int		atend;
+scroll_cursor_halfway(int atend)
 {
     int		above = 0;
     linenr_T	topline;
@@ -2171,7 +2147,7 @@ scroll_cursor_halfway(atend)
  * When called topline must be valid!
  */
     void
-cursor_correct()
+cursor_correct(void)
 {
     int		above = 0;	    /* screen lines above topline */
     linenr_T	topline;
@@ -2298,9 +2274,7 @@ static void get_scroll_overlap(lineoff_T
  * return FAIL for failure, OK otherwise
  */
     int
-onepage(dir, count)
-    int		dir;
-    long	count;
+onepage(int dir, long count)
 {
     long	n;
     int		retval = OK;
@@ -2549,9 +2523,7 @@ onepage(dir, count)
  *  l3				   etc.
  */
     static void
-get_scroll_overlap(lp, dir)
-    lineoff_T	*lp;
-    int		dir;
+get_scroll_overlap(lineoff_T *lp, int dir)
 {
     int		h1, h2, h3, h4;
     int		min_height = curwin->w_height - 2;
@@ -2611,9 +2583,7 @@ get_scroll_overlap(lp, dir)
  * Scroll 'scroll' lines up or down.
  */
     void
-halfpage(flag, Prenum)
-    int		flag;
-    linenr_T	Prenum;
+halfpage(int flag, linenr_T Prenum)
 {
     long	scrolled = 0;
     int		i;
@@ -2831,7 +2801,7 @@ halfpage(flag, Prenum)
 
 #if defined(FEAT_CURSORBIND) || defined(PROTO)
     void
-do_check_cursorbind()
+do_check_cursorbind(void)
 {
     linenr_T	line = curwin->w_cursor.lnum;
     colnr_T	col = curwin->w_cursor.col;
--- a/src/netbeans.c
+++ b/src/netbeans.c
@@ -561,7 +561,7 @@ static int curPCtype = -1;
  * Free netbeans resources.
  */
     static void
-nb_free()
+nb_free(void)
 {
     keyQ_T *key_node = keyHead.next;
     nbbuf_T buf;
@@ -2355,22 +2355,20 @@ special_keys(char_u *args)
 }
 
     void
-ex_nbclose(eap)
-    exarg_T	*eap UNUSED;
+ex_nbclose(exarg_T *eap UNUSED)
 {
     netbeans_close();
 }
 
     void
-ex_nbkey(eap)
-    exarg_T	*eap;
+ex_nbkey(exarg_T *eap)
 {
     (void)netbeans_keystring(eap->arg);
 }
 
     void
-ex_nbstart(eap)
-    exarg_T	*eap;
+ex_nbstart(
+    exarg_T	*eap)
 {
 #ifdef FEAT_GUI
 # if !defined(FEAT_GUI_X11) && !defined(FEAT_GUI_GTK)  \
@@ -2572,7 +2570,7 @@ netbeans_open(char *params, int doabort)
  * before calling exit.
  */
     void
-netbeans_send_disconnect()
+netbeans_send_disconnect(void)
 {
     char buf[128];
 
@@ -3400,8 +3398,7 @@ pos2off(buf_T *buf, pos_T *pos)
  * doesn't normally call readfile, we do our own.
  */
     static void
-print_read_msg(buf)
-    nbbuf_T	*buf;
+print_read_msg(nbbuf_T *buf)
 {
     int	    lnum = buf->bufp->b_ml.ml_line_count;
     off_t   nchars = buf->bufp->b_orig_size;
@@ -3438,9 +3435,7 @@ print_read_msg(buf)
  * writing a file.
  */
     static void
-print_save_msg(buf, nchars)
-    nbbuf_T	*buf;
-    off_t	nchars;
+print_save_msg(nbbuf_T *buf, off_t nchars)
 {
     char_u	c;
     char_u	*p;
--- a/src/normal.c
+++ b/src/normal.c
@@ -452,9 +452,7 @@ static int nv_max_linear;
 #ifdef __BORLANDC__
 _RTLENTRYF
 #endif
-nv_compare(s1, s2)
-    const void	*s1;
-    const void	*s2;
+nv_compare(const void *s1, const void *s2)
 {
     int		c1, c2;
 
@@ -472,7 +470,7 @@ nv_compare(s1, s2)
  * Initialize the nv_cmd_idx[] table.
  */
     void
-init_normal_cmds()
+init_normal_cmds(void)
 {
     int		i;
 
@@ -495,8 +493,7 @@ init_normal_cmds()
  * Returns -1 for invalid command.
  */
     static int
-find_command(cmdchar)
-    int		cmdchar;
+find_command(int cmdchar)
 {
     int		i;
     int		idx;
@@ -546,9 +543,9 @@ find_command(cmdchar)
  * Execute a command in Normal mode.
  */
     void
-normal_cmd(oap, toplevel)
-    oparg_T	*oap;
-    int		toplevel UNUSED;	/* TRUE when called from main() */
+normal_cmd(
+    oparg_T	*oap,
+    int		toplevel UNUSED)	/* TRUE when called from main() */
 {
     cmdarg_T	ca;			/* command arguments */
     int		c;
@@ -1355,9 +1352,7 @@ normal_end:
  * Set v:prevcount only when "set_prevcount" is TRUE.
  */
     static void
-set_vcount_ca(cap, set_prevcount)
-    cmdarg_T	*cap;
-    int		*set_prevcount;
+set_vcount_ca(cmdarg_T *cap, int *set_prevcount)
 {
     long count = cap->count0;
 
@@ -1373,10 +1368,7 @@ set_vcount_ca(cap, set_prevcount)
  * Handle an operator after visual mode or when the movement is finished
  */
     void
-do_pending_operator(cap, old_col, gui_yank)
-    cmdarg_T	*cap;
-    int		old_col;
-    int		gui_yank;
+do_pending_operator(cmdarg_T *cap, int old_col, int gui_yank)
 {
     oparg_T	*oap = cap->oap;
     pos_T	old_cursor;
@@ -2164,8 +2156,7 @@ do_pending_operator(cap, old_col, gui_ya
  * Handle indent and format operators and visual mode ":".
  */
     static void
-op_colon(oap)
-    oparg_T	*oap;
+op_colon(oparg_T *oap)
 {
     stuffcharReadbuff(':');
     if (oap->is_VIsual)
@@ -2225,8 +2216,7 @@ op_colon(oap)
  * Handle the "g@" operator: call 'operatorfunc'.
  */
     static void
-op_function(oap)
-    oparg_T	*oap UNUSED;
+op_function(oparg_T *oap UNUSED)
 {
 #ifdef FEAT_EVAL
     char_u	*(argv[1]);
@@ -2307,12 +2297,12 @@ op_function(oap)
  * Return TRUE if start_arrow() should be called for edit mode.
  */
     int
-do_mouse(oap, c, dir, count, fixindent)
-    oparg_T	*oap;		/* operator argument, can be NULL */
-    int		c;		/* K_LEFTMOUSE, etc */
-    int		dir;		/* Direction to 'put' if necessary */
-    long	count;
-    int		fixindent;	/* PUT_FIXINDENT if fixing indent necessary */
+do_mouse(
+    oparg_T	*oap,		/* operator argument, can be NULL */
+    int		c,		/* K_LEFTMOUSE, etc */
+    int		dir,		/* Direction to 'put' if necessary */
+    long	count,
+    int		fixindent)	/* PUT_FIXINDENT if fixing indent necessary */
 {
     static int	do_always = FALSE;	/* ignore 'mouse' setting next time */
     static int	got_click = FALSE;	/* got a click some time back */
@@ -3175,8 +3165,7 @@ do_mouse(oap, c, dir, count, fixindent)
  * Move "pos" back to the start of the word it's in.
  */
     static void
-find_start_of_word(pos)
-    pos_T	*pos;
+find_start_of_word(pos_T *pos)
 {
     char_u	*line;
     int		cclass;
@@ -3202,8 +3191,7 @@ find_start_of_word(pos)
  * When 'selection' is "exclusive", the position is just after the word.
  */
     static void
-find_end_of_word(pos)
-    pos_T	*pos;
+find_end_of_word(pos_T *pos)
 {
     char_u	*line;
     int		cclass;
@@ -3243,8 +3231,7 @@ find_end_of_word(pos)
  * >2: multi-byte word character.
  */
     static int
-get_mouse_class(p)
-    char_u	*p;
+get_mouse_class(char_u *p)
 {
     int		c;
 
@@ -3277,7 +3264,7 @@ get_mouse_class(p)
  * if not.
  */
     void
-check_visual_highlight()
+check_visual_highlight(void)
 {
     static int	    did_check = FALSE;
 
@@ -3295,7 +3282,7 @@ check_visual_highlight()
  * do_pending_operator().
  */
     void
-end_visual_mode()
+end_visual_mode(void)
 {
 #ifdef FEAT_CLIPBOARD
     /*
@@ -3335,7 +3322,7 @@ end_visual_mode()
  * Reset VIsual_active and VIsual_reselect.
  */
     void
-reset_VIsual_and_resel()
+reset_VIsual_and_resel(void)
 {
     if (VIsual_active)
     {
@@ -3349,7 +3336,7 @@ reset_VIsual_and_resel()
  * Reset VIsual_active and VIsual_reselect if it's set.
  */
     void
-reset_VIsual()
+reset_VIsual(void)
 {
     if (VIsual_active)
     {
@@ -3371,11 +3358,11 @@ static int find_is_eval_item(char_u *ptr
  * "bnp" points to a counter for square brackets.
  */
     static int
-find_is_eval_item(ptr, colp, bnp, dir)
-    char_u	*ptr;
-    int		*colp;
-    int		*bnp;
-    int		dir;
+find_is_eval_item(
+    char_u	*ptr,
+    int		*colp,
+    int		*bnp,
+    int		dir)
 {
     /* Accept everything inside []. */
     if ((*ptr == ']' && dir == BACKWARD) || (*ptr == '[' && dir == FORWARD))
@@ -3424,9 +3411,7 @@ find_is_eval_item(ptr, colp, bnp, dir)
  * string is not always NUL terminated.
  */
     int
-find_ident_under_cursor(string, find_type)
-    char_u	**string;
-    int		find_type;
+find_ident_under_cursor(char_u **string, int find_type)
 {
     return find_ident_at_pos(curwin, curwin->w_cursor.lnum,
 				     curwin->w_cursor.col, string, find_type);
@@ -3437,12 +3422,12 @@ find_ident_under_cursor(string, find_typ
  * However: Uses 'iskeyword' from the current window!.
  */
     int
-find_ident_at_pos(wp, lnum, startcol, string, find_type)
-    win_T	*wp;
-    linenr_T	lnum;
-    colnr_T	startcol;
-    char_u	**string;
-    int		find_type;
+find_ident_at_pos(
+    win_T	*wp,
+    linenr_T	lnum,
+    colnr_T	startcol,
+    char_u	**string,
+    int		find_type)
 {
     char_u	*ptr;
     int		col = 0;	    /* init to shut up GCC */
@@ -3625,8 +3610,7 @@ find_ident_at_pos(wp, lnum, startcol, st
  * Prepare for redo of a normal command.
  */
     static void
-prep_redo_cmd(cap)
-    cmdarg_T  *cap;
+prep_redo_cmd(cmdarg_T *cap)
 {
     prep_redo(cap->oap->regname, cap->count0,
 				     NUL, cap->cmdchar, NUL, NUL, cap->nchar);
@@ -3637,14 +3621,14 @@ prep_redo_cmd(cap)
  * Note that only the last argument can be a multi-byte char.
  */
     static void
-prep_redo(regname, num, cmd1, cmd2, cmd3, cmd4, cmd5)
-    int	    regname;
-    long    num;
-    int	    cmd1;
-    int	    cmd2;
-    int	    cmd3;
-    int	    cmd4;
-    int	    cmd5;
+prep_redo(
+    int	    regname,
+    long    num,
+    int	    cmd1,
+    int	    cmd2,
+    int	    cmd3,
+    int	    cmd4,
+    int	    cmd5)
 {
     ResetRedobuff();
     if (regname != 0)	/* yank from specified buffer */
@@ -3673,8 +3657,7 @@ prep_redo(regname, num, cmd1, cmd2, cmd3
  * return TRUE if operator was active
  */
     static int
-checkclearop(oap)
-    oparg_T	*oap;
+checkclearop(oparg_T *oap)
 {
     if (oap->op_type == OP_NOP)
 	return FALSE;
@@ -3688,8 +3671,7 @@ checkclearop(oap)
  * Return TRUE if operator or Visual was active.
  */
     static int
-checkclearopq(oap)
-    oparg_T	*oap;
+checkclearopq(oparg_T *oap)
 {
     if (oap->op_type == OP_NOP && !VIsual_active)
 	return FALSE;
@@ -3698,8 +3680,7 @@ checkclearopq(oap)
 }
 
     static void
-clearop(oap)
-    oparg_T	*oap;
+clearop(oparg_T *oap)
 {
     oap->op_type = OP_NOP;
     oap->regname = 0;
@@ -3708,8 +3689,7 @@ clearop(oap)
 }
 
     static void
-clearopbeep(oap)
-    oparg_T	*oap;
+clearopbeep(oparg_T *oap)
 {
     clearop(oap);
     beep_flush();
@@ -3719,8 +3699,7 @@ clearopbeep(oap)
  * Remove the shift modifier from a special key.
  */
     static void
-unshift_special(cap)
-    cmdarg_T	*cap;
+unshift_special(cmdarg_T *cap)
 {
     switch (cap->cmdchar)
     {
@@ -3739,7 +3718,7 @@ unshift_special(cap)
  * command displayed.
  */
     static void
-may_clear_cmdline()
+may_clear_cmdline(void)
 {
     if (mode_displayed)
 	clear_cmdline = TRUE;   /* unshow visual mode later */
@@ -3763,7 +3742,7 @@ static int	showcmd_visual = FALSE;
 static void display_showcmd(void);
 
     void
-clear_showcmd()
+clear_showcmd(void)
 {
     if (!p_sc)
 	return;
@@ -3870,8 +3849,7 @@ clear_showcmd()
  * Return TRUE if output has been written (and setcursor() has been called).
  */
     int
-add_to_showcmd(c)
-    int		c;
+add_to_showcmd(int c)
 {
     char_u	*p;
     int		old_len;
@@ -3933,8 +3911,7 @@ add_to_showcmd(c)
 }
 
     void
-add_to_showcmd_c(c)
-    int		c;
+add_to_showcmd_c(int c)
 {
     if (!add_to_showcmd(c))
 	setcursor();
@@ -3944,8 +3921,7 @@ add_to_showcmd_c(c)
  * Delete 'len' characters from the end of the shown command.
  */
     static void
-del_from_showcmd(len)
-    int	    len;
+del_from_showcmd(int len)
 {
     int	    old_len;
 
@@ -3966,14 +3942,14 @@ del_from_showcmd(len)
  * something and there is a partial mapping.
  */
     void
-push_showcmd()
+push_showcmd(void)
 {
     if (p_sc)
 	STRCPY(old_showcmd_buf, showcmd_buf);
 }
 
     void
-pop_showcmd()
+pop_showcmd(void)
 {
     if (!p_sc)
 	return;
@@ -3984,7 +3960,7 @@ pop_showcmd()
 }
 
     static void
-display_showcmd()
+display_showcmd(void)
 {
     int	    len;
 
@@ -4016,8 +3992,7 @@ display_showcmd()
  * scrolled.  Called from normal_cmd() and edit().
  */
     void
-do_check_scrollbind(check)
-    int		check;
+do_check_scrollbind(int check)
 {
     static win_T	*old_curwin = NULL;
     static linenr_T	old_topline = 0;
@@ -4087,9 +4062,7 @@ do_check_scrollbind(check)
  * (1998-11-02 16:21:01  R. Edward Ralston <eralston@computer.org>)
  */
     void
-check_scrollbind(topline_diff, leftcol_diff)
-    linenr_T	topline_diff;
-    long	leftcol_diff;
+check_scrollbind(linenr_T topline_diff, long leftcol_diff)
 {
     int		want_ver;
     int		want_hor;
@@ -4181,8 +4154,7 @@ check_scrollbind(topline_diff, leftcol_d
  * xon/xoff.
  */
     static void
-nv_ignore(cap)
-    cmdarg_T	*cap;
+nv_ignore(cmdarg_T *cap)
 {
     cap->retval |= CA_COMMAND_BUSY;	/* don't call edit() now */
 }
@@ -4192,8 +4164,7 @@ nv_ignore(cap)
  * start edit().  Used for "startinsert" executed while starting up.
  */
     static void
-nv_nop(cap)
-    cmdarg_T	*cap UNUSED;
+nv_nop(cmdarg_T *cap UNUSED)
 {
 }
 
@@ -4201,8 +4172,7 @@ nv_nop(cap)
  * Command character doesn't exist.
  */
     static void
-nv_error(cap)
-    cmdarg_T	*cap;
+nv_error(cmdarg_T *cap)
 {
     clearopbeep(cap->oap);
 }
@@ -4211,8 +4181,7 @@ nv_error(cap)
  * <Help> and <F1> commands.
  */
     static void
-nv_help(cap)
-    cmdarg_T	*cap;
+nv_help(cmdarg_T *cap)
 {
     if (!checkclearopq(cap->oap))
 	ex_help(NULL);
@@ -4222,8 +4191,7 @@ nv_help(cap)
  * CTRL-A and CTRL-X: Add or subtract from letter or number under cursor.
  */
     static void
-nv_addsub(cap)
-    cmdarg_T	*cap;
+nv_addsub(cmdarg_T *cap)
 {
     if (!VIsual_active && cap->oap->op_type == OP_NOP)
     {
@@ -4242,8 +4210,7 @@ nv_addsub(cap)
  * CTRL-F, CTRL-B, etc: Scroll page up or down.
  */
     static void
-nv_page(cap)
-    cmdarg_T	*cap;
+nv_page(cmdarg_T *cap)
 {
     if (!checkclearop(cap->oap))
     {
@@ -4266,10 +4233,10 @@ nv_page(cap)
  * Implementation of "gd" and "gD" command.
  */
     static void
-nv_gd(oap, nchar, thisblock)
-    oparg_T	*oap;
-    int		nchar;
-    int		thisblock;	/* 1 for "1gd" and "1gD" */
+nv_gd(
+    oparg_T	*oap,
+    int		nchar,
+    int		thisblock)	/* 1 for "1gd" and "1gD" */
 {
     int		len;
     char_u	*ptr;
@@ -4291,12 +4258,12 @@ nv_gd(oap, nchar, thisblock)
  * Return FAIL when not found.
  */
     int
-find_decl(ptr, len, locally, thisblock, searchflags)
-    char_u	*ptr;
-    int		len;
-    int		locally;
-    int		thisblock;
-    int		searchflags;	/* flags passed to searchit() */
+find_decl(
+    char_u	*ptr,
+    int		len,
+    int		locally,
+    int		thisblock,
+    int		searchflags)	/* flags passed to searchit() */
 {
     char_u	*pat;
     pos_T	old_pos;
@@ -4423,10 +4390,7 @@ find_decl(ptr, len, locally, thisblock, 
  * Return OK if able to move cursor, FAIL otherwise.
  */
     static int
-nv_screengo(oap, dir, dist)
-    oparg_T	*oap;
-    int		dir;
-    long	dist;
+nv_screengo(oparg_T *oap, int dir, long dist)
 {
     int		linelen = linetabsize(ml_get_curline());
     int		retval = OK;
@@ -4586,8 +4550,7 @@ nv_screengo(oap, dir, dist)
  * K_MOUSELEFT (cap->arg == -1) or K_MOUSERIGHT (cap->arg == -2)
  */
     static void
-nv_mousescroll(cap)
-    cmdarg_T	*cap;
+nv_mousescroll(cmdarg_T *cap)
 {
 # ifdef FEAT_WINDOWS
     win_T *old_curwin = curwin;
@@ -4649,8 +4612,7 @@ nv_mousescroll(cap)
  * Mouse clicks and drags.
  */
     static void
-nv_mouse(cap)
-    cmdarg_T	*cap;
+nv_mouse(cmdarg_T *cap)
 {
     (void)do_mouse(cap->oap, cap->cmdchar, BACKWARD, cap->count1, 0);
 }
@@ -4661,8 +4623,7 @@ nv_mouse(cap)
  * cap->arg must be TRUE for CTRL-E.
  */
     static void
-nv_scroll_line(cap)
-    cmdarg_T	*cap;
+nv_scroll_line(cmdarg_T *cap)
 {
     if (!checkclearop(cap->oap))
 	scroll_redraw(cap->arg, cap->count1);
@@ -4672,9 +4633,7 @@ nv_scroll_line(cap)
  * Scroll "count" lines up or down, and redraw.
  */
     void
-scroll_redraw(up, count)
-    int		up;
-    long	count;
+scroll_redraw(int up, long count)
 {
     linenr_T	prev_topline = curwin->w_topline;
 #ifdef FEAT_DIFF
@@ -4731,8 +4690,7 @@ scroll_redraw(up, count)
  * Commands that start with "z".
  */
     static void
-nv_zet(cap)
-    cmdarg_T  *cap;
+nv_zet(cmdarg_T *cap)
 {
     long	n;
     colnr_T	col;
@@ -5227,8 +5185,7 @@ dozet:
  * Vertical scrollbar movement.
  */
     static void
-nv_ver_scrollbar(cap)
-    cmdarg_T	*cap;
+nv_ver_scrollbar(cmdarg_T *cap)
 {
     if (cap->oap->op_type != OP_NOP)
 	clearopbeep(cap->oap);
@@ -5241,8 +5198,7 @@ nv_ver_scrollbar(cap)
  * Horizontal scrollbar movement.
  */
     static void
-nv_hor_scrollbar(cap)
-    cmdarg_T	*cap;
+nv_hor_scrollbar(cmdarg_T *cap)
 {
     if (cap->oap->op_type != OP_NOP)
 	clearopbeep(cap->oap);
@@ -5257,8 +5213,7 @@ nv_hor_scrollbar(cap)
  * Click in GUI tab.
  */
     static void
-nv_tabline(cap)
-    cmdarg_T	*cap;
+nv_tabline(cmdarg_T *cap)
 {
     if (cap->oap->op_type != OP_NOP)
 	clearopbeep(cap->oap);
@@ -5271,8 +5226,7 @@ nv_tabline(cap)
  * Selected item in tab line menu.
  */
     static void
-nv_tabmenu(cap)
-    cmdarg_T	*cap;
+nv_tabmenu(cmdarg_T *cap)
 {
     if (cap->oap->op_type != OP_NOP)
 	clearopbeep(cap->oap);
@@ -5286,7 +5240,7 @@ nv_tabmenu(cap)
  * Used in Normal and Insert mode.
  */
     void
-handle_tabmenu()
+handle_tabmenu(void)
 {
     switch (current_tabmenu)
     {
@@ -5330,8 +5284,7 @@ handle_tabmenu()
  * "Q" command.
  */
     static void
-nv_exmode(cap)
-    cmdarg_T	*cap;
+nv_exmode(cmdarg_T *cap)
 {
     /*
      * Ignore 'Q' in Visual mode, just give a beep.
@@ -5346,8 +5299,7 @@ nv_exmode(cap)
  * Handle a ":" command.
  */
     static void
-nv_colon(cap)
-    cmdarg_T  *cap;
+nv_colon(cmdarg_T *cap)
 {
     int	    old_p_im;
     int	    cmd_result;
@@ -5411,8 +5363,7 @@ nv_colon(cap)
  * Handle CTRL-G command.
  */
     static void
-nv_ctrlg(cap)
-    cmdarg_T *cap;
+nv_ctrlg(cmdarg_T *cap)
 {
     if (VIsual_active)	/* toggle Selection/Visual mode */
     {
@@ -5428,8 +5379,7 @@ nv_ctrlg(cap)
  * Handle CTRL-H <Backspace> command.
  */
     static void
-nv_ctrlh(cap)
-    cmdarg_T *cap;
+nv_ctrlh(cmdarg_T *cap)
 {
     if (VIsual_active && VIsual_select)
     {
@@ -5444,8 +5394,7 @@ nv_ctrlh(cap)
  * CTRL-L: clear screen and redraw.
  */
     static void
-nv_clear(cap)
-    cmdarg_T	*cap;
+nv_clear(cmdarg_T *cap)
 {
     if (!checkclearop(cap->oap))
     {
@@ -5470,8 +5419,7 @@ nv_clear(cap)
  * Otherwise: Go to older pcmark.
  */
     static void
-nv_ctrlo(cap)
-    cmdarg_T	*cap;
+nv_ctrlo(cmdarg_T *cap)
 {
     if (VIsual_active && VIsual_select)
     {
@@ -5490,8 +5438,7 @@ nv_ctrlo(cap)
  * CTRL-^ command, short for ":e #"
  */
     static void
-nv_hat(cap)
-    cmdarg_T	*cap;
+nv_hat(cmdarg_T *cap)
 {
     if (!checkclearopq(cap->oap))
 	(void)buflist_getfile((int)cap->count0, (linenr_T)0,
@@ -5502,8 +5449,7 @@ nv_hat(cap)
  * "Z" commands.
  */
     static void
-nv_Zet(cap)
-    cmdarg_T *cap;
+nv_Zet(cmdarg_T *cap)
 {
     if (!checkclearopq(cap->oap))
     {
@@ -5527,9 +5473,7 @@ nv_Zet(cap)
  * Call nv_ident() as if "c1" was used, with "c2" as next character.
  */
     void
-do_nv_ident(c1, c2)
-    int		c1;
-    int		c2;
+do_nv_ident(int c1, int c2)
 {
     oparg_T	oa;
     cmdarg_T	ca;
@@ -5552,8 +5496,7 @@ do_nv_ident(c1, c2)
  *  g  ']'	:tselect for current identifier
  */
     static void
-nv_ident(cap)
-    cmdarg_T	*cap;
+nv_ident(cmdarg_T *cap)
 {
     char_u	*ptr = NULL;
     char_u	*buf;
@@ -5788,10 +5731,10 @@ nv_ident(cap)
  * Returns FAIL if more than one line selected.
  */
     int
-get_visual_text(cap, pp, lenp)
-    cmdarg_T	*cap;
-    char_u	**pp;	    /* return: start of selected text */
-    int		*lenp;	    /* return: length of selected text */
+get_visual_text(
+    cmdarg_T	*cap,
+    char_u	**pp,	    /* return: start of selected text */
+    int		*lenp)	    /* return: length of selected text */
 {
     if (VIsual_mode != 'V')
 	unadjust_for_sel();
@@ -5832,8 +5775,7 @@ get_visual_text(cap, pp, lenp)
  * CTRL-T: backwards in tag stack
  */
     static void
-nv_tagpop(cap)
-    cmdarg_T	*cap;
+nv_tagpop(cmdarg_T *cap)
 {
     if (!checkclearopq(cap->oap))
 	do_tag((char_u *)"", DT_POP, (int)cap->count1, FALSE, TRUE);
@@ -5843,8 +5785,7 @@ nv_tagpop(cap)
  * Handle scrolling command 'H', 'L' and 'M'.
  */
     static void
-nv_scroll(cap)
-    cmdarg_T  *cap;
+nv_scroll(cmdarg_T *cap)
 {
     int		used = 0;
     long	n;
@@ -5945,8 +5886,7 @@ nv_scroll(cap)
  * Cursor right commands.
  */
     static void
-nv_right(cap)
-    cmdarg_T	*cap;
+nv_right(cmdarg_T *cap)
 {
     long	n;
     int		past_line;
@@ -6056,8 +5996,7 @@ nv_right(cap)
  * Returns TRUE when operator end should not be adjusted.
  */
     static void
-nv_left(cap)
-    cmdarg_T	*cap;
+nv_left(cmdarg_T *cap)
 {
     long	n;
 
@@ -6134,8 +6073,7 @@ nv_left(cap)
  * cap->arg is TRUE for "-": Move cursor to first non-blank.
  */
     static void
-nv_up(cap)
-    cmdarg_T	*cap;
+nv_up(cmdarg_T *cap)
 {
     if (mod_mask & MOD_MASK_SHIFT)
     {
@@ -6158,8 +6096,8 @@ nv_up(cap)
  * cap->arg is TRUE for CR and "+": Move cursor to first non-blank.
  */
     static void
-nv_down(cap)
-    cmdarg_T	*cap;
+nv_down(
+    cmdarg_T	*cap)
 {
     if (mod_mask & MOD_MASK_SHIFT)
     {
@@ -6199,8 +6137,7 @@ nv_down(cap)
  * Grab the file name under the cursor and edit it.
  */
     static void
-nv_gotofile(cap)
-    cmdarg_T	*cap;
+nv_gotofile(cmdarg_T *cap)
 {
     char_u	*ptr;
     linenr_T	lnum = -1;
@@ -6246,8 +6183,7 @@ nv_gotofile(cap)
  * <End> command: to end of current line or last line.
  */
     static void
-nv_end(cap)
-    cmdarg_T	*cap;
+nv_end(cmdarg_T *cap)
 {
     if (cap->arg || (mod_mask & MOD_MASK_CTRL))	/* CTRL-END = goto last line */
     {
@@ -6262,8 +6198,7 @@ nv_end(cap)
  * Handle the "$" command.
  */
     static void
-nv_dollar(cap)
-    cmdarg_T	*cap;
+nv_dollar(cmdarg_T *cap)
 {
     cap->oap->motion_type = MCHAR;
     cap->oap->inclusive = TRUE;
@@ -6289,8 +6224,7 @@ nv_dollar(cap)
  * If cap->arg is TRUE don't set PC mark.
  */
     static void
-nv_search(cap)
-    cmdarg_T	    *cap;
+nv_search(cmdarg_T *cap)
 {
     oparg_T	*oap = cap->oap;
 
@@ -6320,8 +6254,7 @@ nv_search(cap)
  * cap->arg is SEARCH_REV for "N", 0 for "n".
  */
     static void
-nv_next(cap)
-    cmdarg_T	*cap;
+nv_next(cmdarg_T *cap)
 {
     pos_T old = curwin->w_cursor;
     int   i = normal_search(cap, 0, NULL, SEARCH_MARK | cap->arg);
@@ -6343,11 +6276,11 @@ nv_next(cap)
  * Return 0 for failure, 1 for found, 2 for found and line offset added.
  */
     static int
-normal_search(cap, dir, pat, opt)
-    cmdarg_T	*cap;
-    int		dir;
-    char_u	*pat;
-    int		opt;		/* extra flags for do_search() */
+normal_search(
+    cmdarg_T	*cap,
+    int		dir,
+    char_u	*pat,
+    int		opt)		/* extra flags for do_search() */
 {
     int		i;
 
@@ -6386,8 +6319,7 @@ normal_search(cap, dir, pat, opt)
  * cap->nchar is NUL for ',' and ';' (repeat the search)
  */
     static void
-nv_csearch(cap)
-    cmdarg_T	*cap;
+nv_csearch(cmdarg_T *cap)
 {
     int		t_cmd;
 
@@ -6428,8 +6360,7 @@ nv_csearch(cap)
  * cap->arg is BACKWARD for "[" and FORWARD for "]".
  */
     static void
-nv_brackets(cap)
-    cmdarg_T	*cap;
+nv_brackets(cmdarg_T *cap)
 {
     pos_T	new_pos = INIT_POS_T(0, 0, 0);
     pos_T	prev_pos;
@@ -6798,8 +6729,7 @@ nv_brackets(cap)
  * Handle Normal mode "%" command.
  */
     static void
-nv_percent(cap)
-    cmdarg_T	*cap;
+nv_percent(cmdarg_T *cap)
 {
     pos_T	*pos;
 #if defined(FEAT_FOLDING)
@@ -6859,8 +6789,7 @@ nv_percent(cap)
  * cap->arg is BACKWARD for "(" and FORWARD for ")".
  */
     static void
-nv_brace(cap)
-    cmdarg_T	*cap;
+nv_brace(cmdarg_T *cap)
 {
     cap->oap->motion_type = MCHAR;
     cap->oap->use_reg_one = TRUE;
@@ -6888,8 +6817,7 @@ nv_brace(cap)
  * "m" command: Mark a position.
  */
     static void
-nv_mark(cap)
-    cmdarg_T	*cap;
+nv_mark(cmdarg_T *cap)
 {
     if (!checkclearop(cap->oap))
     {
@@ -6903,8 +6831,7 @@ nv_mark(cap)
  * cmd->arg is BACKWARD for "{" and FORWARD for "}".
  */
     static void
-nv_findpar(cap)
-    cmdarg_T	*cap;
+nv_findpar(cmdarg_T *cap)
 {
     cap->oap->motion_type = MCHAR;
     cap->oap->inclusive = FALSE;
@@ -6928,8 +6855,7 @@ nv_findpar(cap)
  * "u" command: Undo or make lower case.
  */
     static void
-nv_undo(cap)
-    cmdarg_T	*cap;
+nv_undo(cmdarg_T *cap)
 {
     if (cap->oap->op_type == OP_LOWER || VIsual_active)
     {
@@ -6946,8 +6872,7 @@ nv_undo(cap)
  * <Undo> command.
  */
     static void
-nv_kundo(cap)
-    cmdarg_T	*cap;
+nv_kundo(cmdarg_T *cap)
 {
     if (!checkclearopq(cap->oap))
     {
@@ -6960,8 +6885,7 @@ nv_kundo(cap)
  * Handle the "r" command.
  */
     static void
-nv_replace(cap)
-    cmdarg_T	*cap;
+nv_replace(cmdarg_T *cap)
 {
     char_u	*ptr;
     int		had_ctrl_v;
@@ -7176,8 +7100,7 @@ nv_replace(cap)
  * 'O': same, but in block mode exchange left and right corners.
  */
     static void
-v_swap_corners(cmdchar)
-    int		cmdchar;
+v_swap_corners(int cmdchar)
 {
     pos_T	old_cursor;
     colnr_T	left, right;
@@ -7228,8 +7151,7 @@ v_swap_corners(cmdchar)
  * "R" (cap->arg is FALSE) and "gR" (cap->arg is TRUE).
  */
     static void
-nv_Replace(cap)
-    cmdarg_T	    *cap;
+nv_Replace(cmdarg_T *cap)
 {
     if (VIsual_active)		/* "R" is replace lines */
     {
@@ -7259,8 +7181,7 @@ nv_Replace(cap)
  * "gr".
  */
     static void
-nv_vreplace(cap)
-    cmdarg_T	*cap;
+nv_vreplace(cmdarg_T *cap)
 {
     if (VIsual_active)
     {
@@ -7292,8 +7213,7 @@ nv_vreplace(cap)
  * Swap case for "~" command, when it does not work like an operator.
  */
     static void
-n_swapchar(cap)
-    cmdarg_T	*cap;
+n_swapchar(cmdarg_T *cap)
 {
     long	n;
     pos_T	startpos;
@@ -7388,10 +7308,7 @@ n_swapchar(cap)
  * Move cursor to mark.
  */
     static void
-nv_cursormark(cap, flag, pos)
-    cmdarg_T	*cap;
-    int		flag;
-    pos_T	*pos;
+nv_cursormark(cmdarg_T *cap, int flag, pos_T *pos)
 {
     if (check_mark(pos) == FAIL)
 	clearop(cap->oap);
@@ -7419,8 +7336,7 @@ nv_cursormark(cap, flag, pos)
  * Handle commands that are operators in Visual mode.
  */
     static void
-v_visop(cap)
-    cmdarg_T	*cap;
+v_visop(cmdarg_T *cap)
 {
     static char_u trans[] = "YyDdCcxdXdAAIIrr";
 
@@ -7444,8 +7360,7 @@ v_visop(cap)
  * "s" and "S" commands.
  */
     static void
-nv_subst(cap)
-    cmdarg_T	*cap;
+nv_subst(cmdarg_T *cap)
 {
     if (VIsual_active)	/* "vs" and "vS" are the same as "vc" */
     {
@@ -7465,8 +7380,7 @@ nv_subst(cap)
  * Abbreviated commands.
  */
     static void
-nv_abbrev(cap)
-    cmdarg_T	*cap;
+nv_abbrev(cmdarg_T *cap)
 {
     if (cap->cmdchar == K_DEL || cap->cmdchar == K_KDEL)
 	cap->cmdchar = 'x';		/* DEL key behaves like 'x' */
@@ -7482,8 +7396,7 @@ nv_abbrev(cap)
  * Translate a command into another command.
  */
     static void
-nv_optrans(cap)
-    cmdarg_T	*cap;
+nv_optrans(cmdarg_T *cap)
 {
     static char_u *(ar[8]) = {(char_u *)"dl", (char_u *)"dh",
 			      (char_u *)"d$", (char_u *)"c$",
@@ -7523,8 +7436,7 @@ nv_optrans(cap)
  * cap->arg is TRUE for "'" and "g'".
  */
     static void
-nv_gomark(cap)
-    cmdarg_T	*cap;
+nv_gomark(cmdarg_T *cap)
 {
     pos_T	*pos;
     int		c;
@@ -7570,8 +7482,7 @@ nv_gomark(cap)
  * Handle CTRL-O, CTRL-I, "g;" and "g," commands.
  */
     static void
-nv_pcmark(cap)
-    cmdarg_T	*cap;
+nv_pcmark(cmdarg_T *cap)
 {
 #ifdef FEAT_JUMPLIST
     pos_T	*pos;
@@ -7621,8 +7532,7 @@ nv_pcmark(cap)
  * Handle '"' command.
  */
     static void
-nv_regname(cap)
-    cmdarg_T	*cap;
+nv_regname(cmdarg_T *cap)
 {
     if (checkclearop(cap->oap))
 	return;
@@ -7649,8 +7559,7 @@ nv_regname(cap)
  * Handle CTRL-Q just like CTRL-V.
  */
     static void
-nv_visual(cap)
-    cmdarg_T	*cap;
+nv_visual(cmdarg_T *cap)
 {
     if (cap->cmdchar == Ctrl_Q)
 	cap->cmdchar = Ctrl_V;
@@ -7758,7 +7667,7 @@ nv_visual(cap)
  * Start selection for Shift-movement keys.
  */
     void
-start_selection()
+start_selection(void)
 {
     /* if 'selectmode' contains "key", start Select mode */
     may_start_select('k');
@@ -7769,8 +7678,7 @@ start_selection()
  * Start Select mode, if "c" is in 'selectmode' and not in a mapping or menu.
  */
     void
-may_start_select(c)
-    int		c;
+may_start_select(int c)
 {
     VIsual_select = (stuff_empty() && typebuf_typed()
 		    && (vim_strchr(p_slm, c) != NULL));
@@ -7781,8 +7689,7 @@ may_start_select(c)
  * Should set VIsual_select before calling this.
  */
     static void
-n_start_visual_mode(c)
-    int		c;
+n_start_visual_mode(int c)
 {
 #ifdef FEAT_CONCEAL
     /* Check for redraw before changing the state. */
@@ -7838,8 +7745,7 @@ n_start_visual_mode(c)
  * CTRL-W: Window commands
  */
     static void
-nv_window(cap)
-    cmdarg_T	*cap;
+nv_window(cmdarg_T *cap)
 {
 #ifdef FEAT_WINDOWS
     if (!checkclearop(cap->oap))
@@ -7853,8 +7759,7 @@ nv_window(cap)
  * CTRL-Z: Suspend
  */
     static void
-nv_suspend(cap)
-    cmdarg_T	*cap;
+nv_suspend(cmdarg_T *cap)
 {
     clearop(cap->oap);
     if (VIsual_active)
@@ -7866,8 +7771,7 @@ nv_suspend(cap)
  * Commands starting with "g".
  */
     static void
-nv_g_cmd(cap)
-    cmdarg_T	*cap;
+nv_g_cmd(cmdarg_T *cap)
 {
     oparg_T	*oap = cap->oap;
     pos_T	tpos;
@@ -8461,8 +8365,7 @@ nv_g_cmd(cap)
  * Handle "o" and "O" commands.
  */
     static void
-n_opencmd(cap)
-    cmdarg_T	*cap;
+n_opencmd(cmdarg_T *cap)
 {
 #ifdef FEAT_CONCEAL
     linenr_T	oldline = curwin->w_cursor.lnum;
@@ -8512,8 +8415,7 @@ n_opencmd(cap)
  * "." command: redo last change.
  */
     static void
-nv_dot(cap)
-    cmdarg_T	*cap;
+nv_dot(cmdarg_T *cap)
 {
     if (!checkclearopq(cap->oap))
     {
@@ -8531,8 +8433,7 @@ nv_dot(cap)
  * CTRL-R: undo undo
  */
     static void
-nv_redo(cap)
-    cmdarg_T	*cap;
+nv_redo(cmdarg_T *cap)
 {
     if (!checkclearopq(cap->oap))
     {
@@ -8545,8 +8446,7 @@ nv_redo(cap)
  * Handle "U" command.
  */
     static void
-nv_Undo(cap)
-    cmdarg_T	*cap;
+nv_Undo(cmdarg_T *cap)
 {
     /* In Visual mode and typing "gUU" triggers an operator */
     if (cap->oap->op_type == OP_UPPER || VIsual_active)
@@ -8568,8 +8468,7 @@ nv_Undo(cap)
  * single character.
  */
     static void
-nv_tilde(cap)
-    cmdarg_T	*cap;
+nv_tilde(cmdarg_T *cap)
 {
     if (!p_to && !VIsual_active && cap->oap->op_type != OP_TILDE)
 	n_swapchar(cap);
@@ -8582,8 +8481,7 @@ nv_tilde(cap)
  * The actual work is done by do_pending_operator().
  */
     static void
-nv_operator(cap)
-    cmdarg_T	*cap;
+nv_operator(cmdarg_T *cap)
 {
     int	    op_type;
 
@@ -8606,8 +8504,7 @@ nv_operator(cap)
  * Set v:operator to the characters for "optype".
  */
     static void
-set_op_var(optype)
-    int optype;
+set_op_var(int optype)
 {
     char_u	opchars[3];
 
@@ -8633,8 +8530,7 @@ set_op_var(optype)
  * "d3_" works to delete 3 lines.
  */
     static void
-nv_lineop(cap)
-    cmdarg_T	*cap;
+nv_lineop(cmdarg_T *cap)
 {
     cap->oap->motion_type = MLINE;
     if (cursor_down(cap->count1 - 1L, cap->oap->op_type == OP_NOP) == FAIL)
@@ -8653,8 +8549,7 @@ nv_lineop(cap)
  * <Home> command.
  */
     static void
-nv_home(cap)
-    cmdarg_T	*cap;
+nv_home(cmdarg_T *cap)
 {
     /* CTRL-HOME is like "gg" */
     if (mod_mask & MOD_MASK_CTRL)
@@ -8672,8 +8567,7 @@ nv_home(cap)
  * "|" command.
  */
     static void
-nv_pipe(cap)
-    cmdarg_T *cap;
+nv_pipe(cmdarg_T *cap)
 {
     cap->oap->motion_type = MCHAR;
     cap->oap->inclusive = FALSE;
@@ -8695,8 +8589,7 @@ nv_pipe(cap)
  * cap->arg is 1 for "B"
  */
     static void
-nv_bck_word(cap)
-    cmdarg_T	*cap;
+nv_bck_word(cmdarg_T *cap)
 {
     cap->oap->motion_type = MCHAR;
     cap->oap->inclusive = FALSE;
@@ -8714,8 +8607,7 @@ nv_bck_word(cap)
  * cap->arg is TRUE for "E" and "W".
  */
     static void
-nv_wordcmd(cap)
-    cmdarg_T	*cap;
+nv_wordcmd(cmdarg_T *cap)
 {
     int		n;
     int		word_end;
@@ -8804,8 +8696,7 @@ nv_wordcmd(cap)
  * inclusive.
  */
     static void
-adjust_cursor(oap)
-    oparg_T *oap;
+adjust_cursor(oparg_T *oap)
 {
     /* The cursor cannot remain on the NUL when:
      * - the column is > 0
@@ -8834,8 +8725,7 @@ adjust_cursor(oap)
  * cap->arg is the argument for beginline().
  */
     static void
-nv_beginline(cap)
-    cmdarg_T	*cap;
+nv_beginline(cmdarg_T *cap)
 {
     cap->oap->motion_type = MCHAR;
     cap->oap->inclusive = FALSE;
@@ -8852,8 +8742,7 @@ nv_beginline(cap)
  * In exclusive Visual mode, may include the last character.
  */
     static void
-adjust_for_sel(cap)
-    cmdarg_T	*cap;
+adjust_for_sel(cmdarg_T *cap)
 {
     if (VIsual_active && cap->oap->inclusive && *p_sel == 'e'
 	    && gchar_cursor() != NUL && lt(VIsual, curwin->w_cursor))
@@ -8874,7 +8763,7 @@ adjust_for_sel(cap)
  * Returns TRUE when backed up to the previous line.
  */
     static int
-unadjust_for_sel()
+unadjust_for_sel(void)
 {
     pos_T	*pp;
 
@@ -8910,8 +8799,7 @@ unadjust_for_sel()
  * SELECT key in Normal or Visual mode: end of Select mode mapping.
  */
     static void
-nv_select(cap)
-    cmdarg_T	*cap;
+nv_select(cmdarg_T *cap)
 {
     if (VIsual_active)
 	VIsual_select = TRUE;
@@ -8929,8 +8817,7 @@ nv_select(cap)
  * cap->arg is TRUE for "G".
  */
     static void
-nv_goto(cap)
-    cmdarg_T	*cap;
+nv_goto(cmdarg_T *cap)
 {
     linenr_T	lnum;
 
@@ -8960,8 +8847,7 @@ nv_goto(cap)
  * CTRL-\ in Normal mode.
  */
     static void
-nv_normal(cap)
-    cmdarg_T	*cap;
+nv_normal(cmdarg_T *cap)
 {
     if (cap->nchar == Ctrl_N || cap->nchar == Ctrl_G)
     {
@@ -8991,8 +8877,7 @@ nv_normal(cap)
  * Don't even beep if we are canceling a command.
  */
     static void
-nv_esc(cap)
-    cmdarg_T	*cap;
+nv_esc(cmdarg_T *cap)
 {
     int		no_reason;
 
@@ -9051,8 +8936,7 @@ nv_esc(cap)
  * Handle "A", "a", "I", "i" and <Insert> commands.
  */
     static void
-nv_edit(cap)
-    cmdarg_T *cap;
+nv_edit(cmdarg_T *cap)
 {
     /* <Insert> is equal to "i" */
     if (cap->cmdchar == K_INS || cap->cmdchar == K_KINS)
@@ -9144,11 +9028,11 @@ nv_edit(cap)
  * Invoke edit() and take care of "restart_edit" and the return value.
  */
     static void
-invoke_edit(cap, repl, cmd, startln)
-    cmdarg_T	*cap;
-    int		repl;		/* "r" or "gr" command */
-    int		cmd;
-    int		startln;
+invoke_edit(
+    cmdarg_T	*cap,
+    int		repl,		/* "r" or "gr" command */
+    int		cmd,
+    int		startln)
 {
     int		restart_edit_save = 0;
 
@@ -9175,8 +9059,8 @@ invoke_edit(cap, repl, cmd, startln)
  * "a" or "i" while an operator is pending or in Visual mode: object motion.
  */
     static void
-nv_object(cap)
-    cmdarg_T	*cap;
+nv_object(
+    cmdarg_T	*cap)
 {
     int		flag;
     int		include;
@@ -9263,8 +9147,7 @@ nv_object(cap)
  * "q:", "q/", "q?": edit command-line in command-line window.
  */
     static void
-nv_record(cap)
-    cmdarg_T	*cap;
+nv_record(cmdarg_T *cap)
 {
     if (cap->oap->op_type == OP_FORMAT)
     {
@@ -9294,8 +9177,7 @@ nv_record(cap)
  * Handle the "@r" command.
  */
     static void
-nv_at(cap)
-    cmdarg_T	*cap;
+nv_at(cmdarg_T *cap)
 {
     if (checkclearop(cap->oap))
 	return;
@@ -9321,8 +9203,7 @@ nv_at(cap)
  * Handle the CTRL-U and CTRL-D commands.
  */
     static void
-nv_halfpage(cap)
-    cmdarg_T	*cap;
+nv_halfpage(cmdarg_T *cap)
 {
     if ((cap->cmdchar == Ctrl_U && curwin->w_cursor.lnum == 1)
 	    || (cap->cmdchar == Ctrl_D
@@ -9336,8 +9217,7 @@ nv_halfpage(cap)
  * Handle "J" or "gJ" command.
  */
     static void
-nv_join(cap)
-    cmdarg_T *cap;
+nv_join(cmdarg_T *cap)
 {
     if (VIsual_active)	/* join the visual lines */
 	nv_operator(cap);
@@ -9361,8 +9241,7 @@ nv_join(cap)
  * "P", "gP", "p" and "gp" commands.
  */
     static void
-nv_put(cap)
-    cmdarg_T  *cap;
+nv_put(cmdarg_T *cap)
 {
     int		regname = 0;
     void	*reg1 = NULL, *reg2 = NULL;
@@ -9496,8 +9375,7 @@ nv_put(cap)
  * "o" and "O" commands.
  */
     static void
-nv_open(cap)
-    cmdarg_T	*cap;
+nv_open(cmdarg_T *cap)
 {
 #ifdef FEAT_DIFF
     /* "do" is ":diffget" */
@@ -9516,8 +9394,7 @@ nv_open(cap)
 
 #ifdef FEAT_SNIFF
     static void
-nv_sniff(cap)
-    cmdarg_T	*cap UNUSED;
+nv_sniff(cmdarg_T *cap UNUSED)
 {
     ProcessSniffRequests();
 }
@@ -9525,8 +9402,7 @@ nv_sniff(cap)
 
 #ifdef FEAT_NETBEANS_INTG
     static void
-nv_nbcmd(cap)
-    cmdarg_T	*cap;
+nv_nbcmd(cmdarg_T *cap)
 {
     netbeans_keycommand(cap->nchar);
 }
@@ -9534,8 +9410,7 @@ nv_nbcmd(cap)
 
 #ifdef FEAT_DND
     static void
-nv_drop(cap)
-    cmdarg_T	*cap UNUSED;
+nv_drop(cmdarg_T *cap UNUSED)
 {
     do_put('~', BACKWARD, 1L, PUT_CURSEND);
 }
@@ -9548,8 +9423,7 @@ nv_drop(cap)
  * input buffer.  "did_cursorhold" is set to avoid retriggering.
  */
     static void
-nv_cursorhold(cap)
-    cmdarg_T	*cap;
+nv_cursorhold(cmdarg_T *cap)
 {
     apply_autocmds(EVENT_CURSORHOLD, NULL, NULL, FALSE, curbuf);
     did_cursorhold = TRUE;
@@ -9561,10 +9435,10 @@ nv_cursorhold(cap)
  * Calculate start/end virtual columns for operating in block mode.
  */
     static void
-get_op_vcol(oap, redo_VIsual_vcol, initial)
-    oparg_T	*oap;
-    colnr_T	redo_VIsual_vcol;
-    int		initial;    /* when TRUE adjust position for 'selectmode' */
+get_op_vcol(
+    oparg_T	*oap,
+    colnr_T	redo_VIsual_vcol,
+    int		initial)    /* when TRUE adjust position for 'selectmode' */
 {
     colnr_T	    start, end;
 
--- a/src/ops.c
+++ b/src/ops.c
@@ -168,9 +168,7 @@ static char opchars[][3] =
  * Must only be called with a valid operator name!
  */
     int
-get_op_type(char1, char2)
-    int		char1;
-    int		char2;
+get_op_type(int char1, int char2)
 {
     int		i;
 
@@ -192,8 +190,7 @@ get_op_type(char1, char2)
  * Return TRUE if operator "op" always works on whole lines.
  */
     int
-op_on_lines(op)
-    int op;
+op_on_lines(int op)
 {
     return opchars[op][2];
 }
@@ -203,8 +200,7 @@ op_on_lines(op)
  * Returns 'g' or 'z' if there is another command character.
  */
     int
-get_op_char(optype)
-    int		optype;
+get_op_char(int optype)
 {
     return opchars[optype][0];
 }
@@ -213,8 +209,7 @@ get_op_char(optype)
  * Get second operator command character.
  */
     int
-get_extra_op_char(optype)
-    int		optype;
+get_extra_op_char(int optype)
 {
     return opchars[optype][1];
 }
@@ -223,10 +218,7 @@ get_extra_op_char(optype)
  * op_shift - handle a shift operation
  */
     void
-op_shift(oap, curs_top, amount)
-    oparg_T	    *oap;
-    int		    curs_top;
-    int		    amount;
+op_shift(oparg_T *oap, int curs_top, int amount)
 {
     long	    i;
     int		    first_char;
@@ -320,11 +312,11 @@ op_shift(oap, curs_top, amount)
  * leaves cursor on first blank in the line
  */
     void
-shift_line(left, round, amount, call_changed_bytes)
-    int	left;
-    int	round;
-    int	amount;
-    int call_changed_bytes;	/* call changed_bytes() */
+shift_line(
+    int	left,
+    int	round,
+    int	amount,
+    int call_changed_bytes)	/* call changed_bytes() */
 {
     int		count;
     int		i, j;
@@ -375,9 +367,7 @@ shift_line(left, round, amount, call_cha
  * Leaves cursor on first character in block.
  */
     static void
-shift_block(oap, amount)
-    oparg_T	*oap;
-    int		amount;
+shift_block(oparg_T *oap, int amount)
 {
     int			left = (oap->op_type == OP_LSHIFT);
     int			oldstate = State;
@@ -562,11 +552,11 @@ shift_block(oap, amount)
  * Caller must prepare for undo.
  */
     static void
-block_insert(oap, s, b_insert, bdp)
-    oparg_T		*oap;
-    char_u		*s;
-    int			b_insert;
-    struct block_def	*bdp;
+block_insert(
+    oparg_T		*oap,
+    char_u		*s,
+    int			b_insert,
+    struct block_def	*bdp)
 {
     int		p_ts;
     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.
  */
     void
-op_reindent(oap, how)
-    oparg_T	*oap;
-    int		(*how)(void);
+op_reindent(oparg_T *oap, int (*how)(void))
 {
     long	i;
     char_u	*l;
@@ -781,7 +769,7 @@ static char_u	*expr_line = NULL;
  * Returns '=' when OK, NUL otherwise.
  */
     int
-get_expr_register()
+get_expr_register(void)
 {
     char_u	*new_line;
 
@@ -800,8 +788,7 @@ get_expr_register()
  * Argument must be an allocated string.
  */
     void
-set_expr_line(new_line)
-    char_u	*new_line;
+set_expr_line(char_u *new_line)
 {
     vim_free(expr_line);
     expr_line = new_line;
@@ -812,7 +799,7 @@ set_expr_line(new_line)
  * Returns a pointer to allocated memory, or NULL for failure.
  */
     char_u *
-get_expr_line()
+get_expr_line(void)
 {
     char_u	*expr_copy;
     char_u	*rv;
@@ -843,7 +830,7 @@ get_expr_line()
  * Get the '=' register expression itself, without evaluating it.
  */
     char_u *
-get_expr_line_src()
+get_expr_line_src(void)
 {
     if (expr_line == NULL)
 	return NULL;
@@ -856,9 +843,9 @@ get_expr_line_src()
  * Note: There is no check for 0 (default register), caller should do this
  */
     int
-valid_yank_reg(regname, writing)
-    int	    regname;
-    int	    writing;	    /* if TRUE check for writable registers */
+valid_yank_reg(
+    int	    regname,
+    int	    writing)	    /* if TRUE check for writable registers */
 {
     if (       (regname > 0 && ASCII_ISALNUM(regname))
 	    || (!writing && vim_strchr((char_u *)
@@ -893,9 +880,7 @@ valid_yank_reg(regname, writing)
  * If regname is 0 and reading, use previous register
  */
     void
-get_yank_register(regname, writing)
-    int	    regname;
-    int	    writing;
+get_yank_register(int regname, int writing)
 {
     int	    i;
 
@@ -942,8 +927,7 @@ get_yank_register(regname, writing)
  * available return zero, otherwise return "regname".
  */
     int
-may_get_selection(regname)
-    int regname;
+may_get_selection(int regname)
 {
     if (regname == '*')
     {
@@ -968,9 +952,9 @@ may_get_selection(regname)
  * The returned pointer has allocated memory, use put_register() later.
  */
     void *
-get_register(name, copy)
-    int		name;
-    int		copy;	/* make a copy, if FALSE make register empty. */
+get_register(
+    int		name,
+    int		copy)	/* make a copy, if FALSE make register empty. */
 {
     struct yankreg	*reg;
     int			i;
@@ -1021,9 +1005,7 @@ get_register(name, copy)
  * Put "reg" into register "name".  Free any previous contents and "reg".
  */
     void
-put_register(name, reg)
-    int		name;
-    void	*reg;
+put_register(int name, void *reg)
 {
     get_yank_register(name, 0);
     free_yank_all();
@@ -1037,8 +1019,7 @@ put_register(name, reg)
 }
 
     void
-free_register(reg)
-    void	*reg;
+free_register(void *reg)
 {
     struct yankreg tmp;
 
@@ -1054,8 +1035,7 @@ free_register(reg)
  * return TRUE if the current yank register has type MLINE
  */
     int
-yank_register_mline(regname)
-    int	    regname;
+yank_register_mline(int regname)
 {
     if (regname != 0 && !valid_yank_reg(regname, FALSE))
 	return FALSE;
@@ -1072,8 +1052,7 @@ yank_register_mline(regname)
  * Return FAIL for failure, OK otherwise.
  */
     int
-do_record(c)
-    int c;
+do_record(int c)
 {
     char_u	    *p;
     static int	    regname;
@@ -1133,9 +1112,7 @@ do_record(c)
  * return FAIL for failure, OK otherwise
  */
     static int
-stuff_yank(regname, p)
-    int		regname;
-    char_u	*p;
+stuff_yank(int regname, char_u *p)
 {
     char_u	*lp;
     char_u	**pp;
@@ -1191,11 +1168,11 @@ static int execreg_lastc = NUL;
  * return FAIL for failure, OK otherwise
  */
     int
-do_execreg(regname, colon, addcr, silent)
-    int	    regname;
-    int	    colon;		/* insert ':' before each line */
-    int	    addcr;		/* always add '\n' to end of line */
-    int	    silent;		/* set "silent" flag in typeahead buffer */
+do_execreg(
+    int	    regname,
+    int	    colon,		/* insert ':' before each line */
+    int	    addcr,		/* always add '\n' to end of line */
+    int	    silent)		/* set "silent" flag in typeahead buffer */
 {
     long	i;
     char_u	*p;
@@ -1317,8 +1294,7 @@ do_execreg(regname, colon, addcr, silent
  * used only after other typeahead has been processed.
  */
     static void
-put_reedit_in_typebuf(silent)
-    int		silent;
+put_reedit_in_typebuf(int silent)
 {
     char_u	buf[3];
 
@@ -1347,11 +1323,11 @@ put_reedit_in_typebuf(silent)
  * no remapping.
  */
     static int
-put_in_typebuf(s, esc, colon, silent)
-    char_u	*s;
-    int		esc;
-    int		colon;	    /* add ':' before the line */
-    int		silent;
+put_in_typebuf(
+    char_u	*s,
+    int		esc,
+    int		colon,	    /* add ':' before the line */
+    int		silent)
 {
     int		retval = OK;
 
@@ -1386,9 +1362,9 @@ put_in_typebuf(s, esc, colon, silent)
  * return FAIL for failure, OK otherwise
  */
     int
-insert_reg(regname, literally)
-    int		regname;
-    int		literally;	/* insert literally, not as if typed */
+insert_reg(
+    int		regname,
+    int		literally)	/* insert literally, not as if typed */
 {
     long	i;
     int		retval = OK;
@@ -1450,9 +1426,7 @@ insert_reg(regname, literally)
  * literally ("literally" TRUE) or interpret is as typed characters.
  */
     static void
-stuffescaped(arg, literally)
-    char_u	*arg;
-    int		literally;
+stuffescaped(char_u *arg, int literally)
 {
     int		c;
     char_u	*start;
@@ -1494,11 +1468,11 @@ stuffescaped(arg, literally)
  * value in "argp".
  */
     int
-get_spec_reg(regname, argp, allocated, errmsg)
-    int		regname;
-    char_u	**argp;
-    int		*allocated;	/* return: TRUE when value was allocated */
-    int		errmsg;		/* give error message when failing */
+get_spec_reg(
+    int		regname,
+    char_u	**argp,
+    int		*allocated,	/* return: TRUE when value was allocated */
+    int		errmsg)		/* give error message when failing */
 {
     int		cnt;
 
@@ -1581,10 +1555,10 @@ get_spec_reg(regname, argp, allocated, e
  * return FAIL for failure, OK otherwise
  */
     int
-cmdline_paste_reg(regname, literally, remcr)
-    int regname;
-    int literally;	/* Insert text literally instead of "as typed" */
-    int remcr;		/* don't add CR characters */
+cmdline_paste_reg(
+    int regname,
+    int literally,	/* Insert text literally instead of "as typed" */
+    int remcr)		/* don't add CR characters */
 {
     long	i;
 
@@ -1616,8 +1590,7 @@ cmdline_paste_reg(regname, literally, re
  * used always and the clipboard being available.
  */
     void
-adjust_clip_reg(rp)
-    int		*rp;
+adjust_clip_reg(int *rp)
 {
     /* If no reg. specified, and "unnamed" or "unnamedplus" is in 'clipboard',
      * use '*' or '+' reg, respectively. "unnamedplus" prevails. */
@@ -1643,8 +1616,7 @@ adjust_clip_reg(rp)
  * Return FAIL if undo failed, OK otherwise.
  */
     int
-op_delete(oap)
-    oparg_T   *oap;
+op_delete(oparg_T *oap)
 {
     int			n;
     linenr_T		lnum;
@@ -2013,8 +1985,7 @@ setmarks:
  * Used for deletion.
  */
     static void
-mb_adjust_opend(oap)
-    oparg_T	*oap;
+mb_adjust_opend(oparg_T *oap)
 {
     char_u	*p;
 
@@ -2031,9 +2002,7 @@ mb_adjust_opend(oap)
  * Replace a whole area with one character.
  */
     int
-op_replace(oap, c)
-    oparg_T   *oap;
-    int		c;
+op_replace(oparg_T *oap, int c)
 {
     int			n, numc;
 #ifdef FEAT_MBYTE
@@ -2282,8 +2251,7 @@ static int swapchars(int op_type, pos_T 
  * Handle the (non-standard vi) tilde operator.  Also for "gu", "gU" and "g?".
  */
     void
-op_tilde(oap)
-    oparg_T	*oap;
+op_tilde(oparg_T *oap)
 {
     pos_T		pos;
     struct block_def	bd;
@@ -2403,10 +2371,7 @@ op_tilde(oap)
  * Returns TRUE if some character was changed.
  */
     static int
-swapchars(op_type, pos, length)
-    int		op_type;
-    pos_T	*pos;
-    int		length;
+swapchars(int op_type, pos_T *pos, int length)
 {
     int todo;
     int	did_change = 0;
@@ -2438,9 +2403,7 @@ swapchars(op_type, pos, length)
  * returns TRUE when something actually changed.
  */
     int
-swapchar(op_type, pos)
-    int	    op_type;
-    pos_T    *pos;
+swapchar(int op_type, pos_T *pos)
 {
     int	    c;
     int	    nc;
@@ -2510,9 +2473,7 @@ swapchar(op_type, pos)
  * op_insert - Insert and append operators for Visual mode.
  */
     void
-op_insert(oap, count1)
-    oparg_T	*oap;
-    long	count1;
+op_insert(oparg_T *oap, long count1)
 {
     long		ins_len, pre_textlen = 0;
     char_u		*firstline, *ins_text;
@@ -2707,8 +2668,7 @@ op_insert(oap, count1)
  * return TRUE if edit() returns because of a CTRL-O command
  */
     int
-op_change(oap)
-    oparg_T	*oap;
+op_change(oparg_T *oap)
 {
     colnr_T		l;
     int			retval;
@@ -2860,7 +2820,7 @@ op_change(oap)
  * set all the yank registers to empty (called from main())
  */
     void
-init_yank()
+init_yank(void)
 {
     int		i;
 
@@ -2870,7 +2830,7 @@ init_yank()
 
 #if defined(EXITFREE) || defined(PROTO)
     void
-clear_registers()
+clear_registers(void)
 {
     int		i;
 
@@ -2888,8 +2848,7 @@ clear_registers()
  * Called for normal freeing and in case of error.
  */
     static void
-free_yank(n)
-    long	n;
+free_yank(long n)
 {
     if (y_current->y_array != NULL)
     {
@@ -2923,7 +2882,7 @@ free_yank(n)
 }
 
     static void
-free_yank_all()
+free_yank_all(void)
 {
     free_yank(y_current->y_size);
 }
@@ -2937,10 +2896,7 @@ free_yank_all()
  * Return FAIL for failure, OK otherwise.
  */
     int
-op_yank(oap, deleting, mess)
-    oparg_T   *oap;
-    int	    deleting;
-    int	    mess;
+op_yank(oparg_T *oap, int deleting, int mess)
 {
     long		y_idx;		/* index in y_array[] */
     struct yankreg	*curr;		/* copy of y_current */
@@ -3265,9 +3221,7 @@ fail:		/* free the allocated lines */
 }
 
     static int
-yank_copy_line(bd, y_idx)
-    struct block_def	*bd;
-    long		y_idx;
+yank_copy_line(struct block_def *bd, long y_idx)
 {
     char_u	*pnew;
 
@@ -3290,8 +3244,7 @@ yank_copy_line(bd, y_idx)
  * Make a copy of the y_current register to register "reg".
  */
     static void
-copy_yank_reg(reg)
-    struct yankreg *reg;
+copy_yank_reg(struct yankreg *reg)
 {
     struct yankreg	*curr = y_current;
     long		j;
@@ -3323,11 +3276,11 @@ copy_yank_reg(reg)
  *	    PUT_LINE		force linewise put (":put")
  */
     void
-do_put(regname, dir, count, flags)
-    int		regname;
-    int		dir;		/* BACKWARD for 'P', FORWARD for 'p' */
-    long	count;
-    int		flags;
+do_put(
+    int		regname,
+    int		dir,		/* BACKWARD for 'P', FORWARD for 'p' */
+    long	count,
+    int		flags)
 {
     char_u	*ptr;
     char_u	*newp, *oldp;
@@ -4000,7 +3953,7 @@ end:
  * there move it left.
  */
     void
-adjust_cursor_eol()
+adjust_cursor_eol(void)
 {
     if (curwin->w_cursor.col > 0
 	    && gchar_cursor() == NUL
@@ -4030,7 +3983,7 @@ adjust_cursor_eol()
  * Return TRUE if lines starting with '#' should be left aligned.
  */
     int
-preprocs_left()
+preprocs_left(void)
 {
     return
 # ifdef FEAT_SMARTINDENT
@@ -4050,8 +4003,7 @@ preprocs_left()
 
 /* Return the character name of the register with the given number */
     int
-get_register_name(num)
-    int num;
+get_register_name(int num)
 {
     if (num == -1)
 	return '"';
@@ -4087,8 +4039,7 @@ get_register_name(num)
  * ":dis" and ":registers": Display the contents of the yank registers.
  */
     void
-ex_display(eap)
-    exarg_T	*eap;
+ex_display(exarg_T *eap)
 {
     int			i, n;
     long		j;
@@ -4251,9 +4202,9 @@ ex_display(eap)
  * truncate at end of screen line
  */
     static void
-dis_msg(p, skip_esc)
-    char_u	*p;
-    int		skip_esc;	    /* if TRUE, ignore trailing ESC */
+dis_msg(
+    char_u	*p,
+    int		skip_esc)	    /* if TRUE, ignore trailing ESC */
 {
     int		n;
 #ifdef FEAT_MBYTE
@@ -4292,11 +4243,11 @@ dis_msg(p, skip_esc)
  *		comment.
  */
     static char_u *
-skip_comment(line, process, include_space, is_comment)
-    char_u   *line;
-    int      process;
-    int	     include_space;
-    int      *is_comment;
+skip_comment(
+    char_u   *line,
+    int      process,
+    int	     include_space,
+    int      *is_comment)
 {
     char_u *comment_flags = NULL;
     int    lead_len;
@@ -4364,12 +4315,12 @@ skip_comment(line, process, include_spac
  * return FAIL for failure, OK otherwise
  */
     int
-do_join(count, insert_space, save_undo, use_formatoptions, setmark)
-    long    count;
-    int	    insert_space;
-    int	    save_undo;
-    int	    use_formatoptions UNUSED;
-    int	    setmark;
+do_join(
+    long    count,
+    int	    insert_space,
+    int	    save_undo,
+    int	    use_formatoptions UNUSED,
+    int	    setmark)
 {
     char_u	*curr = NULL;
     char_u      *curr_start = NULL;
@@ -4594,12 +4545,12 @@ theend:
  * 'leader1' must match 'leader2_len' characters from 'leader2' -- webb
  */
     static int
-same_leader(lnum, leader1_len, leader1_flags, leader2_len, leader2_flags)
-    linenr_T lnum;
-    int	    leader1_len;
-    char_u  *leader1_flags;
-    int	    leader2_len;
-    char_u  *leader2_flags;
+same_leader(
+    linenr_T lnum,
+    int	    leader1_len,
+    char_u  *leader1_flags,
+    int	    leader2_len,
+    char_u  *leader2_flags)
 {
     int	    idx1 = 0, idx2 = 0;
     char_u  *p;
@@ -4669,9 +4620,9 @@ same_leader(lnum, leader1_len, leader1_f
  * Implementation of the format operator 'gq'.
  */
     void
-op_format(oap, keep_cursor)
-    oparg_T	*oap;
-    int		keep_cursor;		/* keep cursor on same text char */
+op_format(
+    oparg_T	*oap,
+    int		keep_cursor)		/* keep cursor on same text char */
 {
     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'.
  */
     void
-op_formatexpr(oap)
-    oparg_T	*oap;
+op_formatexpr(oparg_T *oap)
 {
     if (oap->is_VIsual)
 	/* When there is no change: need to remove the Visual selection */
@@ -4756,10 +4706,10 @@ op_formatexpr(oap)
 }
 
     int
-fex_format(lnum, count, c)
-    linenr_T	lnum;
-    long	count;
-    int		c;	/* character to be inserted */
+fex_format(
+    linenr_T	lnum,
+    long	count,
+    int		c)	/* character to be inserted */
 {
     int		use_sandbox = was_set_insecurely((char_u *)"formatexpr",
 								   OPT_LOCAL);
@@ -4795,9 +4745,9 @@ fex_format(lnum, count, c)
  * first line.
  */
     void
-format_lines(line_count, avoid_fex)
-    linenr_T	line_count;
-    int		avoid_fex;		/* don't use 'formatexpr' */
+format_lines(
+    linenr_T	line_count,
+    int		avoid_fex)		/* don't use 'formatexpr' */
 {
     int		max_len;
     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.
  */
     static int
-ends_in_white(lnum)
-    linenr_T	lnum;
+ends_in_white(linenr_T lnum)
 {
     char_u	*s = ml_get(lnum);
     size_t	l;
@@ -5093,11 +5042,11 @@ ends_in_white(lnum)
  */
 #ifdef FEAT_COMMENTS
     static int
-fmt_check_par(lnum, leader_len, leader_flags, do_comments)
-    linenr_T	lnum;
-    int		*leader_len;
-    char_u	**leader_flags;
-    int		do_comments;
+fmt_check_par(
+    linenr_T	lnum,
+    int		*leader_len,
+    char_u	**leader_flags,
+    int		do_comments)
 {
     char_u	*flags = NULL;	    /* init for GCC */
     char_u	*ptr;
@@ -5124,8 +5073,7 @@ fmt_check_par(lnum, leader_len, leader_f
 }
 #else
     static int
-fmt_check_par(lnum)
-    linenr_T	lnum;
+fmt_check_par(linenr_T lnum)
 {
     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.
  */
     int
-paragraph_start(lnum)
-    linenr_T	lnum;
+paragraph_start(linenr_T lnum)
 {
     char_u	*p;
 #ifdef FEAT_COMMENTS
@@ -5201,11 +5148,11 @@ paragraph_start(lnum)
  *   that are to be yanked.
  */
     static void
-block_prep(oap, bdp, lnum, is_del)
-    oparg_T		*oap;
-    struct block_def	*bdp;
-    linenr_T		lnum;
-    int			is_del;
+block_prep(
+    oparg_T		*oap,
+    struct block_def	*bdp,
+    linenr_T		lnum,
+    int			is_del)
 {
     int		incr = 0;
     char_u	*pend;
@@ -5350,10 +5297,10 @@ block_prep(oap, bdp, lnum, is_del)
  * Handle the add/subtract operator.
  */
     void
-op_addsub(oap, Prenum1, g_cmd)
-    oparg_T	*oap;
-    linenr_T	Prenum1;	    /* Amount of add/subtract */
-    int		g_cmd;		    /* was g<c-a>/g<c-x> */
+op_addsub(
+    oparg_T	*oap,
+    linenr_T	Prenum1,	    /* Amount of add/subtract */
+    int		g_cmd)		    /* was g<c-a>/g<c-x> */
 {
     pos_T		pos;
     struct block_def	bd;
@@ -5464,11 +5411,11 @@ op_addsub(oap, Prenum1, g_cmd)
  * Returns TRUE if some character was changed.
  */
     static int
-do_addsub(op_type, pos, length, Prenum1)
-    int		op_type;
-    pos_T	*pos;
-    int		length;
-    linenr_T	Prenum1;
+do_addsub(
+    int		op_type,
+    pos_T	*pos,
+    int		length,
+    linenr_T	Prenum1)
 {
     int		col;
     char_u	*buf1;
@@ -5834,9 +5781,7 @@ theend:
 
 #ifdef FEAT_VIMINFO
     int
-read_viminfo_register(virp, force)
-    vir_T	*virp;
-    int		force;
+read_viminfo_register(vir_T *virp, int force)
 {
     int		eof;
     int		do_it = TRUE;
@@ -5971,8 +5916,7 @@ read_viminfo_register(virp, force)
 }
 
     void
-write_viminfo_registers(fp)
-    FILE    *fp;
+write_viminfo_registers(FILE *fp)
 {
     int	    i, j;
     char_u  *type;
@@ -6093,7 +6037,7 @@ write_viminfo_registers(fp)
  */
 #if defined(FEAT_X11) && defined(FEAT_CLIPBOARD)
     void
-x11_export_final_selection()
+x11_export_final_selection(void)
 {
     Display	*dpy;
     char_u	*str = NULL;
@@ -6173,8 +6117,7 @@ x11_export_final_selection()
 #endif
 
     void
-clip_free_selection(cbd)
-    VimClipboard	*cbd;
+clip_free_selection(VimClipboard *cbd)
 {
     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 '+'.
  */
     void
-clip_get_selection(cbd)
-    VimClipboard	*cbd;
+clip_get_selection(VimClipboard *cbd)
 {
     struct yankreg *old_y_previous, *old_y_current;
     pos_T	old_cursor;
@@ -6253,11 +6195,11 @@ clip_get_selection(cbd)
  * Convert from the GUI selection string into the '*'/'+' register.
  */
     void
-clip_yank_selection(type, str, len, cbd)
-    int		type;
-    char_u	*str;
-    long	len;
-    VimClipboard *cbd;
+clip_yank_selection(
+    int		type,
+    char_u	*str,
+    long	len,
+    VimClipboard *cbd)
 {
     struct yankreg *y_ptr;
 
@@ -6277,10 +6219,7 @@ clip_yank_selection(type, str, len, cbd)
  * Returns the motion type, or -1 for failure.
  */
     int
-clip_convert_selection(str, len, cbd)
-    char_u	**str;
-    long_u	*len;
-    VimClipboard *cbd;
+clip_convert_selection(char_u **str, long_u *len, VimClipboard *cbd)
 {
     char_u	*p;
     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.
  */
     static void
-may_set_selection()
+may_set_selection(void)
 {
     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.
  */
     void
-dnd_yank_drag_data(str, len)
-    char_u	*str;
-    long	len;
+dnd_yank_drag_data(char_u *str, long len)
 {
     struct yankreg *curr;
 
@@ -6389,9 +6326,7 @@ dnd_yank_drag_data(str, len)
  * Returns MAUTO for error.
  */
     char_u
-get_reg_type(regname, reglen)
-    int	    regname;
-    long    *reglen;
+get_reg_type(int regname, long *reglen)
 {
     switch (regname)
     {
@@ -6436,9 +6371,7 @@ static char_u *getreg_wrap_one_line(char
  * Otherwise just return "s".
  */
     static char_u *
-getreg_wrap_one_line(s, flags)
-    char_u	*s;
-    int		flags;
+getreg_wrap_one_line(char_u *s, int flags)
 {
     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.
  */
     char_u *
-get_reg_contents(regname, flags)
-    int		regname;
-    int		flags;
+get_reg_contents(int regname, int flags)
 {
     long	i;
     char_u	*retval;
@@ -6572,12 +6503,12 @@ get_reg_contents(regname, flags)
 }
 
     static int
-init_write_reg(name, old_y_previous, old_y_current, must_append, yank_type)
-    int		    name;
-    struct yankreg  **old_y_previous;
-    struct yankreg  **old_y_current;
-    int		    must_append;
-    int		    *yank_type UNUSED;
+init_write_reg(
+    int		    name,
+    struct yankreg  **old_y_previous,
+    struct yankreg  **old_y_current,
+    int		    must_append,
+    int		    *yank_type UNUSED)
 {
     if (!valid_yank_reg(name, TRUE))	    /* check for valid reg name */
     {
@@ -6596,10 +6527,10 @@ init_write_reg(name, old_y_previous, old
 }
 
     static void
-finish_write_reg(name, old_y_previous, old_y_current)
-    int		    name;
-    struct yankreg  *old_y_previous;
-    struct yankreg  *old_y_current;
+finish_write_reg(
+    int		    name,
+    struct yankreg  *old_y_previous,
+    struct yankreg  *old_y_current)
 {
 # ifdef FEAT_CLIPBOARD
     /* Send text of clipboard register to the clipboard. */
@@ -6622,23 +6553,23 @@ finish_write_reg(name, old_y_previous, o
  * If "str" ends in '\n' or '\r', use linewise, otherwise use characterwise.
  */
     void
-write_reg_contents(name, str, maxlen, must_append)
-    int		name;
-    char_u	*str;
-    int		maxlen;
-    int		must_append;
+write_reg_contents(
+    int		name,
+    char_u	*str,
+    int		maxlen,
+    int		must_append)
 {
     write_reg_contents_ex(name, str, maxlen, must_append, MAUTO, 0L);
 }
 
     void
-write_reg_contents_lst(name, strings, maxlen, must_append, yank_type, block_len)
-    int		name;
-    char_u	**strings;
-    int		maxlen UNUSED;
-    int		must_append;
-    int		yank_type;
-    long	block_len;
+write_reg_contents_lst(
+    int		name,
+    char_u	**strings,
+    int		maxlen UNUSED,
+    int		must_append,
+    int		yank_type,
+    long	block_len)
 {
     struct yankreg  *old_y_previous, *old_y_current;
 
@@ -6677,13 +6608,13 @@ write_reg_contents_lst(name, strings, ma
 }
 
     void
-write_reg_contents_ex(name, str, maxlen, must_append, yank_type, block_len)
-    int		name;
-    char_u	*str;
-    int		maxlen;
-    int		must_append;
-    int		yank_type;
-    long	block_len;
+write_reg_contents_ex(
+    int		name,
+    char_u	*str,
+    int		maxlen,
+    int		must_append,
+    int		yank_type,
+    long	block_len)
 {
     struct yankreg  *old_y_previous, *old_y_current;
     long	    len;
@@ -6759,13 +6690,13 @@ write_reg_contents_ex(name, str, maxlen,
  * is appended.
  */
     static void
-str_to_reg(y_ptr, yank_type, str, len, blocklen, str_list)
-    struct yankreg	*y_ptr;		/* pointer to yank register */
-    int			yank_type;	/* MCHAR, MLINE, MBLOCK, MAUTO */
-    char_u		*str;		/* string to put in register */
-    long		len;		/* length of string */
-    long		blocklen;	/* width of Visual block */
-    int			str_list;	/* TRUE if str is char_u ** */
+str_to_reg(
+    struct yankreg	*y_ptr,		/* pointer to yank register */
+    int			yank_type,	/* MCHAR, MLINE, MBLOCK, MAUTO */
+    char_u		*str,		/* string to put in register */
+    long		len,		/* length of string */
+    long		blocklen,	/* width of Visual block */
+    int			str_list)	/* TRUE if str is char_u ** */
 {
     int		type;			/* MCHAR, MLINE or MBLOCK */
     int		lnum;
@@ -6899,8 +6830,7 @@ str_to_reg(y_ptr, yank_type, str, len, b
 #endif /* FEAT_CLIPBOARD || FEAT_EVAL || PROTO */
 
     void
-clear_oparg(oap)
-    oparg_T	*oap;
+clear_oparg(oparg_T *oap)
 {
     vim_memset(oap, 0, sizeof(oparg_T));
 }
@@ -6922,12 +6852,12 @@ static long	line_count_info(char_u *line
  *  the size of the EOL character.
  */
     static long
-line_count_info(line, wc, cc, limit, eol_size)
-    char_u	*line;
-    long	*wc;
-    long	*cc;
-    long	limit;
-    int		eol_size;
+line_count_info(
+    char_u	*line,
+    long	*wc,
+    long	*cc,
+    long	limit,
+    int		eol_size)
 {
     long	i;
     long	words = 0;
@@ -6975,8 +6905,7 @@ line_count_info(line, wc, cc, limit, eol
  * When "dict" is not NULL store the info there instead of showing it.
  */
     void
-cursor_pos_info(dict)
-    dict_T	*dict;
+cursor_pos_info(dict_T *dict)
 {
     char_u	*p;
     char_u	buf1[50];
--- a/src/option.c
+++ b/src/option.c
@@ -3165,7 +3165,7 @@ static int briopt_check(win_T *wp);
  * Called only once from main(), just after creating the first buffer.
  */
     void
-set_init_1()
+set_init_1(void)
 {
     char_u	*p;
     int		opt_idx;
@@ -3589,10 +3589,10 @@ set_init_1()
  * This does not take care of side effects!
  */
     static void
-set_option_default(opt_idx, opt_flags, compatible)
-    int		opt_idx;
-    int		opt_flags;	/* OPT_FREE, OPT_LOCAL and/or OPT_GLOBAL */
-    int		compatible;	/* use Vi default value */
+set_option_default(
+    int		opt_idx,
+    int		opt_flags,	/* OPT_FREE, OPT_LOCAL and/or OPT_GLOBAL */
+    int		compatible)	/* use Vi default value */
 {
     char_u	*varp;		/* pointer to variable for current option */
     int		dvi;		/* index in def_val[] */
@@ -3664,8 +3664,8 @@ set_option_default(opt_idx, opt_flags, c
  * When "opt_flags" is non-zero skip 'encoding'.
  */
     static void
-set_options_default(opt_flags)
-    int		opt_flags;	/* OPT_FREE, OPT_LOCAL and/or OPT_GLOBAL */
+set_options_default(
+    int		opt_flags)	/* OPT_FREE, OPT_LOCAL and/or OPT_GLOBAL */
 {
     int		i;
 #ifdef FEAT_WINDOWS
@@ -3707,9 +3707,7 @@ set_options_default(opt_flags)
  * Used for 'sh', 'backupskip' and 'term'.
  */
     void
-set_string_default(name, val)
-    char	*name;
-    char_u	*val;
+set_string_default(char *name, char_u *val)
 {
     char_u	*p;
     int		opt_idx;
@@ -3733,9 +3731,7 @@ set_string_default(name, val)
  * Used for 'lines' and 'columns'.
  */
     void
-set_number_default(name, val)
-    char	*name;
-    long	val;
+set_number_default(char *name, long val)
 {
     int		opt_idx;
 
@@ -3749,7 +3745,7 @@ set_number_default(name, val)
  * Free all options.
  */
     void
-free_all_options()
+free_all_options(void)
 {
     int		i;
 
@@ -3777,7 +3773,7 @@ free_all_options()
  * setting 'term'.
  */
     void
-set_init_2()
+set_init_2(void)
 {
     int		idx;
 
@@ -3841,7 +3837,7 @@ set_init_2()
  * case. If this value is 0-6 or 8, our background is dark.
  */
     static char_u *
-term_bg_default()
+term_bg_default(void)
 {
 #if defined(MSDOS) || defined(WIN3264)
     /* DOS console nearly always black */
@@ -3866,7 +3862,7 @@ term_bg_default()
  * Initialize the options, part three: After reading the .vimrc
  */
     void
-set_init_3()
+set_init_3(void)
 {
 #if defined(UNIX) || defined(WIN3264)
 /*
@@ -4054,8 +4050,7 @@ set_init_3()
  * Only the first two characters of "lang" are used.
  */
     void
-set_helplang_default(lang)
-    char_u	*lang;
+set_helplang_default(char_u *lang)
 {
     int		idx;
 
@@ -4088,7 +4083,7 @@ set_helplang_default(lang)
 static char_u *gui_bg_default(void);
 
     static char_u *
-gui_bg_default()
+gui_bg_default(void)
 {
     if (gui_get_lightness(gui.back_pixel) < 127)
 	return (char_u *)"dark";
@@ -4099,7 +4094,7 @@ gui_bg_default()
  * Option initializations that can only be done after opening the GUI window.
  */
     void
-init_gui_options()
+init_gui_options(void)
 {
     /* Set the 'background' option according to the lightness of the
      * background color, unless the user has set it already. */
@@ -4120,7 +4115,7 @@ init_gui_options()
  * machine.
  */
     void
-set_title_defaults()
+set_title_defaults(void)
 {
     int	    idx1;
     long    val;
@@ -4173,9 +4168,9 @@ set_title_defaults()
  * returns FAIL if an error is detected, OK otherwise
  */
     int
-do_set(arg, opt_flags)
-    char_u	*arg;		/* option string (may be written to!) */
-    int		opt_flags;
+do_set(
+    char_u	*arg,		/* option string (may be written to!) */
+    int		opt_flags)
 {
     int		opt_idx;
     char_u	*errmsg;
@@ -5087,10 +5082,10 @@ theend:
  * Sets the P_WAS_SET flag and takes care of the P_INSECURE flag.
  */
     static void
-did_set_option(opt_idx, opt_flags, new_value)
-    int	    opt_idx;
-    int	    opt_flags;	    /* possibly with OPT_MODELINE */
-    int	    new_value;	    /* value was replaced completely */
+did_set_option(
+    int	    opt_idx,
+    int	    opt_flags,	    /* possibly with OPT_MODELINE */
+    int	    new_value)	    /* value was replaced completely */
 {
     long_u	*p;
 
@@ -5111,9 +5106,7 @@ did_set_option(opt_idx, opt_flags, new_v
 }
 
     static char_u *
-illegal_char(errbuf, c)
-    char_u	*errbuf;
-    int		c;
+illegal_char(char_u *errbuf, int c)
 {
     if (errbuf == NULL)
 	return (char_u *)"";
@@ -5127,8 +5120,7 @@ illegal_char(errbuf, c)
  * Used for 'wildchar' and 'cedit' options.
  */
     static int
-string_to_key(arg)
-    char_u	*arg;
+string_to_key(char_u *arg)
 {
     if (*arg == '<')
 	return find_key_option(arg + 1);
@@ -5143,7 +5135,7 @@ string_to_key(arg)
  * Returns NULL if value is OK, error message otherwise.
  */
     static char_u *
-check_cedit()
+check_cedit(void)
 {
     int n;
 
@@ -5168,8 +5160,8 @@ check_cedit()
  * the old value back.
  */
     static void
-did_set_title(icon)
-    int	    icon;	    /* Did set icon instead of title */
+did_set_title(
+    int	    icon)	    /* Did set icon instead of title */
 {
     if (starting != NO_SCREEN
 #ifdef FEAT_GUI
@@ -5196,10 +5188,10 @@ did_set_title(icon)
  * set_options_bin -  called when 'bin' changes value.
  */
     void
-set_options_bin(oldval, newval, opt_flags)
-    int		oldval;
-    int		newval;
-    int		opt_flags;	/* OPT_LOCAL and/or OPT_GLOBAL */
+set_options_bin(
+    int		oldval,
+    int		newval,
+    int		opt_flags)	/* OPT_LOCAL and/or OPT_GLOBAL */
 {
     /*
      * The option values that are changed when 'bin' changes are
@@ -5269,8 +5261,7 @@ set_options_bin(oldval, newval, opt_flag
  * number, return -1.
  */
     int
-get_viminfo_parameter(type)
-    int	    type;
+get_viminfo_parameter(int type)
 {
     char_u  *p;
 
@@ -5286,8 +5277,7 @@ get_viminfo_parameter(type)
  * Return NULL if the parameter is not specified in the string.
  */
     char_u *
-find_viminfo_parameter(type)
-    int	    type;
+find_viminfo_parameter(int type)
 {
     char_u  *p;
 
@@ -5312,9 +5302,7 @@ find_viminfo_parameter(type)
  * Return pointer to NameBuff, or NULL when not expanded.
  */
     static char_u *
-option_expand(opt_idx, val)
-    int		opt_idx;
-    char_u	*val;
+option_expand(int opt_idx, char_u *val)
 {
     /* if option doesn't need expansion nothing to do */
     if (!(options[opt_idx].flags & P_EXPAND) || options[opt_idx].var == NULL)
@@ -5351,7 +5339,7 @@ option_expand(opt_idx, val)
  * option values.
  */
     static void
-didset_options()
+didset_options(void)
 {
     /* initialize the table for 'iskeyword' et.al. */
     (void)init_chartab();
@@ -5406,7 +5394,7 @@ didset_options()
  * More side effects of setting options.
  */
     static void
-didset_options2()
+didset_options2(void)
 {
     /* Initialize the highlight_attr[] table. */
     (void)highlight_changed();
@@ -5430,7 +5418,7 @@ didset_options2()
  * Check for string options that are NULL (normally only termcap options).
  */
     void
-check_options()
+check_options(void)
 {
     int		opt_idx;
 
@@ -5443,8 +5431,7 @@ check_options()
  * Check string options in a buffer for NULL value.
  */
     void
-check_buf_options(buf)
-    buf_T	*buf;
+check_buf_options(buf_T *buf)
 {
 #if defined(FEAT_QUICKFIX)
     check_string_option(&buf->b_p_bh);
@@ -5552,16 +5539,14 @@ check_buf_options(buf)
  * Does NOT check for P_ALLOCED flag!
  */
     void
-free_string_option(p)
-    char_u	*p;
+free_string_option(char_u *p)
 {
     if (p != empty_option)
 	vim_free(p);
 }
 
     void
-clear_string_option(pp)
-    char_u	**pp;
+clear_string_option(char_u **pp)
 {
     if (*pp != empty_option)
 	vim_free(*pp);
@@ -5569,8 +5554,7 @@ clear_string_option(pp)
 }
 
     static void
-check_string_option(pp)
-    char_u	**pp;
+check_string_option(char_u **pp)
 {
     if (*pp == NULL)
 	*pp = empty_option;
@@ -5580,8 +5564,7 @@ check_string_option(pp)
  * Mark a terminal option as allocated, found by a pointer into term_strings[].
  */
     void
-set_term_option_alloced(p)
-    char_u **p;
+set_term_option_alloced(char_u **p)
 {
     int		opt_idx;
 
@@ -5601,9 +5584,7 @@ set_term_option_alloced(p)
  * Return -1 for an unknown option.
  */
     int
-was_set_insecurely(opt, opt_flags)
-    char_u  *opt;
-    int	    opt_flags;
+was_set_insecurely(char_u *opt, int opt_flags)
 {
     int	    idx = findoption(opt);
     long_u  *flagp;
@@ -5622,9 +5603,7 @@ was_set_insecurely(opt, opt_flags)
  * "opt_idx".  For some local options a local flags field is used.
  */
     static long_u *
-insecure_flag(opt_idx, opt_flags)
-    int		opt_idx;
-    int		opt_flags;
+insecure_flag(int opt_idx, int opt_flags)
 {
     if (opt_flags & OPT_LOCAL)
 	switch ((int)options[opt_idx].indir)
@@ -5661,7 +5640,7 @@ static void redraw_titles(void);
 /*
  * Redraw the window title and/or tab page text later.
  */
-static void redraw_titles()
+static void redraw_titles(void)
 {
     need_maketitle = TRUE;
 # ifdef FEAT_WINDOWS
@@ -5678,12 +5657,12 @@ static void redraw_titles()
  * SID_NONE don't set the scriptID.  Otherwise set the scriptID to "set_sid".
  */
     void
-set_string_option_direct(name, opt_idx, val, opt_flags, set_sid)
-    char_u	*name;
-    int		opt_idx;
-    char_u	*val;
-    int		opt_flags;	/* OPT_FREE, OPT_LOCAL and/or OPT_GLOBAL */
-    int		set_sid UNUSED;
+set_string_option_direct(
+    char_u	*name,
+    int		opt_idx,
+    char_u	*val,
+    int		opt_flags,	/* OPT_FREE, OPT_LOCAL and/or OPT_GLOBAL */
+    int		set_sid UNUSED)
 {
     char_u	*s;
     char_u	**varp;
@@ -5738,9 +5717,9 @@ set_string_option_direct(name, opt_idx, 
  * Set global value for string option when it's a local option.
  */
     static void
-set_string_option_global(opt_idx, varp)
-    int		opt_idx;	/* option index */
-    char_u	**varp;		/* pointer to option variable */
+set_string_option_global(
+    int		opt_idx,	/* option index */
+    char_u	**varp)		/* pointer to option variable */
 {
     char_u	**p, *s;
 
@@ -5764,10 +5743,10 @@ set_string_option_global(opt_idx, varp)
  * Returns NULL on success or error message on error.
  */
     static char_u *
-set_string_option(opt_idx, value, opt_flags)
-    int		opt_idx;
-    char_u	*value;
-    int		opt_flags;	/* OPT_LOCAL and/or OPT_GLOBAL */
+set_string_option(
+    int		opt_idx,
+    char_u	*value,
+    int		opt_flags)	/* OPT_LOCAL and/or OPT_GLOBAL */
 {
     char_u	*s;
     char_u	**varp;
@@ -5827,14 +5806,13 @@ set_string_option(opt_idx, value, opt_fl
  * Returns NULL for success, or an error message for an error.
  */
     static char_u *
-did_set_string_option(opt_idx, varp, new_value_alloced, oldval, errbuf,
-								    opt_flags)
-    int		opt_idx;		/* index in options[] table */
-    char_u	**varp;			/* pointer to the option variable */
-    int		new_value_alloced;	/* new value was allocated */
-    char_u	*oldval;		/* previous value of the option */
-    char_u	*errbuf;		/* buffer for errors, or NULL */
-    int		opt_flags;		/* OPT_LOCAL and/or OPT_GLOBAL */
+did_set_string_option(
+    int		opt_idx,		/* index in options[] table */
+    char_u	**varp,			/* pointer to the option variable */
+    int		new_value_alloced,	/* new value was allocated */
+    char_u	*oldval,		/* previous value of the option */
+    char_u	*errbuf,		/* buffer for errors, or NULL */
+    int		opt_flags)		/* OPT_LOCAL and/or OPT_GLOBAL */
 {
     char_u	*errmsg = NULL;
     char_u	*s, *p;
@@ -7375,9 +7353,7 @@ did_set_string_option(opt_idx, varp, new
  * Simple int comparison function for use with qsort()
  */
     static int
-int_cmp(a, b)
-    const void *a;
-    const void *b;
+int_cmp(const void *a, const void *b)
 {
     return *(const int *)a - *(const int *)b;
 }
@@ -7387,8 +7363,7 @@ int_cmp(a, b)
  * Returns error message, NULL if it's OK.
  */
     char_u *
-check_colorcolumn(wp)
-    win_T	*wp;
+check_colorcolumn(win_T *wp)
 {
     char_u	*s;
     int		col;
@@ -7459,8 +7434,7 @@ skip:
  * Returns error message, NULL if it's OK.
  */
     static char_u *
-set_chars_option(varp)
-    char_u	**varp;
+set_chars_option(char_u **varp)
 {
     int		round, i, len, entries;
     char_u	*p, *s;
@@ -7594,8 +7568,7 @@ set_chars_option(varp)
  * Return error message or NULL.
  */
     char_u *
-check_stl_option(s)
-    char_u	*s;
+check_stl_option(char_u *s)
 {
     int		itemcnt = 0;
     int		groupdepth = 0;
@@ -7666,7 +7639,7 @@ check_stl_option(s)
  * Extract the items in the 'clipboard' option and set global values.
  */
     static char_u *
-check_clipboard_option()
+check_clipboard_option(void)
 {
     int		new_unnamed = 0;
     int		new_autoselect_star = FALSE;
@@ -7755,8 +7728,7 @@ check_clipboard_option()
 
 #ifdef FEAT_SPELL
     static char_u *
-did_set_spell_option(is_spellfile)
-    int		is_spellfile;
+did_set_spell_option(int is_spellfile)
 {
     char_u  *errmsg = NULL;
     win_T   *wp;
@@ -7789,8 +7761,7 @@ did_set_spell_option(is_spellfile)
  * Return error message when failed, NULL when OK.
  */
     static char_u *
-compile_cap_prog(synblock)
-    synblock_T *synblock;
+compile_cap_prog(synblock_T *synblock)
 {
     regprog_T   *rp = synblock->b_cap_prog;
     char_u	*re;
@@ -7824,10 +7795,7 @@ compile_cap_prog(synblock)
  * window-local value.
  */
     static void
-set_option_scriptID_idx(opt_idx, opt_flags, id)
-    int	    opt_idx;
-    int	    opt_flags;
-    int	    id;
+set_option_scriptID_idx(int opt_idx, int opt_flags, int id)
 {
     int		both = (opt_flags & (OPT_LOCAL | OPT_GLOBAL)) == 0;
     int		indir = (int)options[opt_idx].indir;
@@ -7851,11 +7819,11 @@ set_option_scriptID_idx(opt_idx, opt_fla
  * Returns NULL for success, or an error message for an error.
  */
     static char_u *
-set_bool_option(opt_idx, varp, value, opt_flags)
-    int		opt_idx;		/* index in options[] table */
-    char_u	*varp;			/* pointer to the option variable */
-    int		value;			/* new value */
-    int		opt_flags;		/* OPT_LOCAL and/or OPT_GLOBAL */
+set_bool_option(
+    int		opt_idx,		/* index in options[] table */
+    char_u	*varp,			/* pointer to the option variable */
+    int		value,			/* new value */
+    int		opt_flags)		/* OPT_LOCAL and/or OPT_GLOBAL */
 {
     int		old_value = *(int *)varp;
 
@@ -8433,13 +8401,13 @@ set_bool_option(opt_idx, varp, value, op
  * Returns NULL for success, or an error message for an error.
  */
     static char_u *
-set_num_option(opt_idx, varp, value, errbuf, errbuflen, opt_flags)
-    int		opt_idx;		/* index in options[] table */
-    char_u	*varp;			/* pointer to the option variable */
-    long	value;			/* new value */
-    char_u	*errbuf;		/* buffer for error messages */
-    size_t	errbuflen;		/* length of "errbuf" */
-    int		opt_flags;		/* OPT_LOCAL, OPT_GLOBAL and
+set_num_option(
+    int		opt_idx,		/* index in options[] table */
+    char_u	*varp,			/* pointer to the option variable */
+    long	value,			/* new value */
+    char_u	*errbuf,		/* buffer for error messages */
+    size_t	errbuflen,		/* length of "errbuf" */
+    int		opt_flags)		/* OPT_LOCAL, OPT_GLOBAL and
 					   OPT_MODELINE */
 {
     char_u	*errmsg = NULL;
@@ -8982,8 +8950,7 @@ set_num_option(opt_idx, varp, value, err
  * Called after an option changed: check if something needs to be redrawn.
  */
     static void
-check_redraw(flags)
-    long_u	flags;
+check_redraw(long_u flags)
 {
     /* Careful: P_RCLR and P_RALL are a combination of other P_ flags */
     int		doclear = (flags & P_RCLR) == P_RCLR;
@@ -9009,8 +8976,7 @@ check_redraw(flags)
  * Return -1 if not found.
  */
     static int
-findoption(arg)
-    char_u *arg;
+findoption(char_u *arg)
 {
     int		    opt_idx;
     char	    *s, *p;
@@ -9086,11 +9052,11 @@ findoption(arg)
  *		   unknown option: -3.
  */
     int
-get_option_value(name, numval, stringval, opt_flags)
-    char_u	*name;
-    long	*numval;
-    char_u	**stringval;	    /* NULL when only checking existence */
-    int		opt_flags;
+get_option_value(
+    char_u	*name,
+    long	*numval,
+    char_u	**stringval,	    /* NULL when only checking existence */
+    int		opt_flags)
 {
     int		opt_idx;
     char_u	*varp;
@@ -9156,12 +9122,12 @@ get_option_value(name, numval, stringval
  * Possible opt_type values: see SREQ_* in vim.h
  */
     int
-get_option_value_strict(name, numval, stringval, opt_type, from)
-    char_u	*name;
-    long	*numval;
-    char_u	**stringval;	    /* NULL when only obtaining attributes */
-    int		opt_type;
-    void	*from;
+get_option_value_strict(
+    char_u	*name,
+    long	*numval,
+    char_u	**stringval,	    /* NULL when only obtaining attributes */
+    int		opt_type,
+    void	*from)
 {
     int		opt_idx;
     char_u	*varp = NULL;
@@ -9287,9 +9253,7 @@ get_option_value_strict(name, numval, st
  * Returns full option name for current option on each call.
  */
     char_u *
-option_iter_next(option, opt_type)
-    void	**option;
-    int		opt_type;
+option_iter_next(void **option, int opt_type)
 {
     struct vimoption	*ret = NULL;
     do
@@ -9345,11 +9309,11 @@ option_iter_next(option, opt_type)
  * Returns NULL on success or error message on error.
  */
     char_u *
-set_option_value(name, number, string, opt_flags)
-    char_u	*name;
-    long	number;
-    char_u	*string;
-    int		opt_flags;	/* OPT_LOCAL or 0 (both) */
+set_option_value(
+    char_u	*name,
+    long	number,
+    char_u	*string,
+    int		opt_flags)	/* OPT_LOCAL or 0 (both) */
 {
     int		opt_idx;
     char_u	*varp;
@@ -9412,8 +9376,7 @@ set_option_value(name, number, string, o
  * Returns NULL when not found.
  */
     char_u *
-get_term_code(tname)
-    char_u	*tname;
+get_term_code(char_u *tname)
 {
     int	    opt_idx;
     char_u  *varp;
@@ -9432,7 +9395,7 @@ get_term_code(tname)
 }
 
     char_u *
-get_highlight_default()
+get_highlight_default(void)
 {
     int i;
 
@@ -9444,7 +9407,7 @@ get_highlight_default()
 
 #if defined(FEAT_MBYTE) || defined(PROTO)
     char_u *
-get_encoding_default()
+get_encoding_default(void)
 {
     int i;
 
@@ -9459,8 +9422,7 @@ get_encoding_default()
  * Translate a string like "t_xx", "<t_xx>" or "<S-Tab>" to a key number.
  */
     static int
-find_key_option(arg)
-    char_u *arg;
+find_key_option(char_u *arg)
 {
     int		key;
     int		modifiers;
@@ -9488,9 +9450,9 @@ find_key_option(arg)
  * if 'all' == 2: show all terminal options
  */
     static void
-showoptions(all, opt_flags)
-    int		all;
-    int		opt_flags;	/* OPT_LOCAL and/or OPT_GLOBAL */
+showoptions(
+    int		all,
+    int		opt_flags)	/* OPT_LOCAL and/or OPT_GLOBAL */
 {
     struct vimoption	*p;
     int			col;
@@ -9597,9 +9559,7 @@ showoptions(all, opt_flags)
  * Return TRUE if option "p" has its default value.
  */
     static int
-optval_default(p, varp)
-    struct vimoption	*p;
-    char_u		*varp;
+optval_default(struct vimoption *p, char_u *varp)
 {
     int		dvi;
 
@@ -9621,9 +9581,9 @@ optval_default(p, varp)
  * must not be called with a hidden option!
  */
     static void
-showoneopt(p, opt_flags)
-    struct vimoption	*p;
-    int			opt_flags;	/* OPT_LOCAL or OPT_GLOBAL */
+showoneopt(
+    struct vimoption	*p,
+    int			opt_flags)	/* OPT_LOCAL or OPT_GLOBAL */
 {
     char_u	*varp;
     int		save_silent = silent_mode;
@@ -9677,10 +9637,7 @@ showoneopt(p, opt_flags)
  * Return FAIL on error, OK otherwise.
  */
     int
-makeset(fd, opt_flags, local_only)
-    FILE	*fd;
-    int		opt_flags;
-    int		local_only;
+makeset(FILE *fd, int opt_flags, int local_only)
 {
     struct vimoption	*p;
     char_u		*varp;			/* currently used value */
@@ -9808,8 +9765,7 @@ makeset(fd, opt_flags, local_only)
  * 'sessionoptions' or 'viewoptions' contains "folds" but not "options".
  */
     int
-makefoldset(fd)
-    FILE	*fd;
+makefoldset(FILE *fd)
 {
     if (put_setstring(fd, "setlocal", "fdm", &curwin->w_p_fdm, FALSE) == FAIL
 # ifdef FEAT_EVAL
@@ -9832,12 +9788,12 @@ makefoldset(fd)
 #endif
 
     static int
-put_setstring(fd, cmd, name, valuep, expand)
-    FILE	*fd;
-    char	*cmd;
-    char	*name;
-    char_u	**valuep;
-    int		expand;
+put_setstring(
+    FILE	*fd,
+    char	*cmd,
+    char	*name,
+    char_u	**valuep,
+    int		expand)
 {
     char_u	*s;
     char_u	*buf;
@@ -9878,11 +9834,11 @@ put_setstring(fd, cmd, name, valuep, exp
 }
 
     static int
-put_setnum(fd, cmd, name, valuep)
-    FILE	*fd;
-    char	*cmd;
-    char	*name;
-    long	*valuep;
+put_setnum(
+    FILE	*fd,
+    char	*cmd,
+    char	*name,
+    long	*valuep)
 {
     long	wc;
 
@@ -9902,11 +9858,11 @@ put_setnum(fd, cmd, name, valuep)
 }
 
     static int
-put_setbool(fd, cmd, name, value)
-    FILE	*fd;
-    char	*cmd;
-    char	*name;
-    int		value;
+put_setbool(
+    FILE	*fd,
+    char	*cmd,
+    char	*name,
+    int		value)
 {
     if (value < 0)	/* global/local option using global value */
 	return OK;
@@ -9922,7 +9878,7 @@ put_setbool(fd, cmd, name, value)
  * Terminal options are never hidden or indirect.
  */
     void
-clear_termoptions()
+clear_termoptions(void)
 {
     /*
      * Reset a few things before clearing the old options. This may cause
@@ -9953,7 +9909,7 @@ clear_termoptions()
 }
 
     void
-free_termoptions()
+free_termoptions(void)
 {
     struct vimoption   *p;
 
@@ -9977,8 +9933,7 @@ free_termoptions()
  * "var" points to the option value.
  */
     void
-free_one_termoption(var)
-    char_u *var;
+free_one_termoption(char_u *var)
 {
     struct vimoption   *p;
 
@@ -9998,7 +9953,7 @@ free_one_termoption(var)
  * Used after setting the terminal name.
  */
     void
-set_term_defaults()
+set_term_defaults(void)
 {
     struct vimoption   *p;
 
@@ -10025,8 +9980,7 @@ set_term_defaults()
  * return TRUE if 'p' starts with 't_'
  */
     static int
-istermoption(p)
-    struct vimoption *p;
+istermoption(struct vimoption *p)
 {
     return (p->fullname[0] == 't' && p->fullname[1] == '_');
 }
@@ -10041,7 +9995,7 @@ istermoption(p)
 #define COL_RULER 17	    /* columns needed by standard ruler */
 
     void
-comp_col()
+comp_col(void)
 {
 #if defined(FEAT_CMDL_INFO) && defined(FEAT_WINDOWS)
     int last_has_status = (p_ls == 2 || (p_ls == 1 && firstwin != lastwin));
@@ -10081,9 +10035,7 @@ comp_col()
  * Unset local option value, similar to ":set opt<".
  */
     void
-unset_global_local_option(name, from)
-    char_u	*name;
-    void	*from;
+unset_global_local_option(char_u *name, void *from)
 {
     struct vimoption *p;
     int		opt_idx;
@@ -10177,9 +10129,7 @@ unset_global_local_option(name, from)
  * Get pointer to option variable, depending on local or global scope.
  */
     static char_u *
-get_varp_scope(p, opt_flags)
-    struct vimoption	*p;
-    int			opt_flags;
+get_varp_scope(struct vimoption *p, int opt_flags)
 {
     if ((opt_flags & OPT_GLOBAL) && p->indir != PV_NONE)
     {
@@ -10234,8 +10184,7 @@ get_varp_scope(p, opt_flags)
  * Get pointer to option variable.
  */
     static char_u *
-get_varp(p)
-    struct vimoption	*p;
+get_varp(struct vimoption *p)
 {
     /* hidden option, always return NULL */
     if (p->var == NULL)
@@ -10481,7 +10430,7 @@ get_varp(p)
  * Get the value of 'equalprg', either the buffer-local one or the global one.
  */
     char_u *
-get_equalprg()
+get_equalprg(void)
 {
     if (*curbuf->b_p_ep == NUL)
 	return p_ep;
@@ -10494,9 +10443,7 @@ get_equalprg()
  * Used when splitting a window.
  */
     void
-win_copy_options(wp_from, wp_to)
-    win_T	*wp_from;
-    win_T	*wp_to;
+win_copy_options(win_T *wp_from, win_T *wp_to)
 {
     copy_winopt(&wp_from->w_onebuf_opt, &wp_to->w_onebuf_opt);
     copy_winopt(&wp_from->w_allbuf_opt, &wp_to->w_allbuf_opt);
@@ -10519,9 +10466,7 @@ win_copy_options(wp_from, wp_to)
  * The 'previewwindow' option is reset, there can be only one preview window.
  */
     void
-copy_winopt(from, to)
-    winopt_T	*from;
-    winopt_T	*to;
+copy_winopt(winopt_T *from, winopt_T *to)
 {
 #ifdef FEAT_ARABIC
     to->wo_arab = from->wo_arab;
@@ -10598,8 +10543,7 @@ copy_winopt(from, to)
  * Check string options in a window for a NULL value.
  */
     void
-check_win_options(win)
-    win_T	*win;
+check_win_options(win_T *win)
 {
     check_winopt(&win->w_onebuf_opt);
     check_winopt(&win->w_allbuf_opt);
@@ -10609,8 +10553,7 @@ check_win_options(win)
  * Check for NULL pointers in a winopt_T and replace them with empty_option.
  */
     static void
-check_winopt(wop)
-    winopt_T	*wop UNUSED;
+check_winopt(winopt_T *wop UNUSED)
 {
 #ifdef FEAT_FOLDING
     check_string_option(&wop->wo_fdi);
@@ -10643,8 +10586,7 @@ check_winopt(wop)
  * Free the allocated memory inside a winopt_T.
  */
     void
-clear_winopt(wop)
-    winopt_T	*wop UNUSED;
+clear_winopt(winopt_T *wop UNUSED)
 {
 #ifdef FEAT_FOLDING
     clear_string_option(&wop->wo_fdi);
@@ -10683,9 +10625,7 @@ clear_winopt(wop)
  * BCO_NOHELP	Don't copy the values to a help buffer.
  */
     void
-buf_copy_options(buf, flags)
-    buf_T	*buf;
-    int		flags;
+buf_copy_options(buf_T *buf, int flags)
 {
     int		should_copy = TRUE;
     char_u	*save_p_isk = NULL;	    /* init for GCC */
@@ -10935,7 +10875,7 @@ buf_copy_options(buf, flags)
  * Reset the 'modifiable' option and its default value.
  */
     void
-reset_modifiable()
+reset_modifiable(void)
 {
     int		opt_idx;
 
@@ -10950,7 +10890,7 @@ reset_modifiable()
  * Set the global value for 'iminsert' to the local value.
  */
     void
-set_iminsert_global()
+set_iminsert_global(void)
 {
     p_iminsert = curbuf->b_p_iminsert;
 }
@@ -10959,7 +10899,7 @@ set_iminsert_global()
  * Set the global value for 'imsearch' to the local value.
  */
     void
-set_imsearch_global()
+set_imsearch_global(void)
 {
     p_imsearch = curbuf->b_p_imsearch;
 }
@@ -10970,10 +10910,10 @@ static char_u expand_option_name[5] = {'
 static int expand_option_flags = 0;
 
     void
-set_context_in_set_cmd(xp, arg, opt_flags)
-    expand_T	*xp;
-    char_u	*arg;
-    int		opt_flags;	/* OPT_GLOBAL and/or OPT_LOCAL */
+set_context_in_set_cmd(
+    expand_T	*xp,
+    char_u	*arg,
+    int		opt_flags)	/* OPT_GLOBAL and/or OPT_LOCAL */
 {
     int		nextchar;
     long_u	flags = 0;	/* init for GCC */
@@ -11176,11 +11116,11 @@ set_context_in_set_cmd(xp, arg, opt_flag
 }
 
     int
-ExpandSettings(xp, regmatch, num_file, file)
-    expand_T	*xp;
-    regmatch_T	*regmatch;
-    int		*num_file;
-    char_u	***file;
+ExpandSettings(
+    expand_T	*xp,
+    regmatch_T	*regmatch,
+    int		*num_file,
+    char_u	***file)
 {
     int		num_normal = 0;	    /* Nr of matching non-term-code settings */
     int		num_term = 0;	    /* Nr of matching terminal code settings */
@@ -11338,9 +11278,7 @@ ExpandSettings(xp, regmatch, num_file, f
 }
 
     int
-ExpandOldSetting(num_file, file)
-    int	    *num_file;
-    char_u  ***file;
+ExpandOldSetting(int *num_file, char_u ***file)
 {
     char_u  *var = NULL;	/* init for GCC */
     char_u  *buf;
@@ -11403,9 +11341,9 @@ ExpandOldSetting(num_file, file)
  * NameBuff[].  Must not be called with a hidden option!
  */
     static void
-option_value2string(opp, opt_flags)
-    struct vimoption	*opp;
-    int			opt_flags;	/* OPT_GLOBAL and/or OPT_LOCAL */
+option_value2string(
+    struct vimoption	*opp,
+    int			opt_flags)	/* OPT_GLOBAL and/or OPT_LOCAL */
 {
     char_u	*varp;
 
@@ -11448,9 +11386,7 @@ option_value2string(opp, opt_flags)
  * "*wcp" is set to the value of the option if it's 'wildchar' or 'wildcharm'.
  */
     static int
-wc_use_keyname(varp, wcp)
-    char_u	*varp;
-    long	*wcp;
+wc_use_keyname(char_u *varp, long *wcp)
 {
     if (((long *)varp == &p_wc) || ((long *)varp == &p_wcm))
     {
@@ -11493,9 +11429,7 @@ static void langmap_set_entry(int from, 
  * field.  If not found insert a new entry at the appropriate location.
  */
     static void
-langmap_set_entry(from, to)
-    int    from;
-    int    to;
+langmap_set_entry(int from, int to)
 {
     langmap_entry_T *entries = (langmap_entry_T *)(langmap_mapga.ga_data);
     int		    a = 0;
@@ -11534,8 +11468,7 @@ langmap_set_entry(from, to)
  * Apply 'langmap' to multi-byte character "c" and return the result.
  */
     int
-langmap_adjust_mb(c)
-    int c;
+langmap_adjust_mb(int c)
 {
     langmap_entry_T *entries = (langmap_entry_T *)(langmap_mapga.ga_data);
     int a = 0;
@@ -11558,7 +11491,7 @@ langmap_adjust_mb(c)
 # endif
 
     static void
-langmap_init()
+langmap_init(void)
 {
     int i;
 
@@ -11574,7 +11507,7 @@ langmap_init()
  * changed at any time!
  */
     static void
-langmap_set()
+langmap_set(void)
 {
     char_u  *p;
     char_u  *p2;
@@ -11683,8 +11616,7 @@ langmap_set()
  * Take care of no formatting when 'paste' is set.
  */
     int
-has_format_option(x)
-    int		x;
+has_format_option(int x)
 {
     if (p_paste)
 	return FALSE;
@@ -11696,8 +11628,7 @@ has_format_option(x)
  * 'shortmess' contains 'a' and "x" is present in SHM_A.
  */
     int
-shortmess(x)
-    int	    x;
+shortmess(int x)
 {
     return p_shm != NULL &&
 	    (   vim_strchr(p_shm, x) != NULL
@@ -11709,7 +11640,7 @@ shortmess(x)
  * paste_option_changed() - Called after p_paste was set or reset.
  */
     static void
-paste_option_changed()
+paste_option_changed(void)
 {
     static int	old_p_paste = FALSE;
     static int	save_sm = 0;
@@ -11843,9 +11774,7 @@ paste_option_changed()
  * When "fname" is not NULL, use it to set $"envname" when it wasn't set yet.
  */
     void
-vimrc_found(fname, envname)
-    char_u	*fname;
-    char_u	*envname;
+vimrc_found(char_u *fname, char_u *envname)
 {
     int		opt_idx;
     int		dofree = FALSE;
@@ -11883,8 +11812,7 @@ vimrc_found(fname, envname)
  * Set 'compatible' on or off.  Called for "-C" and "-N" command line arg.
  */
     void
-change_compatible(on)
-    int	    on;
+change_compatible(int on)
 {
     int	    opt_idx;
 
@@ -11903,8 +11831,7 @@ change_compatible(on)
  * Only works correctly for global options.
  */
     int
-option_was_set(name)
-    char_u	*name;
+option_was_set(char_u *name)
 {
     int idx;
 
@@ -11920,8 +11847,7 @@ option_was_set(name)
  * Reset the flag indicating option "name" was set.
  */
     void
-reset_option_was_set(name)
-    char_u	*name;
+reset_option_was_set(char_u *name)
 {
     int idx = findoption(name);
 
@@ -11938,7 +11864,7 @@ reset_option_was_set(name)
  * for Vim (without the P_VI_DEF flag) to that default.
  */
     static void
-compatible_set()
+compatible_set(void)
 {
     int	    opt_idx;
 
@@ -11961,7 +11887,7 @@ compatible_set()
  * fill_breakat_flags() -- called when 'breakat' changes value.
  */
     static void
-fill_breakat_flags()
+fill_breakat_flags(void)
 {
     char_u	*p;
     int		i;
@@ -11987,10 +11913,10 @@ fill_breakat_flags()
  * Empty is always OK.
  */
     static int
-check_opt_strings(val, values, list)
-    char_u	*val;
-    char	**values;
-    int		list;	    /* when TRUE: accept a list of values */
+check_opt_strings(
+    char_u	*val,
+    char	**values,
+    int		list)	    /* when TRUE: accept a list of values */
 {
     return opt_strings_flags(val, values, NULL, list);
 }
@@ -12003,11 +11929,11 @@ check_opt_strings(val, values, list)
  * Empty is always OK.
  */
     static int
-opt_strings_flags(val, values, flagp, list)
-    char_u	*val;		/* new value */
-    char	**values;	/* array of valid string values */
-    unsigned	*flagp;
-    int		list;		/* when TRUE: accept a list of values */
+opt_strings_flags(
+    char_u	*val,		/* new value */
+    char	**values,	/* array of valid string values */
+    unsigned	*flagp,
+    int		list)		/* when TRUE: accept a list of values */
 {
     int		i;
     int		len;
@@ -12040,7 +11966,7 @@ opt_strings_flags(val, values, flagp, li
  * Read the 'wildmode' option, fill wim_flags[].
  */
     static int
-check_opt_wim()
+check_opt_wim(void)
 {
     char_u	new_wim_flags[4];
     char_u	*p;
@@ -12092,8 +12018,8 @@ check_opt_wim()
  * Check if backspacing over something is allowed.
  */
     int
-can_bs(what)
-    int		what;	    /* BS_INDENT, BS_EOL or BS_START */
+can_bs(
+    int		what)	    /* BS_INDENT, BS_EOL or BS_START */
 {
     switch (*p_bs)
     {
@@ -12109,8 +12035,7 @@ can_bs(what)
  * the file must be considered changed when the value is different.
  */
     void
-save_file_ff(buf)
-    buf_T	*buf;
+save_file_ff(buf_T *buf)
 {
     buf->b_start_ffc = *buf->b_p_ff;
     buf->b_start_eol = buf->b_p_eol;
@@ -12137,9 +12062,7 @@ save_file_ff(buf)
  * changed.
  */
     int
-file_ff_differs(buf, ignore_empty)
-    buf_T	*buf;
-    int		ignore_empty;
+file_ff_differs(buf_T *buf, int ignore_empty)
 {
     /* In a buffer that was never loaded the options are not valid. */
     if (buf->b_flags & BF_NEVERLOADED)
@@ -12168,8 +12091,7 @@ file_ff_differs(buf, ignore_empty)
  * return OK if "p" is a valid fileformat name, FAIL otherwise.
  */
     int
-check_ff_value(p)
-    char_u	*p;
+check_ff_value(char_u *p)
 {
     return check_opt_strings(p, p_ff_values, FALSE);
 }
@@ -12179,8 +12101,7 @@ check_ff_value(p)
  * 'tabstop' value when 'shiftwidth' is zero.
  */
     long
-get_sw_value(buf)
-    buf_T *buf;
+get_sw_value(buf_T *buf)
 {
     return buf->b_p_sw ? buf->b_p_sw : buf->b_p_ts;
 }
@@ -12190,7 +12111,7 @@ get_sw_value(buf)
  * 'tabstop' value when 'softtabstop' is negative.
  */
     long
-get_sts_value()
+get_sts_value(void)
 {
     return curbuf->b_p_sts < 0 ? get_sw_value(curbuf) : curbuf->b_p_sts;
 }
@@ -12202,11 +12123,11 @@ get_sts_value()
  * When "switchit" is TRUE swap the direction.
  */
     void
-find_mps_values(initc, findc, backwards, switchit)
-    int	    *initc;
-    int	    *findc;
-    int	    *backwards;
-    int	    switchit;
+find_mps_values(
+    int	    *initc,
+    int	    *findc,
+    int	    *backwards,
+    int	    switchit)
 {
     char_u	*ptr;
 
@@ -12299,8 +12220,7 @@ find_mps_values(initc, findc, backwards,
  * initialized.
  */
     static int
-briopt_check(wp)
-    win_T *wp;
+briopt_check(win_T *wp)
 {
     char_u	*p;
     int		bri_shift = 0;
@@ -12344,8 +12264,7 @@ briopt_check(wp)
  * Get the local or global value of 'backupcopy'.
  */
     unsigned int
-get_bkc_value(buf)
-    buf_T *buf;
+get_bkc_value(buf_T *buf)
 {
     return buf->b_bkc_flags ? buf->b_bkc_flags : bkc_flags;
 }
--- a/src/version.c
+++ b/src/version.c
@@ -747,6 +747,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1211,
+/**/
     1210,
 /**/
     1209,