changeset 7833:c079097365f3 v7.4.1213

commit https://github.com/vim/vim/commit/055409764ca5f7978d4c399d2c440af0ce971c4f Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jan 30 20:31:25 2016 +0100 patch 7.4.1213 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 20:45:04 +0100
parents f1ac913b8ff3
children 2d1dc9ec41ce
files src/os_amiga.c src/os_mac_conv.c src/os_mswin.c src/os_qnx.c src/os_unix.c src/os_vms.c src/os_win16.c src/os_win32.c src/popupmnu.c src/pty.c src/quickfix.c src/regexp.c src/regexp_nfa.c src/screen.c src/version.c
diffstat 15 files changed, 912 insertions(+), 1364 deletions(-) [+]
line wrap: on
line diff
--- a/src/os_amiga.c
+++ b/src/os_amiga.c
@@ -98,21 +98,19 @@ int			dos2 = FALSE;	    /* Amiga DOS 2.0
 int			size_set = FALSE;   /* set to TRUE if window size was set */
 
     void
-win_resize_on()
+win_resize_on(void)
 {
     OUT_STR_NF("\033[12{");
 }
 
     void
-win_resize_off()
+win_resize_off(void)
 {
     OUT_STR_NF("\033[12}");
 }
 
     void
-mch_write(p, len)
-    char_u	*p;
-    int		len;
+mch_write(char_u *p, int len)
 {
     Write(raw_out, (char *)p, (long)len);
 }
@@ -127,11 +125,11 @@ mch_write(p, len)
  * Return number of characters read.
  */
     int
