diff src/misc1.c @ 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 37c929c4a073
children b6cb94ad97a4
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;