-mch_inchar(buf, maxlen, time, tb_change_cnt)
-    char_u  *buf;
-    int	    maxlen;
-    long    time;		/* milli seconds */
-    int	    tb_change_cnt;
+mch_inchar(
+    char_u  *buf,
+    int	    maxlen,
+    long    time,		/* milli seconds */
+    int	    tb_change_cnt)
 {
     int	    len;
     long    utime;
@@ -190,7 +188,7 @@ mch_inchar(buf, maxlen, time, tb_change_
  * return non-zero if a character is available
  */
     int
-mch_char_avail()
+mch_char_avail(void)
 {
     return (WaitForChar(raw_in, 100L) != 0);
 }
@@ -199,8 +197,7 @@ mch_char_avail()
  * Return amount of memory still available in Kbyte.
  */
     long_u
-mch_avail_mem(special)
-    int	    special;
+mch_avail_mem(int special)
 {
 #ifdef __amigaos4__
     return (long_u)AvailMem(MEMF_ANY) >> 10;
@@ -214,9 +211,7 @@ mch_avail_mem(special)
  * ignoreinput is FALSE.
  */
     void
-mch_delay(msec, ignoreinput)
-    long    msec;
-    int	    ignoreinput;
+mch_delay(long msec, int ignoreinput)
 {
 #ifndef LATTICE		/* SAS declares void Delay(ULONG) */
     void	    Delay(long);
@@ -235,7 +230,7 @@ mch_delay(msec, ignoreinput)
  * We have no job control, fake it by starting a new shell.
  */
     void
-mch_suspend()
+mch_suspend(void)
 {
     suspend_shell();
 }
@@ -245,7 +240,7 @@ mch_suspend()
 #endif
 
     void
-mch_init()
+mch_init(void)
 {
     static char	    intlibname[] = "intuition.library";
 
@@ -306,9 +301,7 @@ mch_init()
 #define BUF2SIZE 320	    /* length of buffer for argument with complete path */
 
     int
-mch_check_win(argc, argv)
-    int argc;
-    char **argv;
+mch_check_win(int argc, char **argv)
 {
     int		    i;
     BPTR	    nilfh, fh;
@@ -545,7 +538,7 @@ exit:
  * We fake there is a window, because we can always open one!
  */
     int
-mch_input_isatty()
+mch_input_isatty(void)
 {
     return TRUE;
 }
@@ -557,9 +550,9 @@ mch_input_isatty()
  */
 /*ARGSUSED*/
     void
-fname_case(name, len)
-    char_u	*name;
-    int		len;		/* buffer size, ignored here */
+fname_case(
+    char_u	*name,
+    int		len)		/* buffer size, ignored here */
 {
     struct FileInfoBlock    *fib;
     size_t		    flen;
@@ -585,8 +578,7 @@ fname_case(name, len)
  * Returns NULL on error.
  */
     static struct FileInfoBlock *
-get_fib(fname)
-    char_u *fname;
+get_fib(char_u *fname)
 {
     BPTR		    flock;
     struct FileInfoBlock    *fib;
@@ -618,9 +610,7 @@ get_fib(fname)
  * icon name is not set
  */
     void
-mch_settitle(title, icon)
-    char_u  *title;
-    char_u  *icon;
+mch_settitle(char_u *title, char_u *icon)
 {
     if (wb_window != NULL && title != NULL)
 	SetWindowTitles(wb_window, (UBYTE *)title, (UBYTE *)-1L);
@@ -634,21 +624,20 @@ mch_settitle(title, icon)
  *  3  Restore title and icon (which we don't have)
  */
     void
-mch_restore_title(which)
-    int which;
+mch_restore_title(int which)
 {
     if (which & 1)
 	mch_settitle(oldwindowtitle, NULL);
 }
 
     int
-mch_can_restore_title()
+mch_can_restore_title(void)
 {
     return (wb_window != NULL);
 }
 
     int
-mch_can_restore_icon()
+mch_can_restore_icon(void)
 {
     return FALSE;
 }
@@ -658,9 +647,7 @@ mch_can_restore_icon()
  * Insert user name in s[len].
  */
     int
-mch_get_user_name(s, len)
-    char_u  *s;
-    int	    len;
+mch_get_user_name(char_u *s, int len)
 {
     /* TODO: Implement this. */
     *s = NUL;
@@ -671,9 +658,7 @@ mch_get_user_name(s, len)
  * Insert host name is s[len].
  */
     void
-mch_get_host_name(s, len)
-    char_u  *s;
-    int	    len;
+mch_get_host_name(char_u *s, int len)
 {
 #if defined(__amigaos4__) && defined(__CLIB2__)
     gethostname(s, len);
@@ -686,7 +671,7 @@ mch_get_host_name(s, len)
  * return process ID
  */
     long
-mch_get_pid()
+mch_get_pid(void)
 {
 #ifdef __amigaos4__
     /* This is as close to a pid as we can come. We could use CLI numbers also,
@@ -703,9 +688,7 @@ mch_get_pid()
  * Return OK for success, FAIL for failure.
  */
     int
-mch_dirname(buf, len)
-    char_u	*buf;
-    int		len;
+mch_dirname(char_u *buf, int len)
 {
     return mch_FullName((char_u *)"", buf, len, FALSE);
 }
@@ -716,10 +699,11 @@ mch_dirname(buf, len)
  * return FAIL for failure, OK otherwise
  */
     int
-mch_FullName(fname, buf, len, force)
-    char_u	*fname, *buf;
-    int		len;
-    int		force;
+mch_FullName(
+    char_u	*fname,
+    char_u	*buf,
+    int		len,
+    int		force)
 {
     BPTR	l;
     int		retval = FAIL;
@@ -764,8 +748,7 @@ mch_FullName(fname, buf, len, force)
  * Return TRUE if "fname" does not depend on the current directory.
  */
     int
-mch_isFullName(fname)
-    char_u	*fname;
+mch_isFullName(char_u *fname)
 {
     return (vim_strchr(fname, ':') != NULL && *fname != ':');
 }
@@ -777,10 +760,7 @@ mch_isFullName(fname)
  * return FAIL for failure, OK otherwise
  */
     static int
-lock2name(lock, buf, len)
-    BPTR    lock;
-    char_u  *buf;
-    long    len;
+lock2name(BPTR lock, char_u *buf, long len)
 {
 #ifdef FEAT_ARP
     if (dos2)		    /* use 2.0 function */
@@ -797,8 +777,7 @@ lock2name(lock, buf, len)
  * Returns -1 when it doesn't exist.
  */
     long
-mch_getperm(name)
-    char_u	*name;
+mch_getperm(char_u *name)
 {
     struct FileInfoBlock    *fib;
     long		    retval = -1;
@@ -818,9 +797,7 @@ mch_getperm(name)
  * return FAIL for failure, OK otherwise
  */
     int
-mch_setperm(name, perm)
-    char_u	*name;
-    long	perm;
+mch_setperm(char_u *name, long perm)
 {
     perm &= ~FIBF_ARCHIVE;		/* reset archived bit */
     return (SetProtection((UBYTE *)name, (long)perm) ? OK : FAIL);
@@ -830,8 +807,7 @@ mch_setperm(name, perm)
  * Set hidden flag for "name".
  */
     void
-mch_hide(name)
-    char_u	*name;
+mch_hide(char_u *name)
 {
     /* can't hide a file */
 }
@@ -842,8 +818,7 @@ mch_hide(name)
  * return FALSE for error.
  */
     int
-mch_isdir(name)
-    char_u	*name;
+mch_isdir(char_u *name)
 {
     struct FileInfoBlock    *fib;
     int			    retval = FALSE;
@@ -865,8 +840,7 @@ mch_isdir(name)
  * Create directory "name".
  */
     int
-mch_mkdir(name)
-    char_u	*name;
+mch_mkdir(char_u *name)
 {
     BPTR	lock;
 
@@ -885,10 +859,7 @@ mch_mkdir(name)
  * Return -1 if unknown.
  */
     int
-mch_can_exe(name, path, use_path)
-    char_u	*name;
-    char_u	**path;
-    int		use_path;
+mch_can_exe(char_u *name, char_u **path, int use_path)
 {
     /* TODO */
     return -1;
@@ -901,15 +872,14 @@ mch_can_exe(name, path, use_path)
  * NODE_OTHER: non-writable things
  */
     int
-mch_nodetype(name)
-    char_u	*name;
+mch_nodetype(char_u *name)
 {
     /* TODO */
     return NODE_NORMAL;
 }
 
     void
-mch_early_init()
+mch_early_init(void)
 {
 }
 
@@ -917,8 +887,7 @@ mch_early_init()
  * Careful: mch_exit() may be called before mch_init()!
  */
     void
-mch_exit(r)
-    int		    r;
+mch_exit(int r)
 {
     if (raw_in)			    /* put terminal in 'normal' mode */
     {
@@ -977,8 +946,7 @@ mch_exit(r)
  *	it sends a 0 to the console to make it back into a CON: from a RAW:
  */
     void
-mch_settmode(tmode)
-    int		tmode;
+mch_settmode(int tmode)
 {
 #if defined(__AROS__) || defined(__amigaos4__)
     if (!SetMode(raw_in, tmode == TMODE_RAW ? 1 : 0))
@@ -993,8 +961,7 @@ mch_settmode(tmode)
  * set screen mode, always fails.
  */
     int
-mch_screenmode(arg)
-    char_u	*arg;
+mch_screenmode(char_u *arg)
 {
     EMSG(_(e_screenmode));
     return FAIL;
@@ -1021,7 +988,7 @@ mch_screenmode(arg)
  * return FAIL for failure, OK otherwise
  */
     int
-mch_get_shellsize()
+mch_get_shellsize(void)
 {
     struct ConUnit  *conUnit;
 #ifndef __amigaos4__
@@ -1095,7 +1062,7 @@ out:
  * Try to set the real window size to Rows and Columns.
  */
     void
-mch_set_shellsize()
+mch_set_shellsize(void)
 {
     if (term_console)
     {
@@ -1114,7 +1081,7 @@ mch_set_shellsize()
  * Rows and/or Columns has changed.
  */
     void
-mch_new_shellsize()
+mch_new_shellsize(void)
 {
     /* Nothing to do. */
 }
@@ -1123,8 +1090,7 @@ mch_new_shellsize()
  * out_num - output a (big) number fast
  */
     static void
-out_num(n)
-    long	n;
+out_num(long n)
 {
     OUT_STR_NF(tltoa((unsigned long)n));
 }
@@ -1154,10 +1120,10 @@ out_num(n)
  */
 
     static long
-dos_packet(pid, action, arg)
-    struct MsgPort *pid;    /* process identifier ... (handlers message port) */
+dos_packet(
+    struct MsgPort *pid,    /* process identifier ... (handlers message port) */
     long	    action, /* packet type ... (what you want handler to do)   */
-		    arg;    /* single argument */
+		    arg)    /* single argument */
 {
 # ifdef FEAT_ARP
     struct MsgPort	    *replyport;
@@ -1206,9 +1172,9 @@ dos_packet(pid, action, arg)
  * Return error number for failure, 0 otherwise
  */
     int
-mch_call_shell(cmd, options)
-    char_u	*cmd;
-    int		options;	/* SHELL_*, see vim.h */
+mch_call_shell(
+    char_u	*cmd,
+    int		options)	/* SHELL_*, see vim.h */
 {
     BPTR	mydir;
     int		x;
@@ -1415,7 +1381,7 @@ mch_call_shell(cmd, options)
  * trouble with lattice-c programs.
  */
     void
-mch_breakcheck()
+mch_breakcheck(void)
 {
    if (SetSignal(0L, (long)(SIGBREAKF_CTRL_C|SIGBREAKF_CTRL_D|SIGBREAKF_CTRL_E|SIGBREAKF_CTRL_F)) & SIGBREAKF_CTRL_C)
 	got_int = TRUE;
@@ -1464,10 +1430,10 @@ Chk_Abort(void)
 #endif
 
     int
-mch_expandpath(gap, pat, flags)
-    garray_T	*gap;
-    char_u	*pat;
-    int		flags;		/* EW_* flags */
+mch_expandpath(
+    garray_T	*gap,
+    char_u	*pat,
+    int		flags)		/* EW_* flags */
 {
     struct AnchorPath	*Anchor;
     LONG		Result;
@@ -1585,8 +1551,7 @@ Return:
 }
 
     static int
-sortcmp(a, b)
-    const void *a, *b;
+sortcmp(const void *a, const void *b)
 {
     char *s = *(char **)a;
     char *t = *(char **)b;
@@ -1598,8 +1563,7 @@ sortcmp(a, b)
  * Return TRUE if "p" has wildcards that can be expanded by mch_expandpath().
  */
     int
-mch_has_exp_wildcard(p)
-    char_u *p;
+mch_has_exp_wildcard(char_u *p)
 {
     for ( ; *p; mb_ptr_adv(p))
     {
@@ -1612,8 +1576,7 @@ mch_has_exp_wildcard(p)
 }
 
     int
-mch_has_wildcard(p)
-    char_u *p;
+mch_has_wildcard(char_u *p)
 {
     for ( ; *p; mb_ptr_adv(p))
     {
@@ -1641,8 +1604,7 @@ mch_has_wildcard(p)
  * - A small one to hold the return value.  It is kept until the next call.
  */
     char_u *
-mch_getenv(var)
-    char_u *var;
+mch_getenv(char_u *var)
 {
     int		    len;
     UBYTE	    *buf;		/* buffer to expand in */
@@ -1685,10 +1647,7 @@ mch_getenv(var)
  */
 /* ARGSUSED */
     int
-mch_setenv(var, value, x)
-    char *var;
-    char *value;
-    int	 x;
+mch_setenv(char *var, char *value, int x)
 {
 #ifdef FEAT_ARP
     if (!dos2)
--- a/src/os_mac_conv.c
+++ b/src/os_mac_conv.c
@@ -44,14 +44,14 @@ static TECObjectRef gUTF16ToUTF8Converte
  * A Mac version of string_convert_ext() for special cases.
  */
     char_u *
-mac_string_convert(ptr, len, lenp, fail_on_error, from_enc, to_enc, unconvlenp)
-    char_u		*ptr;
-    int			len;
-    int			*lenp;
-    int			fail_on_error;
-    int			from_enc;
-    int			to_enc;
-    int			*unconvlenp;
+mac_string_convert(
+    char_u		*ptr,
+    int			len,
+    int			*lenp,
+    int			fail_on_error,
+    int			from_enc,
+    int			to_enc,
+    int			*unconvlenp)
 {
     char_u		*retval, *d;
     CFStringRef		cfstr;
@@ -180,10 +180,10 @@ mac_string_convert(ptr, len, lenp, fail_
  * Returns OK or FAIL.
  */
     int
-macroman2enc(ptr, sizep, real_size)
-    char_u	*ptr;
-    long	*sizep;
-    long	real_size;
+macroman2enc(
+    char_u	*ptr,
+    long	*sizep,
+    long	real_size)
 {
     CFStringRef		cfstr;
     CFRange		r;
@@ -226,14 +226,14 @@ macroman2enc(ptr, sizep, real_size)
  * Returns OK or FAIL.
  */
     int
-enc2macroman(from, fromlen, to, tolenp, maxtolen, rest, restlenp)
-    char_u	*from;
-    size_t	fromlen;
-    char_u	*to;
-    int		*tolenp;
-    int		maxtolen;
-    char_u	*rest;
-    int		*restlenp;
+enc2macroman(
+    char_u	*from,
+    size_t	fromlen,
+    char_u	*to,
+    int		*tolenp,
+    int		maxtolen,
+    char_u	*rest,
+    int		*restlenp)
 {
     CFStringRef	cfstr;
     CFRange	r;
@@ -274,7 +274,7 @@ enc2macroman(from, fromlen, to, tolenp, 
  * Initializes text converters
  */
     void
-mac_conv_init()
+mac_conv_init(void)
 {
     TextEncoding    utf8_encoding;
     TextEncoding    utf8_hfsplus_encoding;
@@ -309,7 +309,7 @@ mac_conv_init()
  * Destroys text converters
  */
     void
-mac_conv_cleanup()
+mac_conv_cleanup(void)
 {
     if (gUTF16ToUTF8Converter)
     {
@@ -330,10 +330,10 @@ mac_conv_cleanup()
  * CFBase.h) to avoid clashes with X11 header files in the .pro file
  */
     char_u *
-mac_utf16_to_enc(from, fromLen, actualLen)
-    unsigned short *from;
-    size_t fromLen;
-    size_t *actualLen;
+mac_utf16_to_enc(
+    unsigned short *from,
+    size_t fromLen,
+    size_t *actualLen)
 {
     /* Following code borrows somewhat from os_mswin.c */
     vimconv_T	conv;
@@ -384,10 +384,10 @@ mac_utf16_to_enc(from, fromLen, actualLe
  * CFBase.h) to avoid clashes with X11 header files in the .pro file
  */
     unsigned short *
-mac_enc_to_utf16(from, fromLen, actualLen)
-    char_u *from;
-    size_t fromLen;
-    size_t *actualLen;
+mac_enc_to_utf16(
+    char_u *from,
+    size_t fromLen,
+    size_t *actualLen)
 {
     /* Following code borrows somewhat from os_mswin.c */
     vimconv_T	conv;
@@ -443,9 +443,9 @@ mac_enc_to_utf16(from, fromLen, actualLe
  * The void * return type is actually a CFStringRef
  */
     void *
-mac_enc_to_cfstring(from, fromLen)
-    char_u  *from;
-    size_t  fromLen;
+mac_enc_to_cfstring(
+    char_u  *from,
+    size_t  fromLen)
 {
     UniChar	*utf16_str;
     size_t	utf16_len;
@@ -465,10 +465,10 @@ mac_enc_to_cfstring(from, fromLen)
  * Converts a decomposed HFS+ UTF-8 path to precomposed UTF-8
  */
     char_u *
-mac_precompose_path(decompPath, decompLen, precompLen)
-    char_u  *decompPath;
-    size_t  decompLen;
-    size_t  *precompLen;
+mac_precompose_path(
+    char_u  *decompPath,
+    size_t  decompLen,
+    size_t  *precompLen)
 {
     char_u  *result = NULL;
     size_t  actualLen = 0;
@@ -498,10 +498,10 @@ mac_precompose_path(decompPath, decompLe
  * Converts from UTF-16 UniChars to precomposed UTF-8
  */
     static char_u *
-mac_utf16_to_utf8(from, fromLen, actualLen)
-    UniChar *from;
-    size_t fromLen;
-    size_t *actualLen;
+mac_utf16_to_utf8(
+    UniChar *from,
+    size_t fromLen,
+    size_t *actualLen)
 {
     ByteCount		utf8_len;
     ByteCount		inputRead;
@@ -538,10 +538,10 @@ mac_utf16_to_utf8(from, fromLen, actualL
  * Converts from UTF-8 to UTF-16 UniChars
  */
     static UniChar *
-mac_utf8_to_utf16(from, fromLen, actualLen)
-    char_u *from;
-    size_t fromLen;
-    size_t *actualLen;
+mac_utf8_to_utf16(
+    char_u *from,
+    size_t fromLen,
+    size_t *actualLen)
 {
     CFStringRef  utf8_str;
     CFRange      convertRange;
@@ -573,7 +573,8 @@ mac_utf8_to_utf16(from, fromLen, actualL
  * Sets LANG environment variable in Vim from Mac locale
  */
     void
-mac_lang_init() {
+mac_lang_init(void)
+{
     if (mch_getenv((char_u *)"LANG") == NULL)
     {
 	char	buf[20];
--- a/src/os_mswin.c
+++ b/src/os_mswin.c
@@ -286,7 +286,7 @@ mch_early_init(void)
  * Return TRUE if the input comes from a terminal, FALSE otherwise.
  */
     int
-mch_input_isatty()
+mch_input_isatty(void)
 {
 #ifdef FEAT_GUI_MSWIN
     return OK;	    /* GUI always has a tty */
@@ -355,7 +355,7 @@ mch_restore_title(
  * Return TRUE if we can restore the title (we can)
  */
     int
-mch_can_restore_title()
+mch_can_restore_title(void)
 {
     return TRUE;
 }
@@ -365,7 +365,7 @@ mch_can_restore_title()
  * Return TRUE if we can restore the icon title (we can't)
  */
     int
-mch_can_restore_icon()
+mch_can_restore_icon(void)
 {
     return FALSE;
 }
@@ -486,8 +486,7 @@ mch_isFullName(char_u *fname)
  * When the path looks like a URL leave it unmodified.
  */
     void
-slash_adjust(p)
-    char_u  *p;
+slash_adjust(char_u *p)
 {
     if (path_with_url(p))
 	return;
@@ -708,7 +707,7 @@ mch_new_shellsize(void)
  * We have no job control, so fake it by starting a new shell.
  */
     void
-mch_suspend()
+mch_suspend(void)
 {
     suspend_shell();
 }
@@ -723,7 +722,7 @@ mch_suspend()
  * Display the saved error message(s).
  */
     void
-display_errors()
+display_errors(void)
 {
     char *p;
 
@@ -864,7 +863,7 @@ can_end_termcap_mode(
  * return non-zero if a character is available
  */
     int
-mch_char_avail()
+mch_char_avail(void)
 {
     /* never used */
     return TRUE;
@@ -965,8 +964,7 @@ mch_icon_load_cb(char_u *fname, void *co
  * Try loading an icon file from 'runtimepath'.
  */
     int
-mch_icon_load(iconp)
-    HANDLE *iconp;
+mch_icon_load(HANDLE *iconp)
 {
     return do_in_runtimepath((char_u *)"bitmaps/vim.ico",
 					      FALSE, mch_icon_load_cb, iconp);
@@ -1831,9 +1829,7 @@ static int prt_pos_x = 0;
 static int prt_pos_y = 0;
 
     void
-mch_print_start_line(margin, page_line)
-    int		margin;
-    int		page_line;
+mch_print_start_line(int margin, int page_line)
 {
     if (margin)
 	prt_pos_x = -prt_number_width;
@@ -2070,7 +2066,7 @@ shortcut_end:
  * Bring ourselves to the foreground.  Does work if the OS doesn't allow it.
  */
     void
-win32_set_foreground()
+win32_set_foreground(void)
 {
 # ifndef FEAT_GUI
     GetConsoleHwnd();	    /* get value of s_hwnd */
@@ -2486,9 +2482,9 @@ serverGetVimNames(void)
 }
 
     int
-serverSendReply(name, reply)
-    char_u	*name;		/* Where to send. */
-    char_u	*reply;		/* What to send. */
+serverSendReply(
+    char_u	*name,		/* Where to send. */
+    char_u	*reply)		/* What to send. */
 {
     HWND	target;
     COPYDATASTRUCT data;
@@ -2519,13 +2515,13 @@ serverSendReply(name, reply)
 }
 
     int
-serverSendToVim(name, cmd, result, ptarget, asExpr, silent)
-    char_u	 *name;			/* Where to send. */
-    char_u	 *cmd;			/* What to send. */
-    char_u	 **result;		/* Result of eval'ed expression */
-    void	 *ptarget;		/* HWND of server */
-    int		 asExpr;		/* Expression or keys? */
-    int		 silent;		/* don't complain about no server */
+serverSendToVim(
+    char_u	 *name,			/* Where to send. */
+    char_u	 *cmd,			/* What to send. */
+    char_u	 **result,		/* Result of eval'ed expression */
+    void	 *ptarget,		/* HWND of server */
+    int		 asExpr,		/* Expression or keys? */
+    int		 silent)		/* don't complain about no server */
 {
     HWND	target;
     COPYDATASTRUCT data;
@@ -2578,8 +2574,7 @@ serverSendToVim(name, cmd, result, ptarg
  * Bring the server to the foreground.
  */
     void
-serverForeground(name)
-    char_u	*name;
+serverForeground(char_u *name)
 {
     HWND	target = findServer(name);
 
@@ -3101,7 +3096,7 @@ theend:
  * Initialize the Winsock dll.
  */
     void
-channel_init_winsock()
+channel_init_winsock(void)
 {
     WSADATA wsaData;
     int wsaerr;
--- a/src/os_qnx.c
+++ b/src/os_qnx.c
@@ -19,7 +19,7 @@
 int is_photon_available;
 #endif
 
-void qnx_init()
+void qnx_init(void)
 {
 #if defined(FEAT_GUI_PHOTON)
     PhChannelParms_t parms;
@@ -37,7 +37,7 @@ void qnx_init()
 #define CLIP_TYPE_TEXT "TEXT"
 
 /* Turn on the clipboard for a console vim when photon is running */
-void qnx_clip_init()
+void qnx_clip_init(void)
 {
     if (is_photon_available == TRUE && !gui.in_use)
 	clip_init(TRUE);
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -342,8 +342,7 @@ static struct signalinfo
 };
 
     int
-mch_chdir(path)
-    char *path;
+mch_chdir(char *path)
 {
     if (p_verbose >= 5)
     {
@@ -362,9 +361,7 @@ mch_chdir(path)
  * Write s[len] to the screen.
  */
     void
-mch_write(s, len)
-    char_u	*s;
-    int		len;
+mch_write(char_u *s, int len)
 {
     ignored = (int)write(1, (char *)s, len);
     if (p_wd)		/* Unix is too fast, slow down a bit more */
@@ -380,11 +377,11 @@ mch_write(s, len)
  * If wtime == -1 wait forever for characters.
  */
     int
-mch_inchar(buf, maxlen, wtime, tb_change_cnt)
-    char_u	*buf;
-    int		maxlen;
-    long	wtime;	    /* don't use "time", MIPS cannot handle it */
-    int		tb_change_cnt;
+mch_inchar(
+    char_u	*buf,
+    int		maxlen,
+    long	wtime,	    /* don't use "time", MIPS cannot handle it */
+    int		tb_change_cnt)
 {
     int		len;
 
@@ -477,7 +474,7 @@ mch_inchar(buf, maxlen, wtime, tb_change
 }
 
     static void
-handle_resize()
+handle_resize(void)
 {
     do_resize = FALSE;
     shell_resized();
@@ -487,7 +484,7 @@ handle_resize()
  * return non-zero if a character is available
  */
     int
-mch_char_avail()
+mch_char_avail(void)
 {
     return WaitForChar(0L);
 }
@@ -508,8 +505,7 @@ mch_char_avail()
  * Doesn't change when memory has been allocated.
  */
     long_u
-mch_total_mem(special)
-    int special UNUSED;
+mch_total_mem(int special UNUSED)
 {
 # ifdef __EMX__
     return ulimit(3, 0L) >> 10;   /* always 32MB? */
@@ -601,9 +597,7 @@ mch_total_mem(special)
 #endif
 
     void
-mch_delay(msec, ignoreinput)
-    long	msec;
-    int		ignoreinput;
+mch_delay(long msec, int ignoreinput)
 {
     int		old_tmode;
 #ifdef FEAT_MZSCHEME
@@ -704,8 +698,7 @@ static int stack_grows_downwards;
  * "p" points to a variable on the stack of the caller.
  */
     static void
-check_stack_growth(p)
-    char	*p;
+check_stack_growth(char *p)
 {
     int		i;
 
@@ -727,7 +720,7 @@ static char *stack_limit = NULL;
  * deathtrap().
  */
     static void
-get_stack_limit()
+get_stack_limit(void)
 {
     struct rlimit	rlp;
     int			i;
@@ -781,8 +774,7 @@ get_stack_limit()
  * "p" must point to any variable local to the caller that's on the stack.
  */
     int
-mch_stackcheck(p)
-    char	*p;
+mch_stackcheck(char *p)
 {
     if (stack_limit != NULL)
     {
@@ -824,7 +816,7 @@ static void init_signal_stack(void);
 static char *signal_stack;
 
     static void
-init_signal_stack()
+init_signal_stack(void)
 {
     if (signal_stack != NULL)
     {
@@ -936,7 +928,7 @@ sig_alarm SIGDEFARG(sigarg)
  * problem and LONGJMP() was used.
  */
     void
-mch_startjmp()
+mch_startjmp(void)
 {
 #ifdef SIGHASARG
     lc_signal = 0;
@@ -945,13 +937,13 @@ mch_startjmp()
 }
 
     void
-mch_endjmp()
+mch_endjmp(void)
 {
     lc_active = FALSE;
 }
 
     void
-mch_didjmp()
+mch_didjmp(void)
 {
 # if defined(HAVE_SIGALTSTACK) || defined(HAVE_SIGSTACK)
     /* On FreeBSD the signal stack has to be reset after using siglongjmp(),
@@ -1166,7 +1158,7 @@ static void *clip_plus_save = NULL;
  * other applications will hang.  But first copy the text to cut buffer 0.
  */
     static void
-loose_clipboard()
+loose_clipboard(void)
 {
     if (clip_star.owned || clip_plus.owned)
     {
@@ -1185,7 +1177,7 @@ loose_clipboard()
  * Save clipboard text to restore later.
  */
     static void
-save_clipboard()
+save_clipboard(void)
 {
     if (clip_star.owned)
 	clip_star_save = get_register('*', TRUE);
@@ -1197,7 +1189,7 @@ save_clipboard()
  * Restore clipboard text if no one own the X selection.
  */
     static void
-restore_clipboard()
+restore_clipboard(void)
 {
     if (clip_star_save != NULL)
     {
@@ -1224,7 +1216,7 @@ restore_clipboard()
  * otherwise fake it by starting a new shell.
  */
     void
-mch_suspend()
+mch_suspend(void)
 {
     /* BeOS does have SIGTSTP, but it doesn't work. */
 #if defined(SIGTSTP) && !defined(__BEOS__)
@@ -1276,7 +1268,7 @@ mch_suspend()
 }
 
     void
-mch_init()
+mch_init(void)
 {
     Columns = 80;
     Rows = 24;
@@ -1293,7 +1285,7 @@ mch_init()
 }
 
     static void
-set_signals()
+set_signals(void)
 {
 #if defined(SIGWINCH)
     /*
@@ -1358,14 +1350,14 @@ set_signals()
  * Catch CTRL-C (only works while in Cooked mode).
  */
     static void
-catch_int_signal()
+catch_int_signal(void)
 {
     signal(SIGINT, (RETSIGTYPE (*)())catch_sigint);
 }
 #endif
 
     void
-reset_signals()
+reset_signals(void)
 {
     catch_signals(SIG_DFL, SIG_DFL);
 #if defined(_REENTRANT) && defined(SIGCONT)
@@ -1375,9 +1367,9 @@ reset_signals()
 }
 
     static void
-catch_signals(func_deadly, func_other)
-    RETSIGTYPE (*func_deadly)();
-    RETSIGTYPE (*func_other)();
+catch_signals(
+    RETSIGTYPE (*func_deadly)(),
+    RETSIGTYPE (*func_other)())
 {
     int	    i;
 
@@ -1429,8 +1421,7 @@ catch_signals(func_deadly, func_other)
  * Returns TRUE when Vim should exit.
  */
     int
-vim_handle_signal(sig)
-    int		sig;
+vim_handle_signal(int sig)
 {
     static int got_signal = 0;
     static int blocked = TRUE;
@@ -1464,9 +1455,7 @@ vim_handle_signal(sig)
  * Check_win checks whether we have an interactive stdout.
  */
     int
-mch_check_win(argc, argv)
-    int	    argc UNUSED;
-    char    **argv UNUSED;
+mch_check_win(int argc UNUSED, char **argv UNUSED)
 {
     if (isatty(1))
 	return OK;
@@ -1477,7 +1466,7 @@ mch_check_win(argc, argv)
  * Return TRUE if the input comes from a terminal, FALSE otherwise.
  */
     int
-mch_input_isatty()
+mch_input_isatty(void)
 {
     if (isatty(read_cmd_fd))
 	return TRUE;
@@ -1495,8 +1484,8 @@ static void xopen_message(struct timeval
  * Give a message about the elapsed time for opening the X window.
  */
     static void
-xopen_message(tvp)
-    struct timeval *tvp;	/* must contain start time */
+xopen_message(
+    struct timeval *tvp)	/* must contain start time */
 {
     struct timeval  end_tv;
 
@@ -1524,9 +1513,7 @@ static int	got_x_error = FALSE;
  * X Error handler, otherwise X just exits!  (very rude) -- webb
  */
     static int
-x_error_handler(dpy, error_event)
-    Display	*dpy;
-    XErrorEvent	*error_event;
+x_error_handler(Display *dpy, XErrorEvent *error_event)
 {
     XGetErrorText(dpy, error_event->error_code, (char *)IObuff, IOSIZE);
     STRCAT(IObuff, _("\nVim: Got X error\n"));
@@ -1543,9 +1530,7 @@ x_error_handler(dpy, error_event)
  * Another X Error handler, just used to check for errors.
  */
     static int
-x_error_check(dpy, error_event)
-    Display *dpy UNUSED;
-    XErrorEvent	*error_event UNUSED;
+x_error_check(Display *dpy UNUSED, XErrorEvent *error_event UNUSED)
 {
     got_x_error = TRUE;
     return 0;
@@ -1559,8 +1544,7 @@ x_error_check(dpy, error_event)
 static int x_IOerror_check(Display *dpy);
 
     static int
-x_IOerror_check(dpy)
-    Display *dpy UNUSED;
+x_IOerror_check(Display *dpy UNUSED)
 {
     /* This function should not return, it causes exit().  Longjump instead. */
     LONGJMP(lc_jump_env, 1);
@@ -1578,8 +1562,7 @@ static void may_restore_clipboard(void);
 static int xterm_dpy_was_reset = FALSE;
 
     static int
-x_IOerror_handler(dpy)
-    Display *dpy UNUSED;
+x_IOerror_handler(Display *dpy UNUSED)
 {
     xterm_dpy = NULL;
     xterm_dpy_was_reset = TRUE;
@@ -1600,7 +1583,7 @@ x_IOerror_handler(dpy)
  * (e.g. through tmux).
  */
     static void
-may_restore_clipboard()
+may_restore_clipboard(void)
 {
     if (xterm_dpy_was_reset)
     {
@@ -1626,7 +1609,7 @@ may_restore_clipboard()
  * Return TRUE when connection to the X server is desired.
  */
     static int
-x_connect_to_server()
+x_connect_to_server(void)
 {
 #if defined(FEAT_CLIENTSERVER)
     if (x_force_connect)
@@ -1652,8 +1635,7 @@ x_connect_to_server()
  * user changes his DISPLAY, but not his WINDOWID) -- webb
  */
     static int
-test_x11_window(dpy)
-    Display	*dpy;
+test_x11_window(Display *dpy)
 {
     int			(*old_handler)();
     XTextProperty	text_prop;
@@ -1684,7 +1666,7 @@ static int get_x11_thing(int get_title, 
  * return FAIL for failure, OK otherwise
  */
     static int
-get_x11_windis()
+get_x11_windis(void)
 {
     char	    *winid;
     static int	    result = -1;
@@ -1843,8 +1825,7 @@ get_x11_windis()
  * Determine original x11 Window Title
  */
     static int
-get_x11_title(test_only)
-    int		test_only;
+get_x11_title(int test_only)
 {
     return get_x11_thing(TRUE, test_only);
 }
@@ -1853,8 +1834,7 @@ get_x11_title(test_only)
  * Determine original x11 Window icon
  */
     static int
-get_x11_icon(test_only)
-    int		test_only;
+get_x11_icon(int test_only)
 {
     int		retval = FALSE;
 
@@ -1873,9 +1853,9 @@ get_x11_icon(test_only)
 }
 
     static int
-get_x11_thing(get_title, test_only)
-    int		get_title;	/* get title string */
-    int		test_only;
+get_x11_thing(
+    int		get_title,	/* get title string */
+    int		test_only)
 {
     XTextProperty	text_prop;
     int			retval = FALSE;
@@ -1990,8 +1970,7 @@ get_x11_thing(get_title, test_only)
  * get_x11_windis() must be called before this and have returned OK
  */
     static void
-set_x11_title(title)
-    char_u	*title;
+set_x11_title(char_u *title)
 {
 	/* XmbSetWMProperties() and Xutf8SetWMProperties() should use a STRING
 	 * when possible, COMPOUND_TEXT otherwise.  COMPOUND_TEXT isn't
@@ -2030,8 +2009,7 @@ set_x11_title(title)
  * get_x11_windis() must be called before this and have returned OK
  */
     static void
-set_x11_icon(icon)
-    char_u	*icon;
+set_x11_icon(char_u *icon)
 {
     /* See above for comments about using X*SetWMProperties(). */
 #ifdef USE_UTF8_STRING
@@ -2086,13 +2064,13 @@ get_x11_icon(test_only)
 #endif /* FEAT_X11 */
 
     int
-mch_can_restore_title()
+mch_can_restore_title(void)
 {
     return get_x11_title(TRUE);
 }
 
     int
-mch_can_restore_icon()
+mch_can_restore_icon(void)
 {
     return get_x11_icon(TRUE);
 }
@@ -2101,9 +2079,7 @@ mch_can_restore_icon()
  * Set the window title and icon.
  */
     void
-mch_settitle(title, icon)
-    char_u *title;
-    char_u *icon;
+mch_settitle(char_u *title, char_u *icon)
 {
     int		type = 0;
     static int	recursive = 0;
@@ -2198,8 +2174,7 @@ mch_settitle(title, icon)
  *  3  restore title and icon
  */
     void
-mch_restore_title(which)
-    int which;
+mch_restore_title(int which)
 {
     /* only restore the title or icon when it has been set */
     mch_settitle(((which & 1) && did_set_title) ?
@@ -2214,8 +2189,7 @@ mch_restore_title(which)
  * Seiichi Sato mentioned that "mlterm" works like xterm.
  */
     int
-vim_is_xterm(name)
-    char_u *name;
+vim_is_xterm(char_u *name)
 {
     if (name == NULL)
 	return FALSE;
@@ -2234,8 +2208,7 @@ vim_is_xterm(name)
  * Relies on term_is_xterm having been set to its correct value.
  */
     int
-use_xterm_like_mouse(name)
-    char_u *name;
+use_xterm_like_mouse(char_u *name)
 {
     return (name != NULL
 	    && (term_is_xterm || STRNICMP(name, "screen", 6) == 0));
@@ -2251,7 +2224,7 @@ use_xterm_like_mouse(name)
  * Return 4 for "sgr".
  */
     int
-use_xterm_mouse()
+use_xterm_mouse(void)
 {
     if (ttym_flags == TTYM_SGR)
 	return 4;
@@ -2266,8 +2239,7 @@ use_xterm_mouse()
 #endif
 
     int
-vim_is_iris(name)
-    char_u  *name;
+vim_is_iris(char_u *name)
 {
     if (name == NULL)
 	return FALSE;
@@ -2276,8 +2248,7 @@ vim_is_iris(name)
 }
 
     int
-vim_is_vt300(name)
-    char_u  *name;
+vim_is_vt300(char_u *name)
 {
     if (name == NULL)
 	return FALSE;	       /* actually all ANSI comp. terminals should be here  */
@@ -2292,8 +2263,7 @@ vim_is_vt300(name)
  * This should include all windowed terminal emulators.
  */
     int
-vim_is_fastterm(name)
-    char_u  *name;
+vim_is_fastterm(char_u *name)
 {
     if (name == NULL)
 	return FALSE;
@@ -2310,9 +2280,7 @@ vim_is_fastterm(name)
  * Return OK if a name found.
  */
     int
-mch_get_user_name(s, len)
-    char_u  *s;
-    int	    len;
+mch_get_user_name(char_u *s, int len)
 {
 #ifdef VMS
     vim_strncpy(s, (char_u *)cuserid(NULL), len - 1);
@@ -2327,10 +2295,7 @@ mch_get_user_name(s, len)
  * Return OK if a name found.
  */
     int
-mch_get_uname(uid, s, len)
-    uid_t	uid;
-    char_u	*s;
-    int		len;
+mch_get_uname(uid_t uid, char_u *s, int len)
 {
 #if defined(HAVE_PWD_H) && defined(HAVE_GETPWUID)
     struct passwd   *pw;
@@ -2352,9 +2317,7 @@ mch_get_uname(uid, s, len)
 
 #ifdef HAVE_SYS_UTSNAME_H
     void
-mch_get_host_name(s, len)
-    char_u  *s;
-    int	    len;
+mch_get_host_name(char_u *s, int len)
 {
     struct utsname vutsname;
 
@@ -2387,7 +2350,7 @@ mch_get_host_name(s, len)
  * return process ID
  */
     long
-mch_get_pid()
+mch_get_pid(void)
 {
     return (long)getpid();
 }
@@ -2396,8 +2359,7 @@ mch_get_pid()
 static char *strerror(int);
 
     static char *
-strerror(err)
-    int err;
+strerror(int err)
 {
     extern int	    sys_nerr;
     extern char	    *sys_errlist[];
@@ -2415,9 +2377,7 @@ strerror(err)
  * Return OK for success, FAIL for failure.
  */
     int
-mch_dirname(buf, len)
-    char_u  *buf;
-    int	    len;
+mch_dirname(char_u *buf, int len)
 {
 #if defined(USE_GETCWD)
     if (getcwd((char *)buf, len) == NULL)
@@ -2437,10 +2397,11 @@ mch_dirname(buf, len)
  * return FAIL for failure, OK for success
  */
     int
-mch_FullName(fname, buf, len, force)
-    char_u	*fname, *buf;
-    int		len;
-    int		force;		/* also expand when already absolute path */
+mch_FullName(
+    char_u	*fname,
+    char_u	*buf,
+    int		len,
+    int		force)		/* also expand when already absolute path */
 {
     int		l;
 #ifdef HAVE_FCHDIR
@@ -2585,8 +2546,7 @@ mch_FullName(fname, buf, len, force)
  * Return TRUE if "fname" does not depend on the current directory.
  */
     int
-mch_isFullName(fname)
-    char_u	*fname;
+mch_isFullName(char_u *fname)
 {
 #ifdef __EMX__
     return _fnisabs(fname);
@@ -2609,9 +2569,9 @@ mch_isFullName(fname)
  * Only required for file systems where case is ignored and preserved.
  */
     void
-fname_case(name, len)
-    char_u	*name;
-    int		len UNUSED;  /* buffer size, only used when name gets longer */
+fname_case(
+    char_u	*name,
+    int		len UNUSED)  /* buffer size, only used when name gets longer */
 {
     struct stat st;
     char_u	*slash, *tail;
@@ -2672,8 +2632,7 @@ fname_case(name, len)
  * Returns -1 when it doesn't exist.
  */
     long
-mch_getperm(name)
-    char_u *name;
+mch_getperm(char_u *name)
 {
     struct stat statb;
 
@@ -2699,9 +2658,7 @@ mch_getperm(name)
  * return FAIL for failure, OK otherwise
  */
     int
-mch_setperm(name, perm)
-    char_u  *name;
-    long    perm;
+mch_setperm(char_u *name, long perm)
 {
     return (chmod((char *)
 #ifdef VMS
@@ -2732,9 +2689,7 @@ typedef struct vim_acl_solaris_T {
  * Copy security info from "from_file" to "to_file".
  */
     void
-mch_copy_sec(from_file, to_file)
-    char_u	*from_file;
-    char_u	*to_file;
+mch_copy_sec(char_u *from_file, char_u *to_file)
 {
     if (from_file == NULL)
 	return;
@@ -2866,8 +2821,7 @@ mch_copy_sec(from_file, to_file)
  * Return NULL if the ACL is not available for whatever reason.
  */
     vim_acl_T
-mch_get_acl(fname)
-    char_u	*fname UNUSED;
+mch_get_acl(char_u *fname UNUSED)
 {
     vim_acl_T	ret = NULL;
 #ifdef HAVE_POSIX_ACL
@@ -2934,9 +2888,7 @@ mch_get_acl(fname)
  * Set the ACL of file "fname" to "acl" (unless it's NULL).
  */
     void
-mch_set_acl(fname, aclent)
-    char_u	*fname UNUSED;
-    vim_acl_T	aclent;
+mch_set_acl(char_u *fname UNUSED, vim_acl_T aclent)
 {
     if (aclent == NULL)
 	return;
@@ -2959,8 +2911,7 @@ mch_set_acl(fname, aclent)
 }
 
     void
-mch_free_acl(aclent)
-    vim_acl_T	aclent;
+mch_free_acl(vim_acl_T aclent)
 {
     if (aclent == NULL)
 	return;
@@ -2987,8 +2938,7 @@ mch_free_acl(aclent)
  * Set hidden flag for "name".
  */
     void
-mch_hide(name)
-    char_u	*name UNUSED;
+mch_hide(char_u *name UNUSED)
 {
     /* can't hide a file */
 }
@@ -2999,8 +2949,7 @@ mch_hide(name)
  * return FALSE for error
  */
     int
-mch_isdir(name)
-    char_u *name;
+mch_isdir(char_u *name)
 {
     struct stat statb;
 
@@ -3021,8 +2970,7 @@ mch_isdir(name)
  * return FALSE for error
  */
     int
-mch_isrealdir(name)
-    char_u *name;
+mch_isrealdir(char_u *name)
 {
     struct stat statb;
 
@@ -3043,8 +2991,7 @@ static int executable_file(char_u *name)
  * Return 1 if "name" is an executable file, 0 if not or it doesn't exist.
  */
     static int
-executable_file(name)
-    char_u	*name;
+executable_file(char_u *name)
 {
     struct stat	st;
 
@@ -3078,10 +3025,7 @@ executable_file(name)
  * Return -1 if unknown.
  */
     int
-mch_can_exe(name, path, use_path)
-    char_u	*name;
-    char_u	**path;
-    int		use_path;
+mch_can_exe(char_u *name, char_u **path, int use_path)
 {
     char_u	*buf;
     char_u	*p, *e;
@@ -3161,8 +3105,7 @@ mch_can_exe(name, path, use_path)
  * NODE_OTHER: non-writable things
  */
     int
-mch_nodetype(name)
-    char_u	*name;
+mch_nodetype(char_u *name)
 {
     struct stat	st;
 
@@ -3177,7 +3120,7 @@ mch_nodetype(name)
 }
 
     void
-mch_early_init()
+mch_early_init(void)
 {
 #ifdef HAVE_CHECK_STACK_GROWTH
     int			i;
@@ -3204,7 +3147,7 @@ mch_early_init()
 
 #if defined(EXITFREE) || defined(PROTO)
     void
-mch_free_mem()
+mch_free_mem(void)
 {
 # if defined(FEAT_CLIPBOARD) && defined(FEAT_X11)
     if (clip_star.owned)
@@ -3254,7 +3197,7 @@ static void exit_scroll(void);
  * Make sure the newline goes to the same stream as the text.
  */
     static void
-exit_scroll()
+exit_scroll(void)
 {
     if (silent_mode)
 	return;
@@ -3279,8 +3222,7 @@ exit_scroll()
 }
 
     void
-mch_exit(r)
-    int r;
+mch_exit(int r)
 {
     exiting = TRUE;
 
@@ -3352,7 +3294,7 @@ mch_exit(r)
 }
 
     static void
-may_core_dump()
+may_core_dump(void)
 {
     if (deadly_signal != 0)
     {
@@ -3364,8 +3306,7 @@ may_core_dump()
 #ifndef VMS
 
     void
-mch_settmode(tmode)
-    int		tmode;
+mch_settmode(int tmode)
 {
     static int first = TRUE;
 
@@ -3468,7 +3409,7 @@ mch_settmode(tmode)
  * doing forward deletes for no reason. (Eric Fischer)
  */
     void
-get_stty()
+get_stty(void)
 {
     char_u  buf[2];
     char_u  *p;
@@ -3521,8 +3462,7 @@ get_stty()
  * Set mouse clicks on or off.
  */
     void
-mch_setmouse(on)
-    int		on;
+mch_setmouse(int on)
 {
     static int	ison = FALSE;
     int		xterm_mouse_vers;
@@ -3667,7 +3607,7 @@ mch_setmouse(on)
  * Set the mouse termcode, depending on the 'term' and 'ttymouse' options.
  */
     void
-check_mouse_termcode()
+check_mouse_termcode(void)
 {
 # ifdef FEAT_MOUSE_XTERM
     if (use_xterm_mouse()
@@ -3812,8 +3752,7 @@ check_mouse_termcode()
  * set screen mode, always fails.
  */
     int
-mch_screenmode(arg)
-    char_u   *arg UNUSED;
+mch_screenmode(char_u *arg UNUSED)
 {
     EMSG(_(e_screenmode));
     return FAIL;
@@ -3830,7 +3769,7 @@ mch_screenmode(arg)
  * Return OK when size could be determined, FAIL otherwise.
  */
     int
-mch_get_shellsize()
+mch_get_shellsize(void)
 {
     long	rows = 0;
     long	columns = 0;
@@ -3924,7 +3863,7 @@ mch_get_shellsize()
  * Try to set the window size to Rows and Columns.
  */
     void
-mch_set_shellsize()
+mch_set_shellsize(void)
 {
     if (*T_CWS)
     {
@@ -3945,7 +3884,7 @@ mch_set_shellsize()
  * Rows and/or Columns has changed.
  */
     void
-mch_new_shellsize()
+mch_new_shellsize(void)
 {
     /* Nothing to do. */
 }
@@ -3955,9 +3894,7 @@ mch_new_shellsize()
  * Return "child" if it exited properly, <= 0 on error.
  */
     static pid_t
-wait4pid(child, status)
-    pid_t	child;
-    waitstatus	*status;
+wait4pid(pid_t child, waitstatus *status)
 {
     pid_t wait_pid = 0;
 
@@ -3989,9 +3926,9 @@ wait4pid(child, status)
 }
 
     int
-mch_call_shell(cmd, options)
-    char_u	*cmd;
-    int		options;	/* SHELL_*, see vim.h */
+mch_call_shell(
+    char_u	*cmd,
+    int		options)	/* SHELL_*, see vim.h */
 {
 #ifdef VMS
     char	*ifn = NULL;
@@ -5080,7 +5017,7 @@ error:
  * In cooked mode we should get SIGINT, no need to check.
  */
     void
-mch_breakcheck()
+mch_breakcheck(void)
 {
     if (curr_tmode == TMODE_RAW && RealWaitForChar(read_cmd_fd, 0L, NULL))
 	fill_input_buf(FALSE);
@@ -5092,8 +5029,7 @@ mch_breakcheck()
  * When a GUI is being used, this will never get called -- webb
  */
     static int
-WaitForChar(msec)
-    long	msec;
+WaitForChar(long msec)
 {
 #ifdef FEAT_MOUSE_GPM
     int		gpm_process_wanted;
@@ -5183,10 +5119,7 @@ WaitForChar(msec)
 #else
     static  int
 #endif
-RealWaitForChar(fd, msec, check_for_gpm)
-    int		fd;
-    long	msec;
-    int		*check_for_gpm UNUSED;
+RealWaitForChar(int fd, long msec, int *check_for_gpm UNUSED)
 {
     int		ret;
 #if defined(FEAT_XCLIPBOARD) || defined(USE_XSMP) || defined(FEAT_MZSCHEME)
@@ -5583,10 +5516,10 @@ select_eintr:
  * Returns the number of matches found.
  */
     int
-mch_expandpath(gap, path, flags)
-    garray_T	*gap;
-    char_u	*path;
-    int		flags;		/* EW_* flags */
+mch_expandpath(
+    garray_T	*gap,
+    char_u	*path,
+    int		flags)		/* EW_* flags */
 {
     return unix_expandpath(gap, path, 0, flags, FALSE);
 }
@@ -5615,12 +5548,12 @@ mch_expandpath(gap, path, flags)
 #define SHELL_SPECIAL (char_u *)"\t \"&'$;<>()\\|"
 
     int
-mch_expand_wildcards(num_pat, pat, num_file, file, flags)
-    int		   num_pat;
-    char_u	 **pat;
-    int		  *num_file;
-    char_u	***file;
-    int		   flags;	/* EW_* flags */
+mch_expand_wildcards(
+    int		   num_pat,
+    char_u	 **pat,
+    int		  *num_file,
+    char_u	***file,
+    int		   flags)	/* EW_* flags */
 {
     int		i;
     size_t	len;
@@ -6225,11 +6158,11 @@ notfound:
 
 #ifndef __EMX__
     static int
-save_patterns(num_pat, pat, num_file, file)
-    int		num_pat;
-    char_u	**pat;
-    int		*num_file;
-    char_u	***file;
+save_patterns(
+    int		num_pat,
+    char_u	**pat,
+    int		*num_file,
+    char_u	***file)
 {
     int		i;
     char_u	*s;
@@ -6256,8 +6189,7 @@ save_patterns(num_pat, pat, num_file, fi
  * expand.
  */
     int
-mch_has_exp_wildcard(p)
-    char_u  *p;
+mch_has_exp_wildcard(char_u *p)
 {
     for ( ; *p; mb_ptr_adv(p))
     {
@@ -6281,8 +6213,7 @@ mch_has_exp_wildcard(p)
  * Don't recognize '~' at the end as a wildcard.
  */
     int
-mch_has_wildcard(p)
-    char_u  *p;
+mch_has_wildcard(char_u *p)
 {
     for ( ; *p; mb_ptr_adv(p))
     {
@@ -6304,9 +6235,7 @@ mch_has_wildcard(p)
 
 #ifndef __EMX__
     static int
-have_wildcard(num, file)
-    int	    num;
-    char_u  **file;
+have_wildcard(int num, char_u **file)
 {
     int	    i;
 
@@ -6317,9 +6246,7 @@ have_wildcard(num, file)
 }
 
     static int
-have_dollars(num, file)
-    int	    num;
-    char_u  **file;
+have_dollars(int num, char_u **file)
 {
     int	    i;
 
@@ -6337,8 +6264,7 @@ have_dollars(num, file)
  * destination exists.
  */
     int
-mch_rename(src, dest)
-    const char *src, *dest;
+mch_rename(const char *src, *dest)
 {
     struct stat	    st;
 
@@ -6358,7 +6284,7 @@ mch_rename(src, dest)
  * Return 1 if succeeded (or connection already opened), 0 if failed
  */
     static int
-gpm_open()
+gpm_open(void)
 {
     static Gpm_Connect gpm_connect; /* Must it be kept till closing ? */
 
@@ -6392,7 +6318,7 @@ gpm_open()
  * Closes connection to gpm
  */
     static void
-gpm_close()
+gpm_close(void)
 {
     if (gpm_flag && gpm_fd >= 0) /* if Open */
 	Gpm_Close();
@@ -6403,7 +6329,7 @@ gpm_close()
  * This function is styled after gui_send_mouse_event().
  */
     static int
-mch_gpm_process()
+mch_gpm_process(void)
 {
     int			button;
     static Gpm_Event	gpm_event;
@@ -6492,7 +6418,7 @@ mch_gpm_process()
  * Return OK if succeeded, FAIL if failed.
  */
     static int
-sysmouse_open()
+sysmouse_open(void)
 {
     struct mouse_info   mouse;
 
@@ -6514,7 +6440,7 @@ sysmouse_open()
  * virtual console do not send us any sysmouse related signal.
  */
     static void
-sysmouse_close()
+sysmouse_close(void)
 {
     struct mouse_info	mouse;
 
@@ -6602,13 +6528,13 @@ typedef int (*INTPROCINT)(int);
  * and returns an allocated string.
  */
     int
-mch_libcall(libname, funcname, argstring, argint, string_result, number_result)
-    char_u	*libname;
-    char_u	*funcname;
-    char_u	*argstring;	/* NULL when using a argint */
-    int		argint;
-    char_u	**string_result;/* NULL when using number_result */
-    int		*number_result;
+mch_libcall(
+    char_u	*libname,
+    char_u	*funcname,
+    char_u	*argstring,	/* NULL when using a argint */
+    int		argint,
+    char_u	**string_result,/* NULL when using number_result */
+    int		*number_result)
 {
 # if defined(USE_DLOPEN)
     void	*hinstLib;
@@ -6769,7 +6695,7 @@ static int	xterm_button;
  * Setup a dummy window for X selections in a terminal.
  */
     void
-setup_term_clip()
+setup_term_clip(void)
 {
     int		z = 0;
     char	*strp = "";
@@ -6878,8 +6804,7 @@ setup_term_clip()
 }
 
     void
-start_xterm_trace(button)
-    int button;
+start_xterm_trace(int button)
 {
     if (x11_window == 0 || xterm_trace < 0 || xterm_Shell == (Widget)0)
 	return;
@@ -6890,7 +6815,7 @@ start_xterm_trace(button)
 
 
     void
-stop_xterm_trace()
+stop_xterm_trace(void)
 {
     if (xterm_trace < 0)
 	return;
@@ -6902,7 +6827,7 @@ stop_xterm_trace()
  * return TRUE if dragging is active, else FALSE
  */
     static int
-do_xterm_trace()
+do_xterm_trace(void)
 {
     Window		root, child;
     int			root_x, root_y;
@@ -6985,7 +6910,7 @@ do_xterm_trace()
  * Destroy the display, window and app_context.  Required for GTK.
  */
     void
-clear_xterm_clip()
+clear_xterm_clip(void)
 {
     if (xterm_Shell != (Widget)0)
     {
@@ -7017,7 +6942,7 @@ clear_xterm_clip()
  * Catch up with GUI or X events.
  */
     static void
-clip_update()
+clip_update(void)
 {
 # ifdef FEAT_GUI
     if (gui.in_use)
@@ -7035,7 +6960,7 @@ clip_update()
  * immediately.
  */
     static void
-xterm_update()
+xterm_update(void)
 {
     XEvent event;
 
@@ -7070,8 +6995,7 @@ xterm_update()
 }
 
     int
-clip_xterm_own_selection(cbd)
-    VimClipboard *cbd;
+clip_xterm_own_selection(VimClipboard *cbd)
 {
     if (xterm_Shell != (Widget)0)
 	return clip_x11_own_selection(xterm_Shell, cbd);
@@ -7079,24 +7003,21 @@ clip_xterm_own_selection(cbd)
 }
 
     void
-clip_xterm_lose_selection(cbd)
-    VimClipboard *cbd;
+clip_xterm_lose_selection(VimClipboard *cbd)
 {
     if (xterm_Shell != (Widget)0)
 	clip_x11_lose_selection(xterm_Shell, cbd);
 }
 
     void
-clip_xterm_request_selection(cbd)
-    VimClipboard *cbd;
+clip_xterm_request_selection(VimClipboard *cbd)
 {
     if (xterm_Shell != (Widget)0)
 	clip_x11_request_selection(xterm_Shell, xterm_dpy, cbd);
 }
 
     void
-clip_xterm_set_selection(cbd)
-    VimClipboard *cbd;
+clip_xterm_set_selection(VimClipboard *cbd)
 {
     clip_x11_set_selection(cbd);
 }
@@ -7122,9 +7043,7 @@ static void xsmp_handle_interaction(SmcC
  * or abort the logout
  */
     static void
-xsmp_handle_interaction(smc_conn, client_data)
-    SmcConn	smc_conn;
-    SmPointer	client_data UNUSED;
+xsmp_handle_interaction(SmcConn smc_conn, SmPointer client_data UNUSED)
 {
     cmdmod_T	save_cmdmod;
     int		cancel_shutdown = False;
@@ -7158,14 +7077,13 @@ xsmp_handle_interaction(smc_conn, client
  * Callback that starts save-yourself.
  */
     static void
-xsmp_handle_save_yourself(smc_conn, client_data, save_type,
-					       shutdown, interact_style, fast)
-    SmcConn	smc_conn;
-    SmPointer	client_data UNUSED;
-    int		save_type UNUSED;
-    Bool	shutdown;
-    int		interact_style UNUSED;
-    Bool	fast UNUSED;
+xsmp_handle_save_yourself(
+    SmcConn	smc_conn,
+    SmPointer	client_data UNUSED,
+    int		save_type UNUSED,
+    Bool	shutdown,
+    int		interact_style UNUSED,
+    Bool	fast UNUSED)
 {
     /* Handle already being in saveyourself */
     if (xsmp.save_yourself)
@@ -7200,9 +7118,7 @@ xsmp_handle_save_yourself(smc_conn, clie
  * Callback to warn us of imminent death.
  */
     static void
-xsmp_die(smc_conn, client_data)
-    SmcConn	smc_conn UNUSED;
-    SmPointer	client_data UNUSED;
+xsmp_die(SmcConn smc_conn UNUSED, SmPointer client_data UNUSED)
 {
     xsmp_close();
 
@@ -7215,9 +7131,9 @@ xsmp_die(smc_conn, client_data)
  * Callback to tell us that save-yourself has completed.
  */
     static void
-xsmp_save_complete(smc_conn, client_data)
-    SmcConn	smc_conn UNUSED;
-    SmPointer	client_data UNUSED;
+xsmp_save_complete(
+    SmcConn	smc_conn UNUSED,
+    SmPointer	client_data UNUSED)
 {
     xsmp.save_yourself = False;
 }
@@ -7228,9 +7144,9 @@ xsmp_save_complete(smc_conn, client_data
  * (maybe even by us)
  */
     static void
-xsmp_shutdown_cancelled(smc_conn, client_data)
-    SmcConn	smc_conn;
-    SmPointer	client_data UNUSED;
+xsmp_shutdown_cancelled(
+    SmcConn	smc_conn,
+    SmPointer	client_data UNUSED)
 {
     if (xsmp.save_yourself)
 	SmcSaveYourselfDone(smc_conn, True);
@@ -7243,11 +7159,11 @@ xsmp_shutdown_cancelled(smc_conn, client
  * Callback to tell us that a new ICE connection has been established.
  */
     static void
-xsmp_ice_connection(iceConn, clientData, opening, watchData)
-    IceConn	iceConn;
-    IcePointer	clientData UNUSED;
-    Bool	opening;
-    IcePointer	*watchData UNUSED;
+xsmp_ice_connection(
+    IceConn	iceConn,
+    IcePointer	clientData UNUSED,
+    Bool	opening,
+    IcePointer	*watchData UNUSED)
 {
     /* Intercept creation of ICE connection fd */
     if (opening)
@@ -7260,7 +7176,7 @@ xsmp_ice_connection(iceConn, clientData,
 
 /* Handle any ICE processing that's required; return FAIL if SM lost */
     int
-xsmp_handle_requests()
+xsmp_handle_requests(void)
 {
     Bool rep;
 
@@ -7359,7 +7275,7 @@ xsmp_init(void)
 
 /* Shut down XSMP comms. */
     void
-xsmp_close()
+xsmp_close(void)
 {
     if (xsmp_icefd != -1)
     {
--- a/src/os_vms.c
+++ b/src/os_vms.c
@@ -723,10 +723,10 @@ struct typeahead_st {
  * "msec" == -1 will block until a character is available.
  */
     int
-RealWaitForChar(fd, msec, check_for_gpm)
-    int		fd UNUSED; /* always read from iochan */
-    long	msec;
-    int		*check_for_gpm UNUSED;
+RealWaitForChar(
+    int		fd UNUSED, /* always read from iochan */
+    long	msec,
+    int		*check_for_gpm UNUSED)
 {
     int status;
     struct _generic_64 time_curr;
--- a/src/os_win16.c
+++ b/src/os_win16.c
@@ -156,7 +156,7 @@ mch_setmouse(
  * GUI version of mch_init().
  */
     void
-mch_init()
+mch_init(void)
 {
     extern int _fmode;
 
@@ -206,7 +206,7 @@ mch_check_win(
  * return process ID
  */
     long
-mch_get_pid()
+mch_get_pid(void)
 {
     return (long)GetCurrentTask();
 }
@@ -379,7 +379,7 @@ mch_delay(
  * check for an "interrupt signal": CTRL-break or CTRL-C
  */
     void
-mch_breakcheck()
+mch_breakcheck(void)
 {
     /* never used */
 }
@@ -417,7 +417,7 @@ mch_rename(
  * Get the default shell for the current hardware platform
  */
     char*
-default_shell()
+default_shell(void)
 {
     char* psz = NULL;
 
--- a/src/os_win32.c
+++ b/src/os_win32.c
@@ -481,7 +481,7 @@ char *(*dyn_libintl_bind_textdomain_code
 				       = null_libintl_bind_textdomain_codeset;
 
     int
-dyn_libintl_init()
+dyn_libintl_init(void)
 {
     int i;
     static struct
@@ -543,7 +543,7 @@ dyn_libintl_init()
 }
 
     void
-dyn_libintl_end()
+dyn_libintl_end(void)
 {
     if (hLibintlDLL)
 	FreeLibrary(hLibintlDLL);
--- a/src/popupmnu.c
+++ b/src/popupmnu.c
@@ -42,10 +42,10 @@ static int pum_set_selected(int n, int r
  * The menu appears above the screen line "row" or at "row" + "height" - 1.
  */
     void
-pum_display(array, size, selected)
-    pumitem_T	*array;
-    int		size;
-    int		selected;	/* index of initially selected item, none if
+pum_display(
+    pumitem_T	*array,
+    int		size,
+    int		selected)	/* index of initially selected item, none if
 				   out of range */
 {
     int		w;
@@ -263,7 +263,7 @@ redo:
  * Redraw the popup menu, using "pum_first" and "pum_selected".
  */
     void
-pum_redraw()
+pum_redraw(void)
 {
     int		row = pum_row;
     int		col;
@@ -487,9 +487,7 @@ pum_redraw()
  * must be recomputed.
  */
     static int
-pum_set_selected(n, repeat)
-    int	    n;
-    int	    repeat;
+pum_set_selected(int n, int repeat)
 {
     int	    resized = FALSE;
     int	    context = pum_height / 2;
@@ -704,7 +702,7 @@ pum_set_selected(n, repeat)
  * Undisplay the popup menu (later).
  */
     void
-pum_undisplay()
+pum_undisplay(void)
 {
     pum_array = NULL;
     redraw_all_later(SOME_VALID);
@@ -719,7 +717,7 @@ pum_undisplay()
  * displayed item.
  */
     void
-pum_clear()
+pum_clear(void)
 {
     pum_first = 0;
 }
@@ -729,7 +727,7 @@ pum_clear()
  * Overruled when "pum_do_redraw" is set, used to redraw the status lines.
  */
     int
-pum_visible()
+pum_visible(void)
 {
     return !pum_do_redraw && pum_array != NULL;
 }
@@ -739,7 +737,7 @@ pum_visible()
  * Only valid when pum_visible() returns TRUE!
  */
     int
-pum_get_height()
+pum_get_height(void)
 {
     return pum_height;
 }
--- a/src/pty.c
+++ b/src/pty.c
@@ -134,8 +134,7 @@ static void initmaster(int);
 #endif
 
     static void
-initmaster(f)
-    int f UNUSED;
+initmaster(int f UNUSED)
 {
 #ifndef VMS
 # ifdef POSIX
@@ -156,8 +155,7 @@ initmaster(f)
  * pty on others.  Needs to be tuned...
  */
     int
-SetupSlavePTY(fd)
-    int fd;
+SetupSlavePTY(int fd)
 {
     if (fd < 0)
 	return 0;
@@ -180,8 +178,7 @@ SetupSlavePTY(fd)
 #if defined(OSX) && !defined(PTY_DONE)
 #define PTY_DONE
     int
-OpenPTY(ttyn)
-    char **ttyn;
+OpenPTY(char **ttyn)
 {
     int		f;
     static char TtyName[32];
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -153,12 +153,12 @@ static qf_info_T *ll_get_or_alloc_list(w
  * Return -1 for error, number of errors for success.
  */
     int
-qf_init(wp, efile, errorformat, newlist, qf_title)
-    win_T	    *wp;
-    char_u	    *efile;
-    char_u	    *errorformat;
-    int		    newlist;		/* TRUE: start a new error list */
-    char_u	    *qf_title;
+qf_init(
+    win_T	    *wp,
+    char_u	    *efile,
+    char_u	    *errorformat,
+    int		    newlist,		/* TRUE: start a new error list */
+    char_u	    *qf_title)
 {
     qf_info_T	    *qi = &ql_info;
 
@@ -184,17 +184,16 @@ qf_init(wp, efile, errorformat, newlist,
  * Return -1 for error, number of errors for success.
  */
     static int
-qf_init_ext(qi, efile, buf, tv, errorformat, newlist, lnumfirst, lnumlast,
-								     qf_title)
-    qf_info_T	    *qi;
-    char_u	    *efile;
-    buf_T	    *buf;
-    typval_T	    *tv;
-    char_u	    *errorformat;
-    int		    newlist;		/* TRUE: start a new error list */
-    linenr_T	    lnumfirst;		/* first line number to use */
-    linenr_T	    lnumlast;		/* last line number to use */
-    char_u	    *qf_title;
+qf_init_ext(
+    qf_info_T	    *qi,
+    char_u	    *efile,
+    buf_T	    *buf,
+    typval_T	    *tv,
+    char_u	    *errorformat,
+    int		    newlist,		/* TRUE: start a new error list */
+    linenr_T	    lnumfirst,		/* first line number to use */
+    linenr_T	    lnumlast,		/* last line number to use */
+    char_u	    *qf_title)
 {
     char_u	    *namebuf;
     char_u	    *errmsg;
@@ -887,9 +886,7 @@ qf_init_end:
 }
 
     static void
-qf_store_title(qi, title)
-    qf_info_T	*qi;
-    char_u	*title;
+qf_store_title(qf_info_T *qi, char_u *title)
 {
     if (title != NULL)
     {
@@ -905,9 +902,7 @@ qf_store_title(qi, title)
  * Prepare for adding a new quickfix list.
  */
     static void
-qf_new_list(qi, qf_title)
-    qf_info_T	*qi;
-    char_u	*qf_title;
+qf_new_list(qf_info_T *qi, char_u *qf_title)
 {
     int		i;
 
@@ -940,8 +935,7 @@ qf_new_list(qi, qf_title)
  * Free a location list
  */
     static void
-ll_free_all(pqi)
-    qf_info_T	**pqi;
+ll_free_all(qf_info_T **pqi)
 {
     int		i;
     qf_info_T	*qi;
@@ -962,8 +956,7 @@ ll_free_all(pqi)
 }
 
     void
-qf_free_all(wp)
-    win_T	*wp;
+qf_free_all(win_T *wp)
 {
     int		i;
     qf_info_T	*qi = &ql_info;
@@ -985,21 +978,20 @@ qf_free_all(wp)
  * Returns OK or FAIL.
  */
     static int
-qf_add_entry(qi, prevp, dir, fname, bufnum, mesg, lnum, col, vis_col, pattern,
-	     nr, type, valid)
-    qf_info_T	*qi;		/* quickfix list */
-    qfline_T	**prevp;	/* pointer to previously added entry or NULL */
-    char_u	*dir;		/* optional directory name */
-    char_u	*fname;		/* file name or NULL */
-    int		bufnum;		/* buffer number or zero */
-    char_u	*mesg;		/* message */
-    long	lnum;		/* line number */
-    int		col;		/* column */
-    int		vis_col;	/* using visual column */
-    char_u	*pattern;	/* search pattern */
-    int		nr;		/* error number */
-    int		type;		/* type character */
-    int		valid;		/* valid entry */
+qf_add_entry(
+    qf_info_T	*qi,		/* quickfix list */
+    qfline_T	**prevp,	/* pointer to previously added entry or NULL */
+    char_u	*dir,		/* optional directory name */
+    char_u	*fname,		/* file name or NULL */
+    int		bufnum,		/* buffer number or zero */
+    char_u	*mesg,		/* message */
+    long	lnum,		/* line number */
+    int		col,		/* column */
+    int		vis_col,	/* using visual column */
+    char_u	*pattern,	/* search pattern */
+    int		nr,		/* error number */
+    int		type,		/* type character */
+    int		valid)		/* valid entry */
 {
     qfline_T	*qfp;
 
@@ -1061,7 +1053,7 @@ qf_add_entry(qi, prevp, dir, fname, bufn
  * Allocate a new location list
  */
     static qf_info_T *
-ll_new_list()
+ll_new_list(void)
 {
     qf_info_T *qi;
 
@@ -1080,8 +1072,7 @@ ll_new_list()
  * If not present, allocate a location list
  */
     static qf_info_T *
-ll_get_or_alloc_list(wp)
-    win_T   *wp;
+ll_get_or_alloc_list(win_T *wp)
 {
     if (IS_LL_WINDOW(wp))
 	/* For a location list window, use the referenced location list */
@@ -1102,9 +1093,7 @@ ll_get_or_alloc_list(wp)
  * Copy the location list from window "from" to window "to".
  */
     void
-copy_loclist(from, to)
-    win_T	*from;
-    win_T	*to;
+copy_loclist(win_T *from, win_T *to)
 {
     qf_info_T	*qi;
     int		idx;
@@ -1206,9 +1195,7 @@ copy_loclist(from, to)
  * get buffer number for file "dir.name"
  */
     static int
-qf_get_fnum(directory, fname)
-    char_u   *directory;
-    char_u   *fname;
+qf_get_fnum(char_u *directory, char_u *fname)
 {
     if (fname == NULL || *fname == NUL)		/* no file name */
 	return 0;
@@ -1256,9 +1243,7 @@ qf_get_fnum(directory, fname)
  * NULL on error
  */
     static char_u *
-qf_push_dir(dirbuf, stackptr)
-    char_u		*dirbuf;
-    struct dir_stack_T	**stackptr;
+qf_push_dir(char_u *dirbuf, struct dir_stack_T **stackptr)
 {
     struct dir_stack_T  *ds_new;
     struct dir_stack_T  *ds_ptr;
@@ -1329,8 +1314,7 @@ qf_push_dir(dirbuf, stackptr)
  * stack is empty
  */
     static char_u *
-qf_pop_dir(stackptr)
-    struct dir_stack_T	**stackptr;
+qf_pop_dir(struct dir_stack_T **stackptr)
 {
     struct dir_stack_T  *ds_ptr;
 
@@ -1354,8 +1338,7 @@ qf_pop_dir(stackptr)
  * clean up directory stack
  */
     static void
-qf_clean_dir_stack(stackptr)
-    struct dir_stack_T	**stackptr;
+qf_clean_dir_stack(struct dir_stack_T **stackptr)
 {
     struct dir_stack_T  *ds_ptr;
 
@@ -1388,8 +1371,7 @@ qf_clean_dir_stack(stackptr)
  * qf_guess_filepath will return NULL.
  */
     static char_u *
-qf_guess_filepath(filename)
-    char_u *filename;
+qf_guess_filepath(char_u *filename)
 {
     struct dir_stack_T     *ds_ptr;
     struct dir_stack_T     *ds_tmp;
@@ -1440,11 +1422,11 @@ qf_guess_filepath(filename)
  * else go to entry "errornr"
  */
     void
-qf_jump(qi, dir, errornr, forceit)
-    qf_info_T	*qi;
-    int		dir;
-    int		errornr;
-    int		forceit;
+qf_jump(
+    qf_info_T	*qi,
+    int		dir,
+    int		errornr,
+    int		forceit)
 {
     qf_info_T		*ll_ref;
     qfline_T		*qf_ptr;
@@ -1954,8 +1936,7 @@ theend:
  * ":llist": list all locations
  */
     void
-qf_list(eap)
-    exarg_T	*eap;
+qf_list(exarg_T *eap)
 {
     buf_T	*buf;
     char_u	*fname;
@@ -2060,10 +2041,7 @@ qf_list(eap)
  * Put the result in "buf[bufsize]".
  */
     static void
-qf_fmt_text(text, buf, bufsize)
-    char_u	*text;
-    char_u	*buf;
-    int		bufsize;
+qf_fmt_text(char_u *text, char_u *buf, int bufsize)
 {
     int		i;
     char_u	*p = text;
@@ -2090,8 +2068,7 @@ qf_fmt_text(text, buf, bufsize)
  * ":lnewer [count]": Down in the location list stack.
  */
     void
-qf_age(eap)
-    exarg_T	*eap;
+qf_age(exarg_T *eap)
 {
     qf_info_T	*qi = &ql_info;
     int		count;
@@ -2135,8 +2112,7 @@ qf_age(eap)
 }
 
     static void
-qf_msg(qi)
-    qf_info_T	*qi;
+qf_msg(qf_info_T *qi)
 {
     smsg((char_u *)_("error list %d of %d; %d errors"),
 	    qi->qf_curlist + 1, qi->qf_listcount,
@@ -2150,9 +2126,7 @@ qf_msg(qi)
  * Free error list "idx".
  */
     static void
-qf_free(qi, idx)
-    qf_info_T	*qi;
-    int		idx;
+qf_free(qf_info_T *qi, int idx)
 {
     qfline_T	*qfp;
     int		stop = FALSE;
@@ -2184,12 +2158,12 @@ qf_free(qi, idx)
  * qf_mark_adjust: adjust marks
  */
    void
-qf_mark_adjust(wp, line1, line2, amount, amount_after)
-    win_T	*wp;
-    linenr_T	line1;
-    linenr_T	line2;
-    long	amount;
-    long	amount_after;
+qf_mark_adjust(
+    win_T	*wp,
+    linenr_T	line1,
+    linenr_T	line2,
+    long	amount,
+    long	amount_after)
 {
     int		i;
     qfline_T	*qfp;
@@ -2237,8 +2211,7 @@ qf_mark_adjust(wp, line1, line2, amount,
  *  1	      x		""	:helpgrep
  */
     static char_u *
-qf_types(c, nr)
-    int c, nr;
+qf_types(int c, int nr)
 {
     static char_u	buf[20];
     static char_u	cc[3];
@@ -2275,8 +2248,7 @@ qf_types(c, nr)
  *	       close it if not.
  */
     void
-ex_cwindow(eap)
-    exarg_T	*eap;
+ex_cwindow(exarg_T *eap)
 {
     qf_info_T	*qi = &ql_info;
     win_T	*win;
@@ -2312,8 +2284,7 @@ ex_cwindow(eap)
  * ":lclose": close the window showing the location list
  */
     void
-ex_cclose(eap)
-    exarg_T	*eap;
+ex_cclose(exarg_T *eap)
 {
     win_T	*win = NULL;
     qf_info_T	*qi = &ql_info;
@@ -2336,8 +2307,7 @@ ex_cclose(eap)
  * ":lopen": open a window that shows the location list.
  */
     void
-ex_copen(eap)
-    exarg_T	*eap;
+ex_copen(exarg_T *eap)
 {
     qf_info_T	*qi = &ql_info;
     int		height;
@@ -2470,8 +2440,7 @@ ex_copen(eap)
  * window).
  */
      linenr_T
-qf_current_entry(wp)
-    win_T	*wp;
+qf_current_entry(win_T *wp)
 {
     qf_info_T	*qi = &ql_info;
 
@@ -2487,9 +2456,9 @@ qf_current_entry(wp)
  * Return TRUE if there is a quickfix window.
  */
     static int
-qf_win_pos_update(qi, old_qf_index)
-    qf_info_T	*qi;
-    int		old_qf_index;	/* previous qf_index or zero */
+qf_win_pos_update(
+    qf_info_T	*qi,
+    int		old_qf_index)	/* previous qf_index or zero */
 {
     win_T	*win;
     int		qf_index = qi->qf_lists[qi->qf_curlist].qf_index;
@@ -2533,9 +2502,7 @@ qf_win_pos_update(qi, old_qf_index)
  * list buffer
  */
     static int
-is_qf_win(win, qi)
-    win_T	*win;
-    qf_info_T	*qi;
+is_qf_win(win_T *win, qf_info_T *qi)
 {
     /*
      * A window displaying the quickfix buffer will have the w_llist_ref field
@@ -2556,8 +2523,7 @@ is_qf_win(win, qi)
  * Searches in only the windows opened in the current tab.
  */
     static win_T *
-qf_find_win(qi)
-    qf_info_T	*qi;
+qf_find_win(qf_info_T *qi)
 {
     win_T	*win;
 
@@ -2573,8 +2539,7 @@ qf_find_win(qi)
  * Searches in windows opened in all the tabs.
  */
     static buf_T *
-qf_find_buf(qi)
-    qf_info_T	*qi;
+qf_find_buf(qf_info_T *qi)
 {
     tabpage_T	*tp;
     win_T	*win;
@@ -2590,8 +2555,7 @@ qf_find_buf(qi)
  * Find the quickfix buffer.  If it exists, update the contents.
  */
     static void
-qf_update_buffer(qi)
-    qf_info_T	*qi;
+qf_update_buffer(qf_info_T *qi)
 {
     buf_T	*buf;
     win_T	*win;
@@ -2626,8 +2590,7 @@ qf_update_buffer(qi)
  * Set "w:quickfix_title" if "qi" has a title.
  */
     static void
-qf_set_title_var(qi)
-    qf_info_T	*qi;
+qf_set_title_var(qf_info_T *qi)
 {
     if (qi->qf_lists[qi->qf_curlist].qf_title != NULL)
 	set_internal_string_var((char_u *)"w:quickfix_title",
@@ -2639,8 +2602,7 @@ qf_set_title_var(qi)
  * curbuf must be the quickfix buffer!
  */
     static void
-qf_fill_buffer(qi)
-    qf_info_T	*qi;
+qf_fill_buffer(qf_info_T *qi)
 {
     linenr_T	lnum;
     qfline_T	*qfp;
@@ -2742,8 +2704,7 @@ qf_fill_buffer(qi)
  * Return TRUE if "buf" is the quickfix buffer.
  */
     int
-bt_quickfix(buf)
-    buf_T	*buf;
+bt_quickfix(buf_T *buf)
 {
     return buf != NULL && buf->b_p_bt[0] == 'q';
 }
@@ -2753,8 +2714,7 @@ bt_quickfix(buf)
  * This means the buffer name is not a file name.
  */
     int
-bt_nofile(buf)
-    buf_T	*buf;
+bt_nofile(buf_T *buf)
 {
     return buf != NULL && ((buf->b_p_bt[0] == 'n' && buf->b_p_bt[2] == 'f')
 	    || buf->b_p_bt[0] == 'a');
@@ -2764,15 +2724,13 @@ bt_nofile(buf)
  * Return TRUE if "buf" is a "nowrite" or "nofile" buffer.
  */
     int
-bt_dontwrite(buf)
-    buf_T	*buf;
+bt_dontwrite(buf_T *buf)
 {
     return buf != NULL && buf->b_p_bt[0] == 'n';
 }
 
     int
-bt_dontwrite_msg(buf)
-    buf_T	*buf;
+bt_dontwrite_msg(buf_T *buf)
 {
     if (bt_dontwrite(buf))
     {
@@ -2787,8 +2745,7 @@ bt_dontwrite_msg(buf)
  * and 'bufhidden'.
  */
     int
-buf_hide(buf)
-    buf_T	*buf;
+buf_hide(buf_T *buf)
 {
     /* 'bufhidden' overrules 'hidden' and ":hide", check it first */
     switch (buf->b_p_bh[0])
@@ -2805,8 +2762,7 @@ buf_hide(buf)
  * Return TRUE when using ":vimgrep" for ":grep".
  */
     int
-grep_internal(cmdidx)
-    cmdidx_T	cmdidx;
+grep_internal(cmdidx_T cmdidx)
 {
     return ((cmdidx == CMD_grep
 		|| cmdidx == CMD_lgrep
@@ -2820,8 +2776,7 @@ grep_internal(cmdidx)
  * Used for ":make", ":lmake", ":grep", ":lgrep", ":grepadd", and ":lgrepadd"
  */
     void
-ex_make(eap)
-    exarg_T	*eap;
+ex_make(exarg_T *eap)
 {
     char_u	*fname;
     char_u	*cmd;
@@ -2934,7 +2889,7 @@ ex_make(eap)
  * Returns NULL for error.
  */
     static char_u *
-get_mef_name()
+get_mef_name(void)
 {
     char_u	*p;
     char_u	*name;
@@ -2989,8 +2944,7 @@ get_mef_name()
  * Returns the number of valid entries in the current quickfix/location list.
  */
     int
-qf_get_size(eap)
-    exarg_T	*eap;
+qf_get_size(exarg_T *eap)
 {
     qf_info_T	*qi = &ql_info;
     qfline_T	*qfp;
@@ -3030,8 +2984,7 @@ qf_get_size(eap)
  * Returns 0 if there is an error.
  */
     int
-qf_get_cur_idx(eap)
-    exarg_T	*eap;
+qf_get_cur_idx(exarg_T *eap)
 {
     qf_info_T	*qi = &ql_info;
 
@@ -3051,8 +3004,7 @@ qf_get_cur_idx(eap)
  * entries). If no valid entries are in the list, then returns 1.
  */
     int
-qf_get_cur_valid_idx(eap)
-    exarg_T	*eap;
+qf_get_cur_valid_idx(exarg_T *eap)
 {
     qf_info_T	*qi = &ql_info;
     qf_list_T	*qfl;
@@ -3103,10 +3055,7 @@ qf_get_cur_valid_idx(eap)
  * For :cfdo and :lfdo returns the 'n'th valid file entry.
  */
     static int
-qf_get_nth_valid_entry(qi, n, fdo)
-    qf_info_T	*qi;
-    int		n;
-    int		fdo;
+qf_get_nth_valid_entry(qf_info_T *qi, int n, int fdo)
 {
     qf_list_T	*qfl = &qi->qf_lists[qi->qf_curlist];
     qfline_T	*qfp = qfl->qf_start;
@@ -3151,8 +3100,7 @@ qf_get_nth_valid_entry(qi, n, fdo)
  * ":cdo", ":ldo", ":cfdo" and ":lfdo"
  */
     void
-ex_cc(eap)
-    exarg_T	*eap;
+ex_cc(exarg_T *eap)
 {
     qf_info_T	*qi = &ql_info;
     int		errornr;
@@ -3203,8 +3151,7 @@ ex_cc(eap)
  * Also, used by ":cdo", ":ldo", ":cfdo" and ":lfdo" commands.
  */
     void
-ex_cnext(eap)
-    exarg_T	*eap;
+ex_cnext(exarg_T *eap)
 {
     qf_info_T	*qi = &ql_info;
     int		errornr;
@@ -3251,8 +3198,7 @@ ex_cnext(eap)
  * ":lfile"/":lgetfile"/":laddfile" commands.
  */
     void
-ex_cfile(eap)
-    exarg_T	*eap;
+ex_cfile(exarg_T *eap)
 {
     win_T	*wp = NULL;
     qf_info_T	*qi = &ql_info;
@@ -3334,8 +3280,7 @@ ex_cfile(eap)
  * ":lvimgrepadd {pattern} file(s)"
  */
     void
-ex_vimgrep(eap)
-    exarg_T	*eap;
+ex_vimgrep(exarg_T *eap)
 {
     regmmatch_T	regmatch;
     int		fcount;
@@ -3738,10 +3683,7 @@ theend:
  * Return a pointer to the char just past the pattern plus flags.
  */
     char_u *
-skip_vimgrep_pat(p, s, flags)
-    char_u  *p;
-    char_u  **s;
-    int	    *flags;
+skip_vimgrep_pat(char_u *p, char_u **s, int *flags)
 {
     int		c;
 
@@ -3790,8 +3732,7 @@ skip_vimgrep_pat(p, s, flags)
  * into account whether it is set locally or globally.
  */
     static void
-restore_start_dir(dirname_start)
-    char_u	*dirname_start;
+restore_start_dir(char_u *dirname_start)
 {
     char_u *dirname_now = alloc(MAXPATHL);
 
@@ -3825,10 +3766,10 @@ restore_start_dir(dirname_start)
  * Returns NULL if it fails.
  */
     static buf_T *
-load_dummy_buffer(fname, dirname_start, resulting_dir)
-    char_u	*fname;
-    char_u	*dirname_start;  /* in: old directory */
-    char_u	*resulting_dir;  /* out: new directory */
+load_dummy_buffer(
+    char_u	*fname,
+    char_u	*dirname_start,  /* in: old directory */
+    char_u	*resulting_dir)  /* out: new directory */
 {
     buf_T	*newbuf;
     buf_T	*newbuf_to_wipe = NULL;
@@ -3907,9 +3848,7 @@ load_dummy_buffer(fname, dirname_start, 
  * 'autochdir' option have changed it.
  */
     static void
-wipe_dummy_buffer(buf, dirname_start)
-    buf_T	*buf;
-    char_u	*dirname_start;
+wipe_dummy_buffer(buf_T *buf, char_u *dirname_start)
 {
     if (curbuf != buf)		/* safety check */
     {
@@ -3940,9 +3879,7 @@ wipe_dummy_buffer(buf, dirname_start)
  * 'autochdir' option have changed it.
  */
     static void
-unload_dummy_buffer(buf, dirname_start)
-    buf_T	*buf;
-    char_u	*dirname_start;
+unload_dummy_buffer(buf_T *buf, char_u *dirname_start)
 {
     if (curbuf != buf)		/* safety check */
     {
@@ -3958,9 +3895,7 @@ unload_dummy_buffer(buf, dirname_start)
  * Add each quickfix error to list "list" as a dictionary.
  */
     int
-get_errorlist(wp, list)
-    win_T	*wp;
-    list_T	*list;
+get_errorlist(win_T *wp, list_T *list)
 {
     qf_info_T	*qi = &ql_info;
     dict_T	*dict;
@@ -4018,11 +3953,11 @@ get_errorlist(wp, list)
  * of dictionaries. "title" will be copied to w:quickfix_title
  */
     int
-set_errorlist(wp, list, action, title)
-    win_T	*wp;
-    list_T	*list;
-    int		action;
-    char_u	*title;
+set_errorlist(
+    win_T	*wp,
+    list_T	*list,
+    int		action,
+    char_u	*title)
 {
     listitem_T	*li;
     dict_T	*d;
@@ -4146,8 +4081,7 @@ set_errorlist(wp, list, action, title)
  * ":[range]lgetbuffer [bufnr]" command.
  */
     void
-ex_cbuffer(eap)
-    exarg_T   *eap;
+ex_cbuffer(exarg_T *eap)
 {
     buf_T	*buf = NULL;
     qf_info_T	*qi = &ql_info;
@@ -4207,8 +4141,7 @@ ex_cbuffer(eap)
  * ":lexpr {expr}", ":lgetexpr {expr}", ":laddexpr {expr}" command.
  */
     void
-ex_cexpr(eap)
-    exarg_T	*eap;
+ex_cexpr(exarg_T *eap)
 {
     typval_T	*tv;
     qf_info_T	*qi = &ql_info;
@@ -4248,8 +4181,7 @@ ex_cexpr(eap)
  * ":helpgrep {pattern}"
  */
     void
-ex_helpgrep(eap)
-    exarg_T	*eap;
+ex_helpgrep(exarg_T *eap)
 {
     regmatch_T	regmatch;
     char_u	*save_cpo;
--- a/src/regexp.c
+++ b/src/regexp.c
@@ -259,8 +259,7 @@ static int no_Magic(int x);
 static int toggle_Magic(int x);
 
     static int
-no_Magic(x)
-    int		x;
+no_Magic(int x)
 {
     if (is_Magic(x))
 	return un_Magic(x);
@@ -268,8 +267,7 @@ no_Magic(x)
 }
 
     static int
-toggle_Magic(x)
-    int		x;
+toggle_Magic(int x)
 {
     if (is_Magic(x))
 	return un_Magic(x);
@@ -379,8 +377,7 @@ static char_u e_empty_sb[]  = N_("E70: E
  * Return MULTI_MULT if c is a multi "multi" operator.
  */
     static int
-re_multi_type(c)
-    int c;
+re_multi_type(int c)
 {
     if (c == Magic('@') || c == Magic('=') || c == Magic('?'))
 	return MULTI_ONE;
@@ -438,8 +435,7 @@ static void	init_class_tab(void);
  * Translate '\x' to its control character, except "\n", which is Magic.
  */
     static int
-backslash_trans(c)
-    int		c;
+backslash_trans(int c)
 {
     switch (c)
     {
@@ -457,8 +453,7 @@ backslash_trans(c)
  * recognized.  Otherwise "pp" is advanced to after the item.
  */
     static int
-get_char_class(pp)
-    char_u	**pp;
+get_char_class(char_u **pp)
 {
     static const char *(class_names[]) =
     {
@@ -527,7 +522,7 @@ static short	class_tab[256];
 #define	    RI_WHITE	0x100
 
     static void
-init_class_tab()
+init_class_tab(void)
 {
     int		i;
     static int	done = FALSE;
@@ -738,8 +733,7 @@ static regengine_T nfa_regengine;
  * Return TRUE if compiled regular expression "prog" can match a line break.
  */
     int
-re_multiline(prog)
-    regprog_T *prog;
+re_multiline(regprog_T *prog)
 {
     return (prog->regflags & RF_HASNL);
 }
@@ -749,8 +743,7 @@ re_multiline(prog)
  * position (pattern contains "\@<=" or "\@<!").
  */
     int
-re_lookbehind(prog)
-    regprog_T *prog;
+re_lookbehind(regprog_T *prog)
 {
     return (prog->regflags & RF_LOOKBH);
 }
@@ -761,8 +754,7 @@ re_lookbehind(prog)
  * recognized.  Otherwise "pp" is advanced to after the item.
  */
     static int
-get_equi_class(pp)
-    char_u	**pp;
+get_equi_class(char_u **pp)
 {
     int		c;
     int		l = 1;
@@ -819,8 +811,7 @@ char *EQUIVAL_CLASS_C[16] = {
  * NOTE: When changing this function, also change nfa_emit_equi_class()
  */
     static void
-reg_equi_class(c)
-    int	    c;
+reg_equi_class(int c)
 {
 #ifdef FEAT_MBYTE
     if (enc_utf8 || STRCMP(p_enc, "latin1") == 0
@@ -1150,8 +1141,7 @@ reg_equi_class(c)
  * Currently only single characters are recognized!
  */
     static int
-get_coll_element(pp)
-    char_u	**pp;
+get_coll_element(char_u **pp)
 {
     int		c;
     int		l = 1;
@@ -1183,7 +1173,7 @@ static int reg_cpo_lit; /* 'cpoptions' c
 static int reg_cpo_bsl; /* 'cpoptions' contains '\' flag */
 
     static void
-get_cpo_flags()
+get_cpo_flags(void)
 {
     reg_cpo_lit = vim_strchr(p_cpo, CPO_LITERAL) != NULL;
     reg_cpo_bsl = vim_strchr(p_cpo, CPO_BACKSL) != NULL;
@@ -1195,8 +1185,7 @@ get_cpo_flags()
  * The returned pointer is on the matching ']', or the terminating NUL.
  */
     static char_u *
-skip_anyof(p)
-    char_u	*p;
+skip_anyof(char_u *p)
 {
 #ifdef FEAT_MBYTE
     int		l;
@@ -1249,11 +1238,11 @@ skip_anyof(p)
  * is changed in-place.
  */
     char_u *
-skip_regexp(startp, dirc, magic, newp)
-    char_u	*startp;
-    int		dirc;
-    int		magic;
-    char_u	**newp;
+skip_regexp(
+    char_u	*startp,
+    int		dirc,
+    int		magic,
+    char_u	**newp)
 {
     int		mymagic;
     char_u	*p = startp;
@@ -1327,9 +1316,7 @@ static void bt_regfree(regprog_T *prog);
  * "re_flags": RE_MAGIC and/or RE_STRING.
  */
     static regprog_T *
-bt_regcomp(expr, re_flags)
-    char_u	*expr;
-    int		re_flags;
+bt_regcomp(char_u *expr, int re_flags)
 {
     bt_regprog_T    *r;
     char_u	*scan;
@@ -1464,8 +1451,7 @@ bt_regcomp(expr, re_flags)
  * Free a compiled regexp program, returned by bt_regcomp().
  */
     static void
-bt_regfree(prog)
-    regprog_T   *prog;
+bt_regfree(regprog_T *prog)
 {
     vim_free(prog);
 }
@@ -1474,9 +1460,9 @@ bt_regfree(prog)
  * Setup to parse the regexp.  Used once to get the length and once to do it.
  */
     static void
-regcomp_start(expr, re_flags)
-    char_u	*expr;
-    int		re_flags;	    /* see vim_regcomp() */
+regcomp_start(
+    char_u	*expr,
+    int		re_flags)	    /* see vim_regcomp() */
 {
     initchr(expr);
     if (re_flags & RE_MAGIC)
@@ -1508,7 +1494,7 @@ regcomp_start(expr, re_flags)
  * found.  This is messy, but it works fine.
  */
     int
-vim_regcomp_had_eol()
+vim_regcomp_had_eol(void)
 {
     return had_eol;
 }
@@ -1524,9 +1510,9 @@ vim_regcomp_had_eol()
  * follows makes it hard to avoid.
  */
     static char_u *
-reg(paren, flagp)
-    int		paren;	/* REG_NOPAREN, REG_PAREN, REG_NPAREN or REG_ZPAREN */
-    int		*flagp;
+reg(
+    int		paren,	/* REG_NOPAREN, REG_PAREN, REG_NPAREN or REG_ZPAREN */
+    int		*flagp)
 {
     char_u	*ret;
     char_u	*br;
@@ -1639,8 +1625,7 @@ reg(paren, flagp)
  * Implements the & operator.
  */
     static char_u *
-regbranch(flagp)
-    int		*flagp;
+regbranch(int *flagp)
 {
     char_u	*ret;
     char_u	*chain = NULL;
@@ -1682,8 +1667,7 @@ regbranch(flagp)
  * Implements the concatenation operator.
  */
     static char_u *
-regconcat(flagp)
-    int		*flagp;
+regconcat(int *flagp)
 {
     char_u	*first = NULL;
     char_u	*chain = NULL;
@@ -1767,8 +1751,7 @@ regconcat(flagp)
  * endmarker role is not redundant.
  */
     static char_u *
-regpiece(flagp)
-    int		    *flagp;
+regpiece(int *flagp)
 {
     char_u	    *ret;
     int		    op;
@@ -1928,8 +1911,7 @@ static int	classcodes[] = {
  * faster to run.  Don't do this when one_exactly is set.
  */
     static char_u *
-regatom(flagp)
-    int		   *flagp;
+regatom(int *flagp)
 {
     char_u	    *ret;
     int		    flags;
@@ -2743,8 +2725,7 @@ do_multibyte:
  * character "c".
  */
     static int
-use_multibytecode(c)
-    int c;
+use_multibytecode(int c)
 {
     return has_mbyte && (*mb_char2len)(c) > 1
 		     && (re_multi_type(peekchr()) != NOT_MULTI
@@ -2757,8 +2738,7 @@ use_multibytecode(c)
  * Return pointer to generated code.
  */
     static char_u *
-regnode(op)
-    int		op;
+regnode(int op)
 {
     char_u  *ret;
 
@@ -2778,8 +2758,7 @@ regnode(op)
  * Emit (if appropriate) a byte of code
  */
     static void
-regc(b)
-    int		b;
+regc(int b)
 {
     if (regcode == JUST_CALC_SIZE)
 	regsize++;
@@ -2792,8 +2771,7 @@ regc(b)
  * Emit (if appropriate) a multi-byte character of code
  */
     static void
-regmbc(c)
-    int		c;
+regmbc(int c)
 {
     if (!has_mbyte && c > 0xff)
 	return;
@@ -2810,9 +2788,7 @@ regmbc(c)
  * Means relocating the operand.
  */
     static void
-reginsert(op, opnd)
-    int		op;
-    char_u     *opnd;
+reginsert(int op, char_u *opnd)
 {
     char_u	*src;
     char_u	*dst;
@@ -2840,10 +2816,7 @@ reginsert(op, opnd)
  * Add a number to the operator.
  */
     static void
-reginsert_nr(op, val, opnd)
-    int		op;
-    long	val;
-    char_u	*opnd;
+reginsert_nr(int op, long val, char_u *opnd)
 {
     char_u	*src;
     char_u	*dst;
@@ -2874,11 +2847,11 @@ reginsert_nr(op, val, opnd)
  * Means relocating the operand.
  */
     static void
-reginsert_limits(op, minval, maxval, opnd)
-    int		op;
-    long	minval;
-    long	maxval;
-    char_u	*opnd;
+reginsert_limits(
+    int		op,
+    long	minval,
+    long	maxval,
+    char_u	*opnd)
 {
     char_u	*src;
     char_u	*dst;
@@ -2908,9 +2881,7 @@ reginsert_limits(op, minval, maxval, opn
  * Write a long as four bytes at "p" and return pointer to the next char.
  */
     static char_u *
-re_put_long(p, val)
-    char_u	*p;
-    long_u	val;
+re_put_long(char_u *p, long_u val)
 {
     *p++ = (char_u) ((val >> 24) & 0377);
     *p++ = (char_u) ((val >> 16) & 0377);
@@ -2923,9 +2894,7 @@ re_put_long(p, val)
  * Set the next-pointer at the end of a node chain.
  */
     static void
-regtail(p, val)
-    char_u	*p;
-    char_u	*val;
+regtail(char_u *p, char_u *val)
 {
     char_u	*scan;
     char_u	*temp;
@@ -2964,9 +2933,7 @@ regtail(p, val)
  * Like regtail, on item after a BRANCH; nop if none.
  */
     static void
-regoptail(p, val)
-    char_u	*p;
-    char_u	*val;
+regoptail(char_u *p, char_u *val)
 {
     /* When op is neither BRANCH nor BRACE_COMPLEX0-9, it is "operandless" */
     if (p == NULL || p == JUST_CALC_SIZE
@@ -2987,8 +2954,7 @@ static int	prev_at_start;  /* True when 
  * Start parsing at "str".
  */
     static void
-initchr(str)
-    char_u *str;
+initchr(char_u *str)
 {
     regparse = str;
     prevchr_len = 0;
@@ -3002,8 +2968,7 @@ initchr(str)
  * starts in the same state again.
  */
     static void
-save_parse_state(ps)
-    parse_state_T *ps;
+save_parse_state(parse_state_T *ps)
 {
     ps->regparse = regparse;
     ps->prevchr_len = prevchr_len;
@@ -3020,8 +2985,7 @@ save_parse_state(ps)
  * Restore a previously saved parse state.
  */
     static void
-restore_parse_state(ps)
-    parse_state_T *ps;
+restore_parse_state(parse_state_T *ps)
 {
     regparse = ps->regparse;
     prevchr_len = ps->prevchr_len;
@@ -3039,7 +3003,7 @@ restore_parse_state(ps)
  * Get the next character without advancing.
  */
     static int
-peekchr()
+peekchr(void)
 {
     static int	after_slash = FALSE;
 
@@ -3211,7 +3175,7 @@ peekchr()
  * Eat one lexed character.  Do this in a way that we can undo it.
  */
     static void
-skipchr()
+skipchr(void)
 {
     /* peekchr() eats a backslash, do the same here */
     if (*regparse == '\\')
@@ -3244,7 +3208,7 @@ skipchr()
  * prevchr and prevprevchr are also kept.
  */
     static void
-skipchr_keepstart()
+skipchr_keepstart(void)
 {
     int as = prev_at_start;
     int pr = prevchr;
@@ -3261,7 +3225,7 @@ skipchr_keepstart()
  * therefore we need a lexical analyzer.
  */
     static int
-getchr()
+getchr(void)
 {
     int chr = peekchr();
 
@@ -3273,7 +3237,7 @@ getchr()
  * put character back.  Works only once!
  */
     static void
-ungetchr()
+ungetchr(void)
 {
     nextchr = curchr;
     curchr = prevchr;
@@ -3296,8 +3260,7 @@ ungetchr()
  * 2 when reading a \%x20 sequence and 4 when reading a \%u20AC sequence.
  */
     static int
-gethexchrs(maxinputlen)
-    int		maxinputlen;
+gethexchrs(int maxinputlen)
 {
     int		nr = 0;
     int		c;
@@ -3323,7 +3286,7 @@ gethexchrs(maxinputlen)
  * current position. Return -1 for invalid.  Consumes all digits.
  */
     static int
-getdecchrs()
+getdecchrs(void)
 {
     int		nr = 0;
     int		c;
@@ -3354,7 +3317,7 @@ getdecchrs()
  *	   before-^  ^-after
  */
     static int
-getoctchrs()
+getoctchrs(void)
 {
     int		nr = 0;
     int		c;
@@ -3380,7 +3343,7 @@ getoctchrs()
  * When nothing is recognized return a backslash.
  */
     static int
-coll_get_char()
+coll_get_char(void)
 {
     int	    nr = -1;
 
@@ -3409,9 +3372,7 @@ coll_get_char()
  * missing, a very big number is the default.
  */
     static int
-read_limits(minval, maxval)
-    long	*minval;
-    long	*maxval;
+read_limits(long *minval, long *maxval)
 {
     int		reverse = FALSE;
     char_u	*first_char;
@@ -3694,7 +3655,7 @@ static garray_T	backpos = {0, 0, 0, 0, N
 
 #if defined(EXITFREE) || defined(PROTO)
     void
-free_regexp_stuff()
+free_regexp_stuff(void)
 {
     ga_clear(&regstack);
     ga_clear(&backpos);
@@ -3707,8 +3668,7 @@ free_regexp_stuff()
  * Get pointer to the line "lnum", which is relative to "reg_firstlnum".
  */
     static char_u *
-reg_getline(lnum)
-    linenr_T	lnum;
+reg_getline(linenr_T lnum)
 {
     /* when looking behind for a match/no-match lnum is negative.  But we
      * can't go before line 1 */
@@ -3744,11 +3704,11 @@ static int  bt_regexec_nl(regmatch_T *rm
  * Returns 0 for failure, number of lines contained in the match otherwise.
  */
     static int
-bt_regexec_nl(rmp, line, col, line_lbr)
-    regmatch_T	*rmp;
-    char_u	*line;	/* string to match against */
-    colnr_T	col;	/* column to start looking for match */
-    int		line_lbr;
+bt_regexec_nl(
+    regmatch_T	*rmp,
+    char_u	*line,	/* string to match against */
+    colnr_T	col,	/* column to start looking for match */
+    int		line_lbr)
 {
     reg_match = rmp;
     reg_mmatch = NULL;
@@ -3776,13 +3736,13 @@ static long bt_regexec_multi(regmmatch_T
  * match otherwise.
  */
     static long
-bt_regexec_multi(rmp, win, buf, lnum, col, tm)
-    regmmatch_T	*rmp;
-    win_T	*win;		/* window in which to search or NULL */
-    buf_T	*buf;		/* buffer in which to search */
-    linenr_T	lnum;		/* nr of line to start looking for match */
-    colnr_T	col;		/* column to start looking for match */
-    proftime_T	*tm;		/* timeout limit or NULL */
+bt_regexec_multi(
+    regmmatch_T	*rmp,
+    win_T	*win,		/* window in which to search or NULL */
+    buf_T	*buf,		/* buffer in which to search */
+    linenr_T	lnum,		/* nr of line to start looking for match */
+    colnr_T	col,		/* column to start looking for match */
+    proftime_T	*tm)		/* timeout limit or NULL */
 {
     reg_match = NULL;
     reg_mmatch = rmp;
@@ -3806,10 +3766,10 @@ bt_regexec_multi(rmp, win, buf, lnum, co
  * Returns 0 for failure, number of lines contained in the match otherwise.
  */
     static long
-bt_regexec_both(line, col, tm)
-    char_u	*line;
-    colnr_T	col;		/* column to start looking for match */
-    proftime_T	*tm UNUSED;	/* timeout limit or NULL */
+bt_regexec_both(
+    char_u	*line,
+    colnr_T	col,		/* column to start looking for match */
+    proftime_T	*tm UNUSED)	/* timeout limit or NULL */
 {
     bt_regprog_T    *prog;
     char_u	    *s;
@@ -4039,7 +3999,7 @@ static reg_extmatch_T *make_extmatch(voi
  * Create a new extmatch and mark it as referenced once.
  */
     static reg_extmatch_T *
-make_extmatch()
+make_extmatch(void)
 {
     reg_extmatch_T	*em;
 
@@ -4053,8 +4013,7 @@ make_extmatch()
  * Add a reference to an extmatch.
  */
     reg_extmatch_T *
-ref_extmatch(em)
-    reg_extmatch_T	*em;
+ref_extmatch(reg_extmatch_T *em)
 {
     if (em != NULL)
 	em->refcnt++;
@@ -4066,8 +4025,7 @@ ref_extmatch(em)
  * the info.
  */
     void
-unref_extmatch(em)
-    reg_extmatch_T	*em;
+unref_extmatch(reg_extmatch_T *em)
 {
     int i;
 
@@ -4085,9 +4043,7 @@ unref_extmatch(em)
  * Returns 0 for failure, number of lines contained in the match otherwise.
  */
     static long
-regtry(prog, col)
-    bt_regprog_T    *prog;
-    colnr_T	col;
+regtry(bt_regprog_T *prog, colnr_T col)
 {
     reginput = regline + col;
     need_clear_subexpr = TRUE;
@@ -4168,7 +4124,7 @@ static int reg_prev_class(void);
  * Get class of previous character.
  */
     static int
-reg_prev_class()
+reg_prev_class(void)
 {
     if (reginput > regline)
 	return mb_get_class_buf(reginput - 1
@@ -4183,7 +4139,7 @@ static int reg_match_visual(void);
  * Return TRUE if the current reginput position matches the Visual area.
  */
     static int
-reg_match_visual()
+reg_match_visual(void)
 {
     pos_T	top, bot;
     linenr_T    lnum;
@@ -4280,8 +4236,8 @@ static long	bl_maxval;
  * undefined state!
  */
     static int
-regmatch(scan)
-    char_u	*scan;		/* Current node. */
+regmatch(
+    char_u	*scan)		/* Current node. */
 {
   char_u	*next;		/* Next node. */
   int		op;
@@ -5768,9 +5724,7 @@ regmatch(scan)
  * Returns pointer to new item.  Returns NULL when out of memory.
  */
     static regitem_T *
-regstack_push(state, scan)
-    regstate_T	state;
-    char_u	*scan;
+regstack_push(regstate_T state, char_u *scan)
 {
     regitem_T	*rp;
 
@@ -5794,8 +5748,7 @@ regstack_push(state, scan)
  * Pop an item from the regstack.
  */
     static void
-regstack_pop(scan)
-    char_u	**scan;
+regstack_pop(char_u **scan)
 {
     regitem_T	*rp;
 
@@ -5810,9 +5763,9 @@ regstack_pop(scan)
  * Advances reginput (and reglnum) to just after the matched chars.
  */
     static int
-regrepeat(p, maxcount)
-    char_u	*p;
-    long	maxcount;   /* maximum number of matches allowed */
+regrepeat(
+    char_u	*p,
+    long	maxcount)   /* maximum number of matches allowed */
 {
     long	count = 0;
     char_u	*scan;
@@ -6207,8 +6160,7 @@ do_class:
  * there is an error.
  */
     static char_u *
-regnext(p)
-    char_u  *p;
+regnext(char_u *p)
 {
     int	    offset;
 
@@ -6230,7 +6182,7 @@ regnext(p)
  * Return TRUE if it's wrong.
  */
     static int
-prog_magic_wrong()
+prog_magic_wrong(void)
 {
     regprog_T	*prog;
 
@@ -6253,7 +6205,7 @@ prog_magic_wrong()
  * used (to increase speed).
  */
     static void
-cleanup_subexpr()
+cleanup_subexpr(void)
 {
     if (need_clear_subexpr)
     {
@@ -6274,7 +6226,7 @@ cleanup_subexpr()
 
 #ifdef FEAT_SYN_HL
     static void
-cleanup_zsubexpr()
+cleanup_zsubexpr(void)
 {
     if (need_clear_zsubexpr)
     {
@@ -6299,8 +6251,7 @@ cleanup_zsubexpr()
  * later by restore_subexpr().
  */
     static void
-save_subexpr(bp)
-    regbehind_T *bp;
+save_subexpr(regbehind_T *bp)
 {
     int i;
 
@@ -6329,8 +6280,7 @@ save_subexpr(bp)
  * Restore the subexpr from "bp".
  */
     static void
-restore_subexpr(bp)
-    regbehind_T *bp;
+restore_subexpr(regbehind_T *bp)
 {
     int i;
 
@@ -6358,7 +6308,7 @@ restore_subexpr(bp)
  * Advance reglnum, regline and reginput to the next line.
  */
     static void
-reg_nextline()
+reg_nextline(void)
 {
     regline = reg_getline(++reglnum);
     reginput = regline;
@@ -6369,9 +6319,7 @@ reg_nextline()
  * Save the input line and position in a regsave_T.
  */
     static void
-reg_save(save, gap)
-    regsave_T	*save;
-    garray_T	*gap;
+reg_save(regsave_T *save, garray_T *gap)
 {
     if (REG_MULTI)
     {
@@ -6387,9 +6335,7 @@ reg_save(save, gap)
  * Restore the input line and position from a regsave_T.
  */
     static void
-reg_restore(save, gap)
-    regsave_T	*save;
-    garray_T	*gap;
+reg_restore(regsave_T *save, garray_T *gap)
 {
     if (REG_MULTI)
     {
@@ -6411,8 +6357,7 @@ reg_restore(save, gap)
  * Return TRUE if current position is equal to saved position.
  */
     static int
-reg_save_equal(save)
-    regsave_T	*save;
+reg_save_equal(regsave_T *save)
 {
     if (REG_MULTI)
 	return reglnum == save->rs_u.pos.lnum
@@ -6428,9 +6373,7 @@ reg_save_equal(save)
  * depending on REG_MULTI.
  */
     static void
-save_se_multi(savep, posp)
-    save_se_T	*savep;
-    lpos_T	*posp;
+save_se_multi(save_se_T *savep, lpos_T *posp)
 {
     savep->se_u.pos = *posp;
     posp->lnum = reglnum;
@@ -6438,9 +6381,7 @@ save_se_multi(savep, posp)
 }
 
     static void
-save_se_one(savep, pp)
-    save_se_T	*savep;
-    char_u	**pp;
+save_se_one(save_se_T *savep, char_u **pp)
 {
     savep->se_u.ptr = *pp;
     *pp = reginput;
@@ -6450,9 +6391,7 @@ save_se_one(savep, pp)
  * Compare a number with the operand of RE_LNUM, RE_COL or RE_VCOL.
  */
     static int
-re_num_cmp(val, scan)
-    long_u	val;
-    char_u	*scan;
+re_num_cmp(long_u val, char_u *scan)
 {
     long_u  n = OPERAND_MIN(scan);
 
@@ -6470,12 +6409,12 @@ re_num_cmp(val, scan)
  * last line.
  */
     static int
-match_with_backref(start_lnum, start_col, end_lnum, end_col, bytelen)
-    linenr_T start_lnum;
-    colnr_T  start_col;
-    linenr_T end_lnum;
-    colnr_T  end_col;
-    int	     *bytelen;
+match_with_backref(
+    linenr_T start_lnum,
+    colnr_T  start_col,
+    linenr_T end_lnum,
+    colnr_T  end_col,
+    int	     *bytelen)
 {
     linenr_T	clnum = start_lnum;
     colnr_T	ccol = start_col;
@@ -6542,9 +6481,7 @@ match_with_backref(start_lnum, start_col
  * regdump - dump a regexp onto stdout in vaguely comprehensible form
  */
     static void
-regdump(pattern, r)
-    char_u	*pattern;
-    bt_regprog_T	*r;
+regdump(char_u *pattern, bt_regprog_T *r)
 {
     char_u  *s;
     int	    op = EXACTLY;	/* Arbitrary non-END op. */
@@ -6632,8 +6569,7 @@ regdump(pattern, r)
  * regprop - printable representation of opcode
  */
     static char_u *
-regprop(op)
-    char_u	   *op;
+regprop(char_u *op)
 {
     char	    *p;
     static char	    buf[50];
@@ -7016,8 +6952,7 @@ regprop(op)
  * Used in a place where no * or \+ can follow.
  */
     static int
-re_mult_next(what)
-    char *what;
+re_mult_next(char *what)
 {
     if (re_multi_type(peekchr()) == MULTI_MULT)
 	EMSG2_RET_FAIL(_("E888: (NFA regexp) cannot repeat %s"), what);
@@ -7087,8 +7022,7 @@ static decomp_T decomp_table[0xfb4f-0xfb
 };
 
     static void
-mb_decompose(c, c1, c2, c3)
-    int c, *c1, *c2, *c3;
+mb_decompose(int c, int *c1, int *c2, int *c3)
 {
     decomp_T d;
 
@@ -7113,9 +7047,7 @@ mb_decompose(c, c1, c2, c3)
  * Correct the length "*n" when composing characters are ignored.
  */
     static int
-cstrncmp(s1, s2, n)
-    char_u	*s1, *s2;
-    int		*n;
+cstrncmp(char_u *s1, char_u *s2, int *n)
 {
     int		result;
 
@@ -7169,9 +7101,7 @@ cstrncmp(s1, s2, n)
  * cstrchr: This function is used a lot for simple searches, keep it fast!
  */
     static char_u *
-cstrchr(s, c)
-    char_u	*s;
-    int		c;
+cstrchr(char_u *s, int c)
 {
     char_u	*p;
     int		cc;
@@ -7242,9 +7172,7 @@ static fptr_T do_Lower(int *, int);
 static int vim_regsub_both(char_u *source, char_u *dest, int copy, int magic, int backslash);
 
     static fptr_T
-do_upper(d, c)
-    int		*d;
-    int		c;
+do_upper(int *d, int c)
 {
     *d = MB_TOUPPER(c);
 
@@ -7252,9 +7180,7 @@ do_upper(d, c)
 }
 
     static fptr_T
-do_Upper(d, c)
-    int		*d;
-    int		c;
+do_Upper(int *d, int c)
 {
     *d = MB_TOUPPER(c);
 
@@ -7262,9 +7188,7 @@ do_Upper(d, c)
 }
 
     static fptr_T
-do_lower(d, c)
-    int		*d;
-    int		c;
+do_lower(int *d, int c)
 {
     *d = MB_TOLOWER(c);
 
@@ -7272,9 +7196,7 @@ do_lower(d, c)
 }
 
     static fptr_T
-do_Lower(d, c)
-    int		*d;
-    int		c;
+do_Lower(int *d, int c)
 {
     *d = MB_TOLOWER(c);
 
@@ -7294,9 +7216,7 @@ do_Lower(d, c)
  * The tildes are parsed once before the first call to vim_regsub().
  */
     char_u *
-regtilde(source, magic)
-    char_u	*source;
-    int		magic;
+regtilde(char_u *source, int magic)
 {
     char_u	*newsub = source;
     char_u	*tmpsub;
@@ -7389,13 +7309,13 @@ static int		submatch_line_lbr;
  * Returns the size of the replacement, including terminating NUL.
  */
     int
-vim_regsub(rmp, source, dest, copy, magic, backslash)
-    regmatch_T	*rmp;
-    char_u	*source;
-    char_u	*dest;
-    int		copy;
-    int		magic;
-    int		backslash;
+vim_regsub(
+    regmatch_T	*rmp,
+    char_u	*source,
+    char_u	*dest,
+    int		copy,
+    int		magic,
+    int		backslash)
 {
     reg_match = rmp;
     reg_mmatch = NULL;
@@ -7407,14 +7327,14 @@ vim_regsub(rmp, source, dest, copy, magi
 #endif
 
     int
-vim_regsub_multi(rmp, lnum, source, dest, copy, magic, backslash)
-    regmmatch_T	*rmp;
-    linenr_T	lnum;
-    char_u	*source;
-    char_u	*dest;
-    int		copy;
-    int		magic;
-    int		backslash;
+vim_regsub_multi(
+    regmmatch_T	*rmp,
+    linenr_T	lnum,
+    char_u	*source,
+    char_u	*dest,
+    int		copy,
+    int		magic,
+    int		backslash)
 {
     reg_match = NULL;
     reg_mmatch = rmp;
@@ -7426,12 +7346,12 @@ vim_regsub_multi(rmp, lnum, source, dest
 }
 
     static int
-vim_regsub_both(source, dest, copy, magic, backslash)
-    char_u	*source;
-    char_u	*dest;
-    int		copy;
-    int		magic;
-    int		backslash;
+vim_regsub_both(
+    char_u	*source,
+    char_u	*dest,
+    int		copy,
+    int		magic,
+    int		backslash)
 {
     char_u	*src;
     char_u	*dst;
@@ -7811,8 +7731,7 @@ static char_u *reg_getline_submatch(line
  * overwritten.
  */
     static char_u *
-reg_getline_submatch(lnum)
-    linenr_T	lnum;
+reg_getline_submatch(linenr_T lnum)
 {
     char_u *s;
     linenr_T save_first = reg_firstlnum;
@@ -7834,8 +7753,7 @@ reg_getline_submatch(lnum)
  * Returns NULL when not in a ":s" command and for a non-existing submatch.
  */
     char_u *
-reg_submatch(no)
-    int		no;
+reg_submatch(int no)
 {
     char_u	*retval = NULL;
     char_u	*s;
@@ -7929,8 +7847,7 @@ reg_submatch(no)
  * command, for a non-existing submatch and for any error.
  */
     list_T *
-reg_submatch_list(no)
-    int		no;
+reg_submatch_list(int no)
 {
     char_u	*s;
     linenr_T	slnum;
@@ -8040,9 +7957,7 @@ static char_u regname[][30] = {
  * Returns NULL for an error.
  */
     regprog_T *
-vim_regcomp(expr_arg, re_flags)
-    char_u	*expr_arg;
-    int		re_flags;
+vim_regcomp(char_u *expr_arg, int re_flags)
 {
     regprog_T   *prog = NULL;
     char_u	*expr = expr_arg;
@@ -8128,8 +8043,7 @@ vim_regcomp(expr_arg, re_flags)
  * Free a compiled regexp program, returned by vim_regcomp().
  */
     void
-vim_regfree(prog)
-    regprog_T   *prog;
+vim_regfree(regprog_T *prog)
 {
     if (prog != NULL)
 	prog->engine->regfree(prog);
@@ -8139,8 +8053,7 @@ vim_regfree(prog)
 static void report_re_switch(char_u *pat);
 
     static void
-report_re_switch(pat)
-    char_u *pat;
+report_re_switch(char_u *pat)
 {
     if (p_verbose > 0)
     {
@@ -8164,11 +8077,11 @@ static int vim_regexec_both(regmatch_T *
  * Return TRUE if there is a match, FALSE if not.
  */
     static int
-vim_regexec_both(rmp, line, col, nl)
-    regmatch_T	*rmp;
-    char_u	*line;  /* string to match against */
-    colnr_T	col;    /* column to start looking for match */
-    int		nl;
+vim_regexec_both(
+    regmatch_T	*rmp,
+    char_u	*line,  /* string to match against */
+    colnr_T	col,    /* column to start looking for match */
+    int		nl)
 {
     int result = rmp->regprog->engine->regexec_nl(rmp, line, col, nl);
 
@@ -8203,11 +8116,11 @@ vim_regexec_both(rmp, line, col, nl)
  * Return TRUE if there is a match, FALSE if not.
  */
     int
-vim_regexec_prog(prog, ignore_case, line, col)
-    regprog_T	**prog;
-    int		ignore_case;
-    char_u	*line;
-    colnr_T	col;
+vim_regexec_prog(
+    regprog_T	**prog,
+    int		ignore_case,
+    char_u	*line,
+    colnr_T	col)
 {
     int r;
     regmatch_T regmatch;
@@ -8224,10 +8137,7 @@ vim_regexec_prog(prog, ignore_case, line
  * Return TRUE if there is a match, FALSE if not.
  */
     int
-vim_regexec(rmp, line, col)
-    regmatch_T	*rmp;
-    char_u	*line;
-    colnr_T	col;
+vim_regexec(regmatch_T *rmp, char_u *line, colnr_T col)
 {
     return vim_regexec_both(rmp, line, col, FALSE);
 }
@@ -8240,10 +8150,7 @@ vim_regexec(rmp, line, col)
  * Return TRUE if there is a match, FALSE if not.
  */
     int
-vim_regexec_nl(rmp, line, col)
-    regmatch_T	*rmp;
-    char_u	*line;
-    colnr_T	col;
+vim_regexec_nl(regmatch_T *rmp, char_u *line, colnr_T col)
 {
     return vim_regexec_both(rmp, line, col, TRUE);
 }
@@ -8259,13 +8166,13 @@ vim_regexec_nl(rmp, line, col)
  * match otherwise.
  */
     long
-vim_regexec_multi(rmp, win, buf, lnum, col, tm)
-    regmmatch_T *rmp;
-    win_T       *win;           /* window in which to search or NULL */
-    buf_T       *buf;           /* buffer in which to search */
-    linenr_T    lnum;           /* nr of line to start looking for match */
-    colnr_T     col;            /* column to start looking for match */
-    proftime_T	*tm;		/* timeout limit or NULL */
+vim_regexec_multi(
+    regmmatch_T *rmp,
+    win_T       *win,           /* window in which to search or NULL */
+    buf_T       *buf,           /* buffer in which to search */
+    linenr_T    lnum,           /* nr of line to start looking for match */
+    colnr_T     col,            /* column to start looking for match */
+    proftime_T	*tm)		/* timeout limit or NULL */
 {
     int result = rmp->regprog->engine->regexec_multi(
 						rmp, win, buf, lnum, col, tm);
--- a/src/regexp_nfa.c
+++ b/src/regexp_nfa.c
@@ -332,9 +332,9 @@ static int failure_chance(nfa_state_T *s
  * Return OK on success, FAIL otherwise.
  */
     static int
-nfa_regcomp_start(expr, re_flags)
-    char_u	*expr;
-    int		re_flags;	    /* see vim_regcomp() */
+nfa_regcomp_start(
+    char_u	*expr,
+    int		re_flags)	    /* see vim_regcomp() */
 {
     size_t	postfix_size;
     int		nstate_max;
@@ -370,9 +370,7 @@ nfa_regcomp_start(expr, re_flags)
  * of the line.
  */
     static int
-nfa_get_reganch(start, depth)
-    nfa_state_T *start;
-    int		depth;
+nfa_get_reganch(nfa_state_T *start, int depth)
 {
     nfa_state_T *p = start;
 
@@ -434,9 +432,7 @@ nfa_get_reganch(start, depth)
  * at start of the match.
  */
     static int
-nfa_get_regstart(start, depth)
-    nfa_state_T *start;
-    int		depth;
+nfa_get_regstart(nfa_state_T *start, int depth)
 {
     nfa_state_T *p = start;
 
@@ -520,8 +516,7 @@ nfa_get_regstart(start, depth)
  * regstart.  Otherwise return NULL.
  */
     static char_u *
-nfa_get_match_text(start)
-    nfa_state_T *start;
+nfa_get_match_text(nfa_state_T *start)
 {
     nfa_state_T *p = start;
     int		len = 0;
@@ -564,7 +559,7 @@ nfa_get_match_text(start)
  * running above the estimated number of states.
  */
     static int
-realloc_post_list()
+realloc_post_list(void)
 {
     int   nstate_max = (int)(post_end - post_start);
     int   new_max = nstate_max + 1000;
@@ -594,10 +589,7 @@ realloc_post_list()
  * need to be interpreted as [a-zA-Z].
  */
     static int
-nfa_recognize_char_class(start, end, extra_newl)
-    char_u  *start;
-    char_u  *end;
-    int	    extra_newl;
+nfa_recognize_char_class(char_u *start, char_u *end, int extra_newl)
 {
 #   define CLASS_not		0x80
 #   define CLASS_af		0x40
@@ -744,8 +736,7 @@ nfa_recognize_char_class(start, end, ext
  * NOTE! When changing this function, also update reg_equi_class()
  */
     static int
-nfa_emit_equi_class(c)
-    int	    c;
+nfa_emit_equi_class(int c)
 {
 #define EMIT2(c)    EMIT(c); EMIT(NFA_CONCAT);
 #ifdef FEAT_MBYTE
@@ -1118,7 +1109,7 @@ nfa_emit_equi_class(c)
  *     or  \z( pattern \)
  */
     static int
-nfa_regatom()
+nfa_regatom(void)
 {
     int		c;
     int		charclass;
@@ -1890,7 +1881,7 @@ nfa_do_multibyte:
  *	or  atom  multi
  */
     static int
-nfa_regpiece()
+nfa_regpiece(void)
 {
     int		i;
     int		op;
@@ -2100,7 +2091,7 @@ nfa_regpiece()
  *	etc.
  */
     static int
-nfa_regconcat()
+nfa_regconcat(void)
 {
     int		cont = TRUE;
     int		first = TRUE;
@@ -2178,7 +2169,7 @@ nfa_regconcat()
  *		etc.
  */
     static int
-nfa_regbranch()
+nfa_regbranch(void)
 {
     int		ch;
     int		old_post_pos;
@@ -2225,8 +2216,8 @@ nfa_regbranch()
  *	etc.
  */
     static int
-nfa_reg(paren)
-    int		paren;	/* REG_NOPAREN, REG_PAREN, REG_NPAREN or REG_ZPAREN */
+nfa_reg(
+    int		paren)	/* REG_NOPAREN, REG_PAREN, REG_NPAREN or REG_ZPAREN */
 {
     int		parno = 0;
 
@@ -2293,8 +2284,7 @@ nfa_reg(paren)
 static char_u code[50];
 
     static void
-nfa_set_code(c)
-    int	    c;
+nfa_set_code(int c)
 {
     int	    addnl = FALSE;
 
@@ -2530,9 +2520,7 @@ static FILE *log_fd;
  * Print the postfix notation of the current regexp.
  */
     static void
-nfa_postfix_dump(expr, retval)
-    char_u  *expr;
-    int	    retval;
+nfa_postfix_dump(char_u *expr, int retval)
 {
     int *p;
     FILE *f;
@@ -2563,9 +2551,7 @@ nfa_postfix_dump(expr, retval)
  * Print the NFA starting with a root node "state".
  */
     static void
-nfa_print_state(debugf, state)
-    FILE *debugf;
-    nfa_state_T *state;
+nfa_print_state(FILE *debugf, nfa_state_T *state)
 {
     garray_T indent;
 
@@ -2576,10 +2562,7 @@ nfa_print_state(debugf, state)
 }
 
     static void
-nfa_print_state2(debugf, state, indent)
-    FILE *debugf;
-    nfa_state_T *state;
-    garray_T *indent;
+nfa_print_state2(FILE *debugf, nfa_state_T *state, garray_T *indent)
 {
     char_u  *p;
 
@@ -2640,8 +2623,7 @@ nfa_print_state2(debugf, state, indent)
  * Print the NFA state machine.
  */
     static void
-nfa_dump(prog)
-    nfa_regprog_T *prog;
+nfa_dump(nfa_regprog_T *prog)
 {
     FILE *debugf = fopen(NFA_REGEXP_DUMP_LOG, "a");
 
@@ -2668,7 +2650,7 @@ nfa_dump(prog)
  * Return the postfix string on success, NULL otherwise.
  */
     static int *
-re2post()
+re2post(void)
 {
     if (nfa_reg(REG_NOPAREN) == FAIL)
 	return NULL;
@@ -2691,10 +2673,7 @@ static nfa_state_T	*state_ptr; /* points
  * Allocate and initialize nfa_state_T.
  */
     static nfa_state_T *
-alloc_state(c, out, out1)
-    int		c;
-    nfa_state_T	*out;
-    nfa_state_T	*out1;
+alloc_state(int c, nfa_state_T *out, nfa_state_T *out1)
 {
     nfa_state_T *s;
 
@@ -2750,9 +2729,7 @@ static Frag_T st_pop(Frag_T **p, Frag_T 
  * Initialize a Frag_T struct and return it.
  */
     static Frag_T
-frag(start, out)
-    nfa_state_T	*start;
-    Ptrlist	*out;
+frag(nfa_state_T *start, Ptrlist *out)
 {
     Frag_T n;
 
@@ -2765,8 +2742,8 @@ frag(start, out)
  * Create singleton list containing just outp.
  */
     static Ptrlist *
-list1(outp)
-    nfa_state_T	**outp;
+list1(
+    nfa_state_T	**outp)
 {
     Ptrlist *l;
 
@@ -2779,9 +2756,7 @@ list1(outp)
  * Patch the list of states at out to point to start.
  */
     static void
-patch(l, s)
-    Ptrlist	*l;
-    nfa_state_T	*s;
+patch(Ptrlist *l, nfa_state_T *s)
 {
     Ptrlist *next;
 
@@ -2797,9 +2772,7 @@ patch(l, s)
  * Join the two lists l1 and l2, returning the combination.
  */
     static Ptrlist *
-append(l1, l2)
-    Ptrlist *l1;
-    Ptrlist *l2;
+append(Ptrlist *l1, Ptrlist *l2)
 {
     Ptrlist *oldl1;
 
@@ -2816,10 +2789,7 @@ append(l1, l2)
 static Frag_T empty;
 
     static void
-st_error(postfix, end, p)
-    int *postfix UNUSED;
-    int *end UNUSED;
-    int *p UNUSED;
+st_error(int *postfix UNUSED, int *end UNUSED, int *p UNUSED)
 {
 #ifdef NFA_REGEXP_ERROR_LOG
     FILE *df;
@@ -2868,10 +2838,7 @@ st_error(postfix, end, p)
  * Push an item onto the stack.
  */
     static void
-st_push(s, p, stack_end)
-    Frag_T s;
-    Frag_T **p;
-    Frag_T *stack_end;
+st_push(Frag_T s, Frag_T **p, Frag_T *stack_end)
 {
     Frag_T *stackp = *p;
 
@@ -2885,9 +2852,7 @@ st_push(s, p, stack_end)
  * Pop an item from the stack.
  */
     static Frag_T
-st_pop(p, stack)
-    Frag_T **p;
-    Frag_T *stack;
+st_pop(Frag_T **p, Frag_T *stack)
 {
     Frag_T *stackp;
 
@@ -2903,9 +2868,7 @@ st_pop(p, stack)
  * When unknown or unlimited return -1.
  */
     static int
-nfa_max_width(startstate, depth)
-    nfa_state_T *startstate;
-    int		depth;
+nfa_max_width(nfa_state_T *startstate, int depth)
 {
     int		    l, r;
     nfa_state_T	    *state = startstate;
@@ -3128,10 +3091,7 @@ nfa_max_width(startstate, depth)
  * Return the NFA start state on success, NULL otherwise.
  */
     static nfa_state_T *
-post2nfa(postfix, end, nfa_calc_size)
-    int		*postfix;
-    int		*end;
-    int		nfa_calc_size;
+post2nfa(int *postfix, int *end, int nfa_calc_size)
 {
     int		*p;
     int		mopen;
@@ -3667,8 +3627,7 @@ theend:
  * After building the NFA program, inspect it to add optimization hints.
  */
     static void
-nfa_postprocess(prog)
-    nfa_regprog_T   *prog;
+nfa_postprocess(nfa_regprog_T *prog)
 {
     int i;
     int c;
@@ -3801,8 +3760,7 @@ static void log_subexpr(regsub_T *sub);
 static char *pim_info(nfa_pim_T *pim);
 
     static void
-log_subsexpr(subs)
-    regsubs_T *subs;
+log_subsexpr(regsubs_T *subs)
 {
     log_subexpr(&subs->norm);
 # ifdef FEAT_SYN_HL
@@ -3812,8 +3770,7 @@ log_subsexpr(subs)
 }
 
     static void
-log_subexpr(sub)
-    regsub_T *sub;
+log_subexpr(regsub_T *sub)
 {
     int j;
 
@@ -3838,8 +3795,7 @@ log_subexpr(sub)
 }
 
     static char *
-pim_info(pim)
-    nfa_pim_T *pim;
+pim_info(nfa_pim_T *pim)
 {
     static char buf[30];
 
@@ -3879,9 +3835,7 @@ static void addstate_here(nfa_list_T *l,
  * Copy postponed invisible match info from "from" to "to".
  */
     static void
-copy_pim(to, from)
-    nfa_pim_T *to;
-    nfa_pim_T *from;
+copy_pim(nfa_pim_T *to, nfa_pim_T *from)
 {
     to->result = from->result;
     to->state = from->state;
@@ -3894,8 +3848,7 @@ copy_pim(to, from)
 }
 
     static void
-clear_sub(sub)
-    regsub_T *sub;
+clear_sub(regsub_T *sub)
 {
     if (REG_MULTI)
 	/* Use 0xff to set lnum to -1 */
@@ -3910,9 +3863,7 @@ clear_sub(sub)
  * Copy the submatches from "from" to "to".
  */
     static void
-copy_sub(to, from)
-    regsub_T	*to;
-    regsub_T	*from;
+copy_sub(regsub_T *to, regsub_T *from)
 {
     to->in_use = from->in_use;
     if (from->in_use > 0)
@@ -3933,9 +3884,7 @@ copy_sub(to, from)
  * Like copy_sub() but exclude the main match.
  */
     static void
-copy_sub_off(to, from)
-    regsub_T	*to;
-    regsub_T	*from;
+copy_sub_off(regsub_T *to, regsub_T *from)
 {
     if (to->in_use < from->in_use)
 	to->in_use = from->in_use;
@@ -3957,9 +3906,7 @@ copy_sub_off(to, from)
  * Like copy_sub() but only do the end of the main match if \ze is present.
  */
     static void
-copy_ze_off(to, from)
-    regsub_T	*to;
-    regsub_T	*from;
+copy_ze_off(regsub_T *to, regsub_T *from)
 {
     if (nfa_has_zend)
     {
@@ -3984,9 +3931,7 @@ copy_ze_off(to, from)
  * When using back-references also check the end position.
  */
     static int
-sub_equal(sub1, sub2)
-    regsub_T	*sub1;
-    regsub_T	*sub2;
+sub_equal(regsub_T *sub1, regsub_T *sub2)
 {
     int		i;
     int		todo;
@@ -4093,11 +4038,11 @@ report_state(char *action,
  * positions as "subs".
  */
     static int
-has_state_with_pos(l, state, subs, pim)
-    nfa_list_T		*l;	/* runtime state list */
-    nfa_state_T		*state;	/* state to update */
-    regsubs_T		*subs;	/* pointers to subexpressions */
-    nfa_pim_T		*pim;	/* postponed match or NULL */
+has_state_with_pos(
+    nfa_list_T		*l,	/* runtime state list */
+    nfa_state_T		*state,	/* state to update */
+    regsubs_T		*subs,	/* pointers to subexpressions */
+    nfa_pim_T		*pim)	/* postponed match or NULL */
 {
     nfa_thread_T	*thread;
     int			i;
@@ -4122,9 +4067,7 @@ has_state_with_pos(l, state, subs, pim)
  * set.
  */
     static int
-pim_equal(one, two)
-    nfa_pim_T *one;
-    nfa_pim_T *two;
+pim_equal(nfa_pim_T *one, nfa_pim_T *two)
 {
     int one_unused = (one == NULL || one->result == NFA_PIM_UNUSED);
     int two_unused = (two == NULL || two->result == NFA_PIM_UNUSED);
@@ -4149,9 +4092,7 @@ pim_equal(one, two)
  * Return TRUE if "state" leads to a NFA_MATCH without advancing the input.
  */
     static int
-match_follows(startstate, depth)
-    nfa_state_T *startstate;
-    int		depth;
+match_follows(nfa_state_T *startstate, int depth)
 {
     nfa_state_T	    *state = startstate;
 
@@ -4244,10 +4185,10 @@ match_follows(startstate, depth)
  * Return TRUE if "state" is already in list "l".
  */
     static int
-state_in_list(l, state, subs)
-    nfa_list_T		*l;	/* runtime state list */
-    nfa_state_T		*state;	/* state to update */
-    regsubs_T		*subs;	/* pointers to subexpressions */
+state_in_list(
+    nfa_list_T		*l,	/* runtime state list */
+    nfa_state_T		*state,	/* state to update */
+    regsubs_T		*subs)	/* pointers to subexpressions */
 {
     if (state->lastlist[nfa_ll_index] == l->id)
     {
@@ -4262,12 +4203,12 @@ state_in_list(l, state, subs)
  * Returns "subs_arg", possibly copied into temp_subs.
  */
     static regsubs_T *
-addstate(l, state, subs_arg, pim, off)
-    nfa_list_T		*l;	    /* runtime state list */
-    nfa_state_T		*state;	    /* state to update */
-    regsubs_T		*subs_arg;  /* pointers to subexpressions */
-    nfa_pim_T		*pim;	    /* postponed look-behind match */
-    int			off;	    /* byte offset, when -1 go to next line */
+addstate(
+    nfa_list_T		*l,	    /* runtime state list */
+    nfa_state_T		*state,	    /* state to update */
+    regsubs_T		*subs_arg,  /* pointers to subexpressions */
+    nfa_pim_T		*pim,	    /* postponed look-behind match */
+    int			off)	    /* byte offset, when -1 go to next line */
 {
     int			subidx;
     nfa_thread_T	*thread;
@@ -4678,12 +4619,12 @@ skip_add:
  * matters for alternatives.
  */
     static void
-addstate_here(l, state, subs, pim, ip)
-    nfa_list_T		*l;	/* runtime state list */
-    nfa_state_T		*state;	/* state to update */
-    regsubs_T		*subs;	/* pointers to subexpressions */
-    nfa_pim_T		*pim;   /* postponed look-behind match */
-    int			*ip;
+addstate_here(
+    nfa_list_T		*l,	/* runtime state list */
+    nfa_state_T		*state,	/* state to update */
+    regsubs_T		*subs,	/* pointers to subexpressions */
+    nfa_pim_T		*pim,   /* postponed look-behind match */
+    int			*ip)
 {
     int tlen = l->n;
     int count;
@@ -4749,9 +4690,7 @@ addstate_here(l, state, subs, pim, ip)
  * Check character class "class" against current character c.
  */
     static int
-check_char_class(class, c)
-    int		class;
-    int		c;
+check_char_class(int class, int c)
 {
     switch (class)
     {
@@ -4833,10 +4772,10 @@ check_char_class(class, c)
  * Return TRUE if it matches.
  */
     static int
-match_backref(sub, subidx, bytelen)
-    regsub_T	*sub;	    /* pointers to subexpressions */
-    int		subidx;
-    int		*bytelen;   /* out: length of match in bytes */
+match_backref(
+    regsub_T	*sub,	    /* pointers to subexpressions */
+    int		subidx,
+    int		*bytelen)   /* out: length of match in bytes */
 {
     int		len;
 
@@ -4900,9 +4839,9 @@ static int match_zref(int subidx, int *b
  * Return TRUE if it matches.
  */
     static int
-match_zref(subidx, bytelen)
-    int		subidx;
-    int		*bytelen;   /* out: length of match in bytes */
+match_zref(
+    int		subidx,
+    int		*bytelen)   /* out: length of match in bytes */
 {
     int		len;
 
@@ -4930,9 +4869,7 @@ match_zref(subidx, bytelen)
  * Only used for the recursive value lastlist[1].
  */
     static void
-nfa_save_listids(prog, list)
-    nfa_regprog_T   *prog;
-    int		    *list;
+nfa_save_listids(nfa_regprog_T *prog, int *list)
 {
     int		    i;
     nfa_state_T	    *p;
@@ -4951,9 +4888,7 @@ nfa_save_listids(prog, list)
  * Restore list IDs from "list" to all NFA states.
  */
     static void
-nfa_restore_listids(prog, list)
-    nfa_regprog_T   *prog;
-    int		    *list;
+nfa_restore_listids(nfa_regprog_T *prog, int *list)
 {
     int		    i;
     nfa_state_T	    *p;
@@ -4967,10 +4902,7 @@ nfa_restore_listids(prog, list)
 }
 
     static int
-nfa_re_num_cmp(val, op, pos)
-    long_u	val;
-    int		op;
-    long_u	pos;
+nfa_re_num_cmp(long_u val, int op, long_u pos)
 {
     if (op == 1) return pos > val;
     if (op == 2) return pos < val;
@@ -4986,13 +4918,13 @@ static int nfa_regmatch(nfa_regprog_T *p
  * position).
  */
     static int
-recursive_regmatch(state, pim, prog, submatch, m, listids)
-    nfa_state_T	    *state;
-    nfa_pim_T	    *pim;
-    nfa_regprog_T   *prog;
-    regsubs_T	    *submatch;
-    regsubs_T	    *m;
-    int		    **listids;
+recursive_regmatch(
+    nfa_state_T	    *state,
+    nfa_pim_T	    *pim,
+    nfa_regprog_T   *prog,
+    regsubs_T	    *submatch,
+    regsubs_T	    *m,
+    int		    **listids)
 {
     int		save_reginput_col = (int)(reginput - regline);
     int		save_reglnum = reglnum;
@@ -5168,9 +5100,7 @@ static long find_match_text(colnr_T star
  * specific character: 99
  */
     static int
-failure_chance(state, depth)
-    nfa_state_T *state;
-    int		depth;
+failure_chance(nfa_state_T *state, int depth)
 {
     int c = state->c;
     int l, r;
@@ -5330,9 +5260,7 @@ failure_chance(state, depth)
  * Skip until the char "c" we know a match must start with.
  */
     static int
-skip_to_start(c, colp)
-    int		c;
-    colnr_T	*colp;
+skip_to_start(int c, colnr_T *colp)
 {
     char_u *s;
 
@@ -5357,10 +5285,7 @@ skip_to_start(c, colp)
  * Returns zero for no match, 1 for a match.
  */
     static long
-find_match_text(startcol, regstart, match_text)
-    colnr_T startcol;
-    int	    regstart;
-    char_u  *match_text;
+find_match_text(colnr_T startcol, int regstart, char_u *match_text)
 {
     colnr_T col = startcol;
     int	    c1, c2;
@@ -5426,11 +5351,11 @@ find_match_text(startcol, regstart, matc
  * Note: Caller must ensure that: start != NULL.
  */
     static int
-nfa_regmatch(prog, start, submatch, m)
-    nfa_regprog_T	*prog;
-    nfa_state_T		*start;
-    regsubs_T		*submatch;
-    regsubs_T		*m;
+nfa_regmatch(
+    nfa_regprog_T	*prog,
+    nfa_state_T		*start,
+    regsubs_T		*submatch,
+    regsubs_T		*m)
 {
     int		result;
     size_t	size = 0;
@@ -6847,10 +6772,10 @@ theend:
  * Returns <= 0 for failure, number of lines contained in the match otherwise.
  */
     static long
-nfa_regtry(prog, col, tm)
-    nfa_regprog_T   *prog;
-    colnr_T	    col;
-    proftime_T	    *tm UNUSED;	/* timeout limit or NULL */
+nfa_regtry(
+    nfa_regprog_T   *prog,
+    colnr_T	    col,
+    proftime_T	    *tm UNUSED)	/* timeout limit or NULL */
 {
     int		i;
     regsubs_T	subs, m;
@@ -6986,10 +6911,10 @@ nfa_regtry(prog, col, tm)
  * Returns <= 0 for failure, number of lines contained in the match otherwise.
  */
     static long
-nfa_regexec_both(line, startcol, tm)
-    char_u	*line;
-    colnr_T	startcol;	/* column to start looking for match */
-    proftime_T	*tm;		/* timeout limit or NULL */
+nfa_regexec_both(
+    char_u	*line,
+    colnr_T	startcol,	/* column to start looking for match */
+    proftime_T	*tm)		/* timeout limit or NULL */
 {
     nfa_regprog_T   *prog;
     long	    retval = 0L;
@@ -7096,9 +7021,7 @@ theend:
  * Returns the program in allocated space.  Returns NULL for an error.
  */
     static regprog_T *
-nfa_regcomp(expr, re_flags)
-    char_u	*expr;
-    int		re_flags;
+nfa_regcomp(char_u *expr, int re_flags)
 {
     nfa_regprog_T	*prog = NULL;
     size_t		prog_size;
@@ -7208,8 +7131,7 @@ fail:
  * Free a compiled regexp program, returned by nfa_regcomp().
  */
     static void
-nfa_regfree(prog)
-    regprog_T   *prog;
+nfa_regfree(regprog_T *prog)
 {
     if (prog != NULL)
     {
@@ -7228,11 +7150,11 @@ nfa_regfree(prog)
  * Returns <= 0 for failure, number of lines contained in the match otherwise.
  */
     static int
-nfa_regexec_nl(rmp, line, col, line_lbr)
-    regmatch_T	*rmp;
-    char_u	*line;	/* string to match against */
-    colnr_T	col;	/* column to start looking for match */
-    int		line_lbr;
+nfa_regexec_nl(
+    regmatch_T	*rmp,
+    char_u	*line,	/* string to match against */
+    colnr_T	col,	/* column to start looking for match */
+    int		line_lbr)
 {
     reg_match = rmp;
     reg_mmatch = NULL;
@@ -7275,13 +7197,13 @@ nfa_regexec_nl(rmp, line, col, line_lbr)
  * FIXME if this behavior is not compatible.
  */
     static long
-nfa_regexec_multi(rmp, win, buf, lnum, col, tm)
-    regmmatch_T	*rmp;
-    win_T	*win;		/* window in which to search or NULL */
-    buf_T	*buf;		/* buffer in which to search */
-    linenr_T	lnum;		/* nr of line to start looking for match */
-    colnr_T	col;		/* column to start looking for match */
-    proftime_T	*tm;		/* timeout limit or NULL */
+nfa_regexec_multi(
+    regmmatch_T	*rmp,
+    win_T	*win,		/* window in which to search or NULL */
+    buf_T	*buf,		/* buffer in which to search */
+    linenr_T	lnum,		/* nr of line to start looking for match */
+    colnr_T	col,		/* column to start looking for match */
+    proftime_T	*tm)		/* timeout limit or NULL */
 {
     reg_match = NULL;
     reg_mmatch = rmp;
--- a/src/screen.c
+++ b/src/screen.c
@@ -191,16 +191,15 @@ static int screen_char_attr = 0;
  * e.g. if must_redraw is CLEAR, type NOT_VALID will do nothing.
  */
     void
-redraw_later(type)
-    int		type;
+redraw_later(int type)
 {
     redraw_win_later(curwin, type);
 }
 
     void
-redraw_win_later(wp, type)
-    win_T	*wp;
-    int		type;
+redraw_win_later(
+    win_T	*wp,
+    int		type)
 {
     if (wp->w_redr_type < type)
     {
@@ -217,7 +216,7 @@ redraw_win_later(wp, type)
  * after executing a shell command that messes up the screen.
  */
     void
-redraw_later_clear()
+redraw_later_clear(void)
 {
     redraw_all_later(CLEAR);
 #ifdef FEAT_GUI
@@ -235,8 +234,7 @@ redraw_later_clear()
  * Mark all windows to be redrawn later.
  */
     void
-redraw_all_later(type)
-    int		type;
+redraw_all_later(int type)
 {
     win_T	*wp;
 
@@ -250,16 +248,13 @@ redraw_all_later(type)
  * Mark all windows that are editing the current buffer to be updated later.
  */
     void
-redraw_curbuf_later(type)
-    int		type;
+redraw_curbuf_later(int type)
 {
     redraw_buf_later(curbuf, type);
 }
 
     void
-redraw_buf_later(buf, type)
-    buf_T	*buf;
-    int		type;
+redraw_buf_later(buf_T *buf, int type)
 {
     win_T	*wp;
 
@@ -276,8 +271,7 @@ redraw_buf_later(buf, type)
  * Return a code indicating what happened.
  */
     int
-redraw_asap(type)
-    int		type;
+redraw_asap(int type)
 {
     int		rows;
     int		cols = screen_Columns;
@@ -425,9 +419,9 @@ redraw_asap(type)
  * may become invalid and the whole window will have to be redrawn.
  */
     void
-redrawWinline(lnum, invalid)
-    linenr_T	lnum;
-    int		invalid UNUSED;	/* window line height is invalid now */
+redrawWinline(
+    linenr_T	lnum,
+    int		invalid UNUSED)	/* window line height is invalid now */
 {
 #ifdef FEAT_FOLDING
     int		i;
@@ -454,8 +448,7 @@ redrawWinline(lnum, invalid)
  * update all windows that are editing the current buffer
  */
     void
-update_curbuf(type)
-    int		type;
+update_curbuf(int type)
 {
     redraw_curbuf_later(type);
     update_screen(type);
@@ -468,8 +461,7 @@ update_curbuf(type)
  * of stuff from Filemem to ScreenLines[], and update curwin->w_botline.
  */
     void
-update_screen(type)
-    int		type;
+update_screen(int type)
 {
     win_T	*wp;
     static int	did_intro = FALSE;
@@ -741,8 +733,7 @@ update_screen(type)
  * to the 'concealcursor' option.
  */
     int
-conceal_cursor_line(wp)
-    win_T	*wp;
+conceal_cursor_line(win_T *wp)
 {
     int		c;
 
@@ -765,7 +756,7 @@ conceal_cursor_line(wp)
  * Check if the cursor line needs to be redrawn because of 'concealcursor'.
  */
     void
-conceal_check_cursur_line()
+conceal_check_cursur_line(void)
 {
     if (curwin->w_p_cole > 0 && conceal_cursor_line(curwin))
     {
@@ -777,9 +768,7 @@ conceal_check_cursur_line()
 }
 
     void
-update_single_line(wp, lnum)
-    win_T	*wp;
-    linenr_T	lnum;
+update_single_line(win_T *wp, linenr_T lnum)
 {
     int		row;
     int		j;
@@ -834,7 +823,7 @@ static void update_finish(void);
  * Caller must check for "updating_screen" already set to avoid recursiveness.
  */
     static void
-update_prepare()
+update_prepare(void)
 {
     cursor_off();
     updating_screen = TRUE;
@@ -853,7 +842,7 @@ update_prepare()
  * Finish updating one or more windows.
  */
     static void
-update_finish()
+update_finish(void)
 {
     if (redraw_cmdline)
 	showmode();
@@ -881,9 +870,7 @@ update_finish()
 
 #if defined(FEAT_SIGNS) || defined(PROTO)
     void
-update_debug_sign(buf, lnum)
-    buf_T	*buf;
-    linenr_T	lnum;
+update_debug_sign(buf_T *buf, linenr_T lnum)
 {
     win_T	*wp;
     int		doit = FALSE;
@@ -949,8 +936,7 @@ update_debug_sign(buf, lnum)
  * Used for the GUI scrollbar.
  */
     void
-updateWindow(wp)
-    win_T	*wp;
+updateWindow(win_T *wp)
 {
     /* return if already busy updating */
     if (updating_screen)
@@ -1016,8 +1002,7 @@ updateWindow(wp)
  * bot: from bot_start to last row (when scrolled up)
  */
     static void
-win_update(wp)
-    win_T	*wp;
+win_update(win_T *wp)
 {
     buf_T	*buf = wp->w_buffer;
     int		type;
@@ -2211,8 +2196,7 @@ static int draw_signcolumn(win_T *wp);
  * Return TRUE when window "wp" has a column to draw signs in.
  */
     static int
-draw_signcolumn(wp)
-    win_T *wp;
+draw_signcolumn(win_T *wp)
 {
     return (wp->w_buffer->b_signlist != NULL
 # ifdef FEAT_NETBEANS_INTG
@@ -2227,13 +2211,13 @@ draw_signcolumn(wp)
  * as the filler character.
  */
     static void
-win_draw_end(wp, c1, c2, row, endrow, hl)
-    win_T	*wp;
-    int		c1;
-    int		c2;
-    int		row;
-    int		endrow;
-    hlf_T	hl;
+win_draw_end(
+    win_T	*wp,
+    int		c1,
+    int		c2,
+    int		row,
+    int		endrow,
+    hlf_T	hl)
 {
 #if defined(FEAT_FOLDING) || defined(FEAT_SIGNS) || defined(FEAT_CMDWIN)
     int		n = 0;
@@ -2340,9 +2324,7 @@ static int advance_color_col(int vcol, i
  * Advance **color_cols and return TRUE when there are columns to draw.
  */
     static int
-advance_color_col(vcol, color_cols)
-    int	    vcol;
-    int	    **color_cols;
+advance_color_col(int vcol, int **color_cols)
 {
     while (**color_cols >= 0 && vcol > **color_cols)
 	++*color_cols;
@@ -2356,9 +2338,7 @@ advance_color_col(vcol, color_cols)
  * space is available for window "wp", minus "col".
  */
     static int
-compute_foldcolumn(wp, col)
-    win_T *wp;
-    int   col;
+compute_foldcolumn(win_T *wp, int col)
 {
     int fdc = wp->w_p_fdc;
     int wmw = wp == curwin && p_wmw == 0 ? 1 : p_wmw;
@@ -2373,12 +2353,12 @@ compute_foldcolumn(wp, col)
  * Display one folded line.
  */
     static void
-fold_line(wp, fold_count, foldinfo, lnum, row)
-    win_T	*wp;
-    long	fold_count;
-    foldinfo_T	*foldinfo;
-    linenr_T	lnum;
-    int		row;
+fold_line(
+    win_T	*wp,
+    long	fold_count,
+    foldinfo_T	*foldinfo,
+    linenr_T	lnum,
+    int		row)
 {
     char_u	buf[51];
     pos_T	*top, *bot;
@@ -2800,11 +2780,11 @@ fold_line(wp, fold_count, foldinfo, lnum
  * Copy "buf[len]" to ScreenLines["off"] and set attributes to "attr".
  */
     static void
-copy_text_attr(off, buf, len, attr)
-    int		off;
-    char_u	*buf;
-    int		len;
-    int		attr;
+copy_text_attr(
+    int		off,
+    char_u	*buf,
+    int		len,
+    int		attr)
 {
     int		i;
 
@@ -2822,11 +2802,11 @@ copy_text_attr(off, buf, len, attr)
  * Only to be called when 'foldcolumn' > 0.
  */
     static void
-fill_foldcolumn(p, wp, closed, lnum)
-    char_u	*p;
-    win_T	*wp;
-    int		closed;		/* TRUE of FALSE */
-    linenr_T	lnum;		/* current line number */
+fill_foldcolumn(
+    char_u	*p,
+    win_T	*wp,
+    int		closed,		/* TRUE of FALSE */
+    linenr_T	lnum)		/* current line number */
 {
     int		i = 0;
     int		level;
@@ -2877,12 +2857,12 @@ fill_foldcolumn(p, wp, closed, lnum)
  * Return the number of last row the line occupies.
  */
     static int
-win_line(wp, lnum, startrow, endrow, nochange)
-    win_T	*wp;
-    linenr_T	lnum;
-    int		startrow;
-    int		endrow;
-    int		nochange UNUSED;	/* not updating for changed text */
+win_line(
+    win_T	*wp,
+    linenr_T	lnum,
+    int		startrow,
+    int		endrow,
+    int		nochange UNUSED)	/* not updating for changed text */
 {
     int		col;			/* visual column on screen */
     unsigned	off;			/* offset in ScreenLines/ScreenAttrs */
@@ -5751,9 +5731,7 @@ static int comp_char_differs(int, int);
  * Only to be used when ScreenLinesUC[off_from] != 0.
  */
     static int
-comp_char_differs(off_from, off_to)
-    int	    off_from;
-    int	    off_to;
+comp_char_differs(int off_from, int off_to)
 {
     int	    i;
 
@@ -5776,10 +5754,7 @@ comp_char_differs(off_from, off_to)
  * - the character is two cells wide and the second cell differs.
  */
     static int
-char_needs_redraw(off_from, off_to, cols)
-    int		off_from;
-    int		off_to;
-    int		cols;
+char_needs_redraw(int off_from, int off_to, int cols)
 {
     if (cols > 0
 	    && ((ScreenLines[off_from] != ScreenLines[off_to]
@@ -5817,18 +5792,15 @@ char_needs_redraw(off_from, off_to, cols
  *    When FALSE and "clear_width" > 0, clear columns "endcol" to "clear_width"
  */
     static void
-screen_line(row, coloff, endcol, clear_width
+screen_line(
+    int	    row,
+    int	    coloff,
+    int	    endcol,
+    int	    clear_width
 #ifdef FEAT_RIGHTLEFT
-				    , rlflag
-#endif
-						)
-    int	    row;
-    int	    coloff;
-    int	    endcol;
-    int	    clear_width;
-#ifdef FEAT_RIGHTLEFT
-    int	    rlflag;
-#endif
+    , int   rlflag
+#endif
+    )
 {
     unsigned	    off_from;
     unsigned	    off_to;
@@ -6228,8 +6200,7 @@ screen_line(row, coloff, endcol, clear_w
  * Only works for single-byte characters (e.g., numbers).
  */
     void
-rl_mirror(str)
-    char_u	*str;
+rl_mirror(char_u *str)
 {
     char_u	*p1, *p2;
     int		t;
@@ -6248,7 +6219,7 @@ rl_mirror(str)
  * mark all status lines for redraw; used after first :cd
  */
     void
-status_redraw_all()
+status_redraw_all(void)
 {
     win_T	*wp;
 
@@ -6264,7 +6235,7 @@ status_redraw_all()
  * mark all status lines of the current buffer for redraw
  */
     void
-status_redraw_curbuf()
+status_redraw_curbuf(void)
 {
     win_T	*wp;
 
@@ -6280,7 +6251,7 @@ status_redraw_curbuf()
  * Redraw all status lines that need to be redrawn.
  */
     void
-redraw_statuslines()
+redraw_statuslines(void)
 {
     win_T	*wp;
 
@@ -6297,8 +6268,7 @@ redraw_statuslines()
  * Redraw all status lines at the bottom of frame "frp".
  */
     void
-win_redraw_last_status(frp)
-    frame_T	*frp;
+win_redraw_last_status(frame_T *frp)
 {
     if (frp->fr_layout == FR_LEAF)
 	frp->fr_win->w_redr_status = TRUE;
@@ -6322,9 +6292,7 @@ win_redraw_last_status(frp)
  * Draw the verticap separator right of window "wp" starting with line "row".
  */
     static void
-draw_vsep_win(wp, row)
-    win_T	*wp;
-    int		row;
+draw_vsep_win(win_T *wp, int row)
 {
     int		hl;
     int		c;
@@ -6348,9 +6316,7 @@ static int skip_status_match_char(expand
  * Get the length of an item as it will be shown in the status line.
  */
     static int
-status_match_len(xp, s)
-    expand_T	*xp;
-    char_u	*s;
+status_match_len(expand_T *xp, char_u *s)
 {
     int	len = 0;
 
@@ -6378,9 +6344,7 @@ status_match_len(xp, s)
  * These are backslashes used for escaping.  Do show backslashes in help tags.
  */
     static int
-skip_status_match_char(xp, s)
-    expand_T	*xp;
-    char_u	*s;
+skip_status_match_char(expand_T *xp, char_u *s)
 {
     if ((rem_backslash(s) && xp->xp_context != EXPAND_HELP)
 #ifdef FEAT_MENU
@@ -6407,12 +6371,12 @@ skip_status_match_char(xp, s)
  * If inversion is possible we use it. Else '=' characters are used.
  */
     void
-win_redr_status_matches(xp, num_matches, matches, match, showtail)
-    expand_T	*xp;
-    int		num_matches;
-    char_u	**matches;	/* list of matches */
-    int		match;
-    int		showtail;
+win_redr_status_matches(
+    expand_T	*xp,
+    int		num_matches,
+    char_u	**matches,	/* list of matches */
+    int		match,
+    int		showtail)
 {
 #define L_MATCH(m) (showtail ? sm_gettail(matches[m]) : matches[m])
     int		row;
@@ -6632,8 +6596,7 @@ win_redr_status_matches(xp, num_matches,
  * If inversion is possible we use it. Else '=' characters are used.
  */
     void
-win_redr_status(wp)
-    win_T	*wp;
+win_redr_status(win_T *wp)
 {
     int		row;
     char_u	*p;
@@ -6795,8 +6758,7 @@ win_redr_status(wp)
  * errors encountered.
  */
     static void
-redraw_custom_statusline(wp)
-    win_T	    *wp;
+redraw_custom_statusline(win_T *wp)
 {
     static int	    entered = FALSE;
     int		    save_called_emsg = called_emsg;
@@ -6830,8 +6792,7 @@ redraw_custom_statusline(wp)
  * Only call if (wp->w_vsep_width != 0).
  */
     int
-stl_connected(wp)
-    win_T	*wp;
+stl_connected(win_T *wp)
 {
     frame_T	*fr;
 
@@ -6861,10 +6822,10 @@ stl_connected(wp)
  * Get the value to show for the language mappings, active 'keymap'.
  */
     int
-get_keymap_str(wp, buf, len)
-    win_T	*wp;
-    char_u	*buf;	    /* buffer for the result */
-    int		len;	    /* length of buffer */
+get_keymap_str(
+    win_T	*wp,
+    char_u	*buf,	    /* buffer for the result */
+    int		len)	    /* length of buffer */
 {
     char_u	*p;
 
@@ -6913,9 +6874,9 @@ get_keymap_str(wp, buf, len)
  * When "wp" is NULL redraw the tab pages line from 'tabline'.
  */
     static void
-win_redr_custom(wp, draw_ruler)
-    win_T	*wp;
-    int		draw_ruler;	/* TRUE or FALSE */
+win_redr_custom(
+    win_T	*wp,
+    int		draw_ruler)	/* TRUE or FALSE */
 {
     static int	entered = FALSE;
     int		attr;
@@ -7110,10 +7071,7 @@ theend:
  * Output a single character directly to the screen and update ScreenLines.
  */
     void
-screen_putchar(c, row, col, attr)
-    int	    c;
-    int	    row, col;
-    int	    attr;
+screen_putchar(int c, int row, int col, int attr)
 {
     char_u	buf[MB_MAXBYTES + 1];
 
@@ -7134,10 +7092,7 @@ screen_putchar(c, row, col, attr)
  * Also return its attribute in *attrp;
  */
     void
-screen_getbytes(row, col, bytes, attrp)
-    int	    row, col;
-    char_u  *bytes;
-    int	    *attrp;
+screen_getbytes(int row, int col, char_u *bytes, int *attrp)
 {
     unsigned off;
 
@@ -7176,9 +7131,7 @@ static int screen_comp_differs(int, int*
  * Only to be used when ScreenLinesUC[off] != 0.
  */
     static int
-screen_comp_differs(off, u8cc)
-    int	    off;
-    int	    *u8cc;
+screen_comp_differs(int off, int *u8cc)
 {
     int	    i;
 
@@ -7200,11 +7153,11 @@ screen_comp_differs(off, u8cc)
  * Note: if ScreenLines[], row and/or col is invalid, nothing is done.
  */
     void
-screen_puts(text, row, col, attr)
-    char_u	*text;
-    int		row;
-    int		col;
-    int		attr;
+screen_puts(
+    char_u	*text,
+    int		row,
+    int		col,
+    int		attr)
 {
     screen_puts_len(text, -1, row, col, attr);
 }
@@ -7214,12 +7167,12 @@ screen_puts(text, row, col, attr)
  * a NUL.
  */
     void
-screen_puts_len(text, textlen, row, col, attr)
-    char_u	*text;
-    int		textlen;
-    int		row;
-    int		col;
-    int		attr;
+screen_puts_len(
+    char_u	*text,
+    int		textlen,
+    int		row,
+    int		col,
+    int		attr)
 {
     unsigned	off;
     char_u	*ptr = text;
@@ -7503,7 +7456,7 @@ screen_puts_len(text, textlen, row, col,
  * Prepare for 'hlsearch' highlighting.
  */
     static void
-start_search_hl()
+start_search_hl(void)
 {
     if (p_hls && !no_hlsearch)
     {
@@ -7520,7 +7473,7 @@ start_search_hl()
  * Clean up for 'hlsearch' highlighting.
  */
     static void
-end_search_hl()
+end_search_hl(void)
 {
     if (search_hl.rm.regprog != NULL)
     {
@@ -7533,8 +7486,7 @@ end_search_hl()
  * Init for calling prepare_search_hl().
  */
     static void
-init_search_hl(wp)
-    win_T	*wp;
+init_search_hl(win_T *wp)
 {
     matchitem_T *cur;
 
@@ -7567,9 +7519,7 @@ init_search_hl(wp)
  * Advance to the match in window "wp" line "lnum" or past it.
  */
     static void
-prepare_search_hl(wp, lnum)
-    win_T	*wp;
-    linenr_T	lnum;
+prepare_search_hl(win_T *wp, linenr_T lnum)
 {
     matchitem_T *cur;		/* points to the match list */
     match_T	*shl;		/* points to search_hl or a match */
@@ -7649,12 +7599,12 @@ prepare_search_hl(wp, lnum)
  * Careful: Any pointers for buffer lines will become invalid.
  */
     static void
-next_search_hl(win, shl, lnum, mincol, cur)
-    win_T	    *win;
-    match_T	    *shl;	/* points to search_hl or a match */
-    linenr_T	    lnum;
-    colnr_T	    mincol;	/* minimal column for a match */
-    matchitem_T	    *cur;	/* to retrieve match positions if any */
+next_search_hl(
+    win_T	    *win,
+    match_T	    *shl,	/* points to search_hl or a match */
+    linenr_T	    lnum,
+    colnr_T	    mincol,	/* minimal column for a match */
+    matchitem_T	    *cur)	/* to retrieve match positions if any */
 {
     linenr_T	l;
     colnr_T	matchcol;
@@ -7779,11 +7729,11 @@ next_search_hl(win, shl, lnum, mincol, c
 }
 
     static int
-next_search_hl_pos(shl, lnum, posmatch, mincol)
-    match_T	    *shl;	/* points to a match */
-    linenr_T	    lnum;
-    posmatch_T	    *posmatch;	/* match positions */
-    colnr_T	    mincol;	/* minimal column for a match */
+next_search_hl_pos(
+    match_T	    *shl,	/* points to a match */
+    linenr_T	    lnum,
+    posmatch_T	    *posmatch,	/* match positions */
+    colnr_T	    mincol)	/* minimal column for a match */
 {
     int	    i;
     int	    bot = -1;
@@ -7836,8 +7786,7 @@ next_search_hl_pos(shl, lnum, posmatch, 
 #endif
 
       static void
-screen_start_highlight(attr)
-      int	attr;
+screen_start_highlight(int attr)
 {
     attrentry_T *aep = NULL;
 
@@ -7912,7 +7861,7 @@ screen_start_highlight(attr)
 }
 
       void
-screen_stop_highlight()
+screen_stop_highlight(void)
 {
     int	    do_ME = FALSE;	    /* output T_ME code */
 
@@ -8013,7 +7962,7 @@ screen_stop_highlight()
  * The machine specific code may override this again.
  */
     void
-reset_cterm_colors()
+reset_cterm_colors(void)
 {
     if (t_colors > 1)
     {
@@ -8036,10 +7985,7 @@ reset_cterm_colors()
  * using the attributes from ScreenAttrs["off"].
  */
     static void
-screen_char(off, row, col)
-    unsigned	off;
-    int		row;
-    int		col;
+screen_char(unsigned off, int row, int col)
 {
     int		attr;
 
@@ -8119,10 +8065,7 @@ screen_char(off, row, col)
  * output the two bytes of a double-byte character with nothing in between.
  */
     static void
-screen_char_2(off, row, col)
-    unsigned	off;
-    int		row;
-    int		col;
+screen_char_2(unsigned off, int row, int col)
 {
     /* Check for illegal values (could be wrong when screen was resized). */
     if (off + 1 >= (unsigned)(screen_Rows * screen_Columns))
@@ -8150,12 +8093,12 @@ screen_char_2(off, row, col)
  * This uses the contents of ScreenLines[] and doesn't change it.
  */
     void
-screen_draw_rectangle(row, col, height, width, invert)
-    int		row;
-    int		col;
-    int		height;
-    int		width;
-    int		invert;
+screen_draw_rectangle(
+    int		row,
+    int		col,
+    int		height,
+    int		width,
+    int		invert)
 {
     int		r, c;
     int		off;
@@ -8203,10 +8146,7 @@ screen_draw_rectangle(row, col, height, 
  * Redraw the characters for a vertically split window.
  */
     static void
-redraw_block(row, end, wp)
-    int		row;
-    int		end;
-    win_T	*wp;
+redraw_block(int row, int end, win_T *wp)
 {
     int		col;
     int		width;
@@ -8235,11 +8175,14 @@ redraw_block(row, end, wp)
  * Use attributes 'attr'.
  */
     void
-screen_fill(start_row, end_row, start_col, end_col, c1, c2, attr)
-    int	    start_row, end_row;
-    int	    start_col, end_col;
-    int	    c1, c2;
-    int	    attr;
+screen_fill(
+    int	    start_row,
+    int	    end_row,
+    int	    start_col,
+    int	    end_col,
+    int	    c1,
+    int	    c2,
+    int	    attr)
 {
     int		    row;
     int		    col;
@@ -8426,8 +8369,7 @@ screen_fill(start_row, end_row, start_co
  * screen or the command line.
  */
     void
-check_for_delay(check_msg_scroll)
-    int	    check_msg_scroll;
+check_for_delay(int check_msg_scroll)
 {
     if ((emsg_on_display || (check_msg_scroll && msg_scroll))
 	    && !did_wait_return
@@ -8448,8 +8390,7 @@ check_for_delay(check_msg_scroll)
  *	Returns FALSE when starting up and screen not initialized yet.
  */
     int
-screen_valid(doclear)
-    int	    doclear;
+screen_valid(int doclear)
 {
     screenalloc(doclear);	   /* allocate screen buffers if size changed */
     return (ScreenLines != NULL);
@@ -8466,8 +8407,7 @@ screen_valid(doclear)
  * final size of the shell is needed.
  */
     void
-screenalloc(doclear)
-    int	    doclear;
+screenalloc(int doclear)
 {
     int		    new_row, old_row;
 #ifdef FEAT_GUI
@@ -8795,7 +8735,7 @@ give_up:
 }
 
     void
-free_screenlines()
+free_screenlines(void)
 {
 #ifdef FEAT_MBYTE
     int		i;
@@ -8815,7 +8755,7 @@ free_screenlines()
 }
 
     void
-screenclear()
+screenclear(void)
 {
     check_for_delay(FALSE);
     screenalloc(FALSE);	    /* allocate screen buffers if size changed */
@@ -8823,7 +8763,7 @@ screenclear()
 }
 
     static void
-screenclear2()
+screenclear2(void)
 {
     int	    i;
 
@@ -8888,9 +8828,7 @@ screenclear2()
  * Clear one line in ScreenLines.
  */
     static void
-lineclear(off, width)
-    unsigned	off;
-    int		width;
+lineclear(unsigned off, int width)
 {
     (void)vim_memset(ScreenLines + off, ' ', (size_t)width * sizeof(schar_T));
 #ifdef FEAT_MBYTE
@@ -8906,9 +8844,7 @@ lineclear(off, width)
  * invalid value.
  */
     static void
-lineinvalid(off, width)
-    unsigned	off;
-    int		width;
+lineinvalid(unsigned off, int width)
 {
     (void)vim_memset(ScreenAttrs + off, -1, (size_t)width * sizeof(sattr_T));
 }
@@ -8918,10 +8854,7 @@ lineinvalid(off, width)
  * Copy part of a Screenline for vertically split window "wp".
  */
     static void
-linecopy(to, from, wp)
-    int		to;
-    int		from;
-    win_T	*wp;
+linecopy(int to, int from, win_T *wp)
 {
     unsigned	off_to = LineOffset[to] + wp->w_wincol;
     unsigned	off_from = LineOffset[from] + wp->w_wincol;
@@ -8953,8 +8886,7 @@ linecopy(to, from, wp)
  * It can't work when the string is empty or it won't set the right background.
  */
     int
-can_clear(p)
-    char_u	*p;
+can_clear(char_u *p)
 {
     return (*p != NUL && (t_colors <= 1
 #ifdef FEAT_GUI
@@ -8969,7 +8901,7 @@ can_clear(p)
  * code.
  */
     void
-screen_start()
+screen_start(void)
 {
     screen_cur_row = screen_cur_col = 9999;
 }
@@ -8980,9 +8912,7 @@ screen_start()
  * characters sent to the terminal.
  */
     void
-windgoto(row, col)
-    int	    row;
-    int	    col;
+windgoto(int row, int col)
 {
     sattr_T	    *p;
     int		    i;
@@ -9234,7 +9164,7 @@ windgoto(row, col)
  * Set cursor to its position in the current window.
  */
     void
-setcursor()
+setcursor(void)
 {
     if (redrawing())
     {
@@ -9265,12 +9195,12 @@ setcursor()
  * Returns FAIL if the lines are not inserted, OK for success.
  */
     int
-win_ins_lines(wp, row, line_count, invalid, mayclear)
-    win_T	*wp;
-    int		row;
-    int		line_count;
-    int		invalid;
-    int		mayclear;
+win_ins_lines(
+    win_T	*wp,
+    int		row,
+    int		line_count,
+    int		invalid,
+    int		mayclear)
 {
     int		did_delete;
     int		nextrow;
@@ -9350,12 +9280,12 @@ win_ins_lines(wp, row, line_count, inval
  * Return OK for success, FAIL if the lines are not deleted.
  */
     int
-win_del_lines(wp, row, line_count, invalid, mayclear)
-    win_T	*wp;
-    int		row;
-    int		line_count;
-    int		invalid;
-    int		mayclear;
+win_del_lines(
+    win_T	*wp,
+    int		row,
+    int		line_count,
+    int		invalid,
+    int		mayclear)
 {
     int		retval;
 
@@ -9403,12 +9333,12 @@ win_del_lines(wp, row, line_count, inval
  * Returns MAYBE when not finished yet.
  */
     static int
-win_do_lines(wp, row, line_count, mayclear, del)
-    win_T	*wp;
-    int		row;
-    int		line_count;
-    int		mayclear;
-    int		del;
+win_do_lines(
+    win_T	*wp,
+    int		row,
+    int		line_count,
+    int		mayclear,
+    int		del)
 {
     int		retval;
 
@@ -9487,8 +9417,7 @@ win_do_lines(wp, row, line_count, maycle
  * window 'wp' and everything after it is messed up, mark it for redraw
  */
     static void
-win_rest_invalid(wp)
-    win_T	*wp;
+win_rest_invalid(win_T *wp)
 {
 #ifdef FEAT_WINDOWS
     while (wp != NULL)
@@ -9537,12 +9466,12 @@ win_rest_invalid(wp)
  * return FAIL for failure, OK for success.
  */
     int
-screen_ins_lines(off, row, line_count, end, wp)
-    int		off;
-    int		row;
-    int		line_count;
-    int		end;
-    win_T	*wp;	    /* NULL or window to use width from */
+screen_ins_lines(
+    int		off,
+    int		row,
+    int		line_count,
+    int		end,
+    win_T	*wp)	    /* NULL or window to use width from */
 {
     int		i;
     int		j;
@@ -9752,13 +9681,13 @@ screen_ins_lines(off, row, line_count, e
  * Return OK for success, FAIL if the lines are not deleted.
  */
     int
-screen_del_lines(off, row, line_count, end, force, wp)
-    int		off;
-    int		row;
-    int		line_count;
-    int		end;
-    int		force;		/* even when line_count > p_ttyscroll */
-    win_T	*wp UNUSED;	/* NULL or window to use width from */
+screen_del_lines(
+    int		off,
+    int		row,
+    int		line_count,
+    int		end,
+    int		force,		/* even when line_count > p_ttyscroll */
+    win_T	*wp UNUSED)	/* NULL or window to use width from */
 {
     int		j;
     int		i;
@@ -10000,7 +9929,7 @@ screen_del_lines(off, row, line_count, e
  * Return the length of the message (0 if no message).
  */
     int
-showmode()
+showmode(void)
 {
     int		need_clear;
     int		length = 0;
@@ -10219,7 +10148,7 @@ showmode()
  * Position for a mode message.
  */
     static void
-msg_pos_mode()
+msg_pos_mode(void)
 {
     msg_col = 0;
     msg_row = Rows - 1;
@@ -10231,8 +10160,7 @@ msg_pos_mode()
  * Caller should check "mode_displayed".
  */
     void
-unshowmode(force)
-    int	    force;
+unshowmode(int force)
 {
     /*
      * Don't delete it right now, when not redrawing or inside a mapping.
@@ -10249,8 +10177,7 @@ unshowmode(force)
 }
 
     static void
-recording_mode(attr)
-    int attr;
+recording_mode(int attr)
 {
     MSG_PUTS_ATTR(_("recording"), attr);
     if (!shortmess(SHM_RECORDING))
@@ -10266,7 +10193,7 @@ recording_mode(attr)
  * Draw the tab pages line at the top of the Vim window.
  */
     static void
-draw_tabline()
+draw_tabline(void)
 {
     int		tabcount = 0;
     tabpage_T	*tp;
@@ -10451,8 +10378,7 @@ draw_tabline()
  * Takes care of special buffer names and translates special characters.
  */
     void
-get_trans_bufname(buf)
-    buf_T	*buf;
+get_trans_bufname(buf_T *buf)
 {
     if (buf_spname(buf) != NULL)
 	vim_strncpy(NameBuff, buf_spname(buf), MAXPATHL - 1);
@@ -10467,9 +10393,7 @@ get_trans_bufname(buf)
  * Get the character to use in a status line.  Get its attributes in "*attr".
  */
     static int
-fillchar_status(attr, is_curwin)
-    int		*attr;
-    int		is_curwin;
+fillchar_status(int *attr, int is_curwin)
 {
     int fill;
     if (is_curwin)
@@ -10501,8 +10425,7 @@ fillchar_status(attr, is_curwin)
  * Get its attributes in "*attr".
  */
     static int
-fillchar_vsep(attr)
-    int	    *attr;
+fillchar_vsep(int *attr)
 {
     *attr = hl_attr(HLF_C);
     if (*attr == 0 && fill_vert == ' ')
@@ -10516,7 +10439,7 @@ fillchar_vsep(attr)
  * Return TRUE if redrawing should currently be done.
  */
     int
-redrawing()
+redrawing(void)
 {
     return (!RedrawingDisabled
 		       && !(p_lz && char_avail() && !KeyTyped && !do_redraw));
@@ -10526,7 +10449,7 @@ redrawing()
  * Return TRUE if printing messages should currently be done.
  */
     int
-messaging()
+messaging(void)
 {
     return (!(p_lz && char_avail() && !KeyTyped));
 }
@@ -10536,8 +10459,7 @@ messaging()
  * If always is FALSE, only show ruler if position has changed.
  */
     void
-showruler(always)
-    int	    always;
+showruler(int always)
 {
     if (!always && !redrawing())
 	return;
@@ -10580,9 +10502,7 @@ showruler(always)
 
 #ifdef FEAT_CMDL_INFO
     static void
-win_redr_ruler(wp, always)
-    win_T	*wp;
-    int		always;
+win_redr_ruler(win_T *wp, int always)
 {
 #define RULER_BUF_LEN 70
     char_u	buffer[RULER_BUF_LEN];
@@ -10799,8 +10719,7 @@ win_redr_ruler(wp, always)
  * Otherwise it depends on 'numberwidth' and the line count.
  */
     int
-number_width(wp)
-    win_T	*wp;
+number_width(win_T *wp)
 {
     int		n;
     linenr_T	lnum;
@@ -10838,7 +10757,7 @@ number_width(wp)
  * screen. First column is 0.
  */
     int
-screen_screencol()
+screen_screencol(void)
 {
     return screen_cur_col;
 }
@@ -10848,7 +10767,7 @@ screen_screencol()
  * First row is 0.
  */
     int
-screen_screenrow()
+screen_screenrow(void)
 {
     return screen_cur_row;
 }
--- 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 */
 /**/
+    1213,
+/**/
     1212,
 /**/
     1211,