diff src/ui.c @ 7835:4d7ce6c03fda v7.4.1214

commit https://github.com/vim/vim/commit/764b23c8fd3369cb05ae9122abf3ca16fec539d7 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jan 30 21:10:09 2016 +0100 patch 7.4.1214 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 21:15:04 +0100
parents 0b6c37dd858d
children 10f17a228661
line wrap: on
line diff
--- a/src/ui.c
+++ b/src/ui.c
@@ -25,9 +25,7 @@
 #endif
 
     void
-ui_write(s, len)
-    char_u  *s;
-    int	    len;
+ui_write(char_u *s, int len)
 {
 #ifdef FEAT_GUI
     if (gui.in_use && !gui.dying && !gui.starting)
@@ -75,9 +73,7 @@ static int ta_off;	/* offset for next ch
 static int ta_len;	/* length of ta_str when it's not NULL*/
 
     void
-ui_inchar_undo(s, len)
-    char_u	*s;
-    int		len;
+ui_inchar_undo(char_u *s, int len)
 {
     char_u  *new;
     int	    newlen;
@@ -117,11 +113,11 @@ ui_inchar_undo(s, len)
  * otherwise.
  */
     int
-ui_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;
+ui_inchar(
+    char_u	*buf,
+    int		maxlen,
+    long	wtime,	    /* don't use "time", MIPS cannot handle it */
+    int		tb_change_cnt)
 {
     int		retval = 0;
 
@@ -220,7 +216,7 @@ theend:
  * return non-zero if a character is available
  */
     int
-ui_char_avail()
+ui_char_avail(void)
 {
 #ifdef FEAT_GUI
     if (gui.in_use)
@@ -245,9 +241,7 @@ ui_char_avail()
  * cancel the delay if a key is hit.
  */
     void
-ui_delay(msec, ignoreinput)
-    long	msec;
-    int		ignoreinput;
+ui_delay(long msec, int ignoreinput)
 {
 #ifdef FEAT_GUI
     if (gui.in_use && !ignoreinput)
@@ -263,7 +257,7 @@ ui_delay(msec, ignoreinput)
  * When running the GUI iconify the window.
  */
     void
-ui_suspend()
+ui_suspend(void)
 {
 #ifdef FEAT_GUI
     if (gui.in_use)
@@ -281,7 +275,7 @@ ui_suspend()
  * This is never called in the GUI.
  */
     void
-suspend_shell()
+suspend_shell(void)
 {
     if (*p_sh == NUL)
 	EMSG(_(e_shellempty));
@@ -299,7 +293,7 @@ suspend_shell()
  * Return OK when size could be determined, FAIL otherwise.
  */
     int
-ui_get_shellsize()
+ui_get_shellsize(void)
 {
     int	    retval;
 
@@ -327,8 +321,8 @@ ui_get_shellsize()
  * new size.  If this is not possible, it will adjust Rows and Columns.
  */
     void
-ui_set_shellsize(mustset)
-    int		mustset UNUSED;	/* set by the user */
+ui_set_shellsize(
+    int		mustset UNUSED)	/* set by the user */
 {
 #ifdef FEAT_GUI
     if (gui.in_use)
@@ -343,7 +337,7 @@ ui_set_shellsize(mustset)
  * region.
  */
     void
-ui_new_shellsize()
+ui_new_shellsize(void)
 {
     if (full_screen && !exiting)
     {
@@ -357,7 +351,7 @@ ui_new_shellsize()
 }
 
     void
-ui_breakcheck()
+ui_breakcheck(void)
 {
 #ifdef FEAT_GUI
     if (gui.in_use)
@@ -395,8 +389,7 @@ static void clip_copy_selection(VimClipb
  * the GUI starts.
  */
     void
-clip_init(can_use)
-    int	    can_use;
+clip_init(int can_use)
 {
     VimClipboard *cb;
 
@@ -425,8 +418,7 @@ clip_init(can_use)
  * this is called whenever VIsual mode is ended.
  */
     void
-clip_update_selection(clip)
-    VimClipboard    *clip;
+clip_update_selection(VimClipboard *clip)
 {
     pos_T	    start, end;
 
@@ -463,8 +455,7 @@ clip_update_selection(clip)
 }
 
     void
-clip_own_selection(cbd)
-    VimClipboard	*cbd;
+clip_own_selection(VimClipboard *cbd)
 {
     /*
      * Also want to check somehow that we are reading from the keyboard rather
@@ -500,8 +491,7 @@ clip_own_selection(cbd)
 }
 
     void
-clip_lose_selection(cbd)
-    VimClipboard	*cbd;
+clip_lose_selection(VimClipboard *cbd)
 {
 #ifdef FEAT_X11
     int	    was_owned = cbd->owned;
@@ -543,8 +533,7 @@ clip_lose_selection(cbd)
 }
 
     static void
-clip_copy_selection(clip)
-    VimClipboard	*clip;
+clip_copy_selection(VimClipboard *clip)
 {
     if (VIsual_active && (State & NORMAL) && clip->available)
     {
@@ -569,7 +558,7 @@ static int clipboard_needs_update; /* cl
  * Save clip_unnamed and reset it.
  */
     void
-start_global_changes()
+start_global_changes(void)
 {
     if (++global_change_count > 1)
 	return;
@@ -587,7 +576,7 @@ start_global_changes()
  * Restore clip_unnamed and set the selection when needed.
  */
     void
-end_global_changes()
+end_global_changes(void)
 {
     if (--global_change_count > 0)
 	/* recursive */
@@ -619,7 +608,7 @@ end_global_changes()
  * Called when Visual mode is ended: update the selection.
  */
     void
-clip_auto_select()
+clip_auto_select(void)
 {
     if (clip_isautosel_star())
 	clip_copy_selection(&clip_star);
@@ -632,7 +621,7 @@ clip_auto_select()
  * register.
  */
     int
-clip_isautosel_star()
+clip_isautosel_star(void)
 {
     return (
 #ifdef FEAT_GUI
@@ -646,7 +635,7 @@ clip_isautosel_star()
  * register.
  */
     int
-clip_isautosel_plus()
+clip_isautosel_plus(void)
 {
     return (
 #ifdef FEAT_GUI
@@ -678,10 +667,7 @@ static void clip_update_modeless_selecti
  * command-line and in the cmdline window.
  */
     void
-clip_modeless(button, is_click, is_drag)
-    int		button;
-    int		is_click;
-    int		is_drag;
+clip_modeless(int button, int is_click, int is_drag)
 {
     int		repeat;
 
@@ -715,11 +701,11 @@ clip_modeless(button, is_click, is_drag)
  * Compare two screen positions ala strcmp()
  */
     static int
-clip_compare_pos(row1, col1, row2, col2)
-    int		row1;
-    int		col1;
-    int		row2;
-    int		col2;
+clip_compare_pos(
+    int		row1,
+    int		col1,
+    int		row2,
+    int		col2)
 {
     if (row1 > row2) return(1);
     if (row1 < row2) return(-1);
@@ -732,10 +718,7 @@ clip_compare_pos(row1, col1, row2, col2)
  * Start the selection
  */
     void
-clip_start_selection(col, row, repeated_click)
-    int		col;
-    int		row;
-    int		repeated_click;
+clip_start_selection(int col, int row, int repeated_click)
 {
     VimClipboard	*cb = &clip_star;
 
@@ -805,11 +788,11 @@ clip_start_selection(col, row, repeated_
  * Continue processing the selection
  */
     void
-clip_process_selection(button, col, row, repeated_click)
-    int		button;
-    int		col;
-    int		row;
-    int_u	repeated_click;
+clip_process_selection(
+    int		button,
+    int		col,
+    int		row,
+    int_u	repeated_click)
 {
     VimClipboard	*cb = &clip_star;
     int			diff;
@@ -990,9 +973,7 @@ clip_process_selection(button, col, row,
  * Only used for the GUI.
  */
     void
-clip_may_redraw_selection(row, col, len)
-    int		row, col;
-    int		len;
+clip_may_redraw_selection(int row, int col, int len)
 {
     int		start = col;
     int		end = col + len;
@@ -1015,8 +996,7 @@ clip_may_redraw_selection(row, col, len)
  * Called from outside to clear selected region from the display
  */
     void
-clip_clear_selection(cbd)
-    VimClipboard    *cbd;
+clip_clear_selection(VimClipboard *cbd)
 {
 
     if (cbd->state == SELECT_CLEARED)
@@ -1031,8 +1011,7 @@ clip_clear_selection(cbd)
  * Clear the selection if any lines from "row1" to "row2" are inside of it.
  */
     void
-clip_may_clear_selection(row1, row2)
-    int	row1, row2;
+clip_may_clear_selection(int row1, int row2)
 {
     if (clip_star.state == SELECT_DONE
 	    && row2 >= clip_star.start.lnum
@@ -1045,8 +1024,8 @@ clip_may_clear_selection(row1, row2)
  * of the selection.  Call with big number when clearing the screen.
  */
     void
-clip_scroll_selection(rows)
-    int	    rows;		/* negative for scroll down */
+clip_scroll_selection(
+    int	    rows)		/* negative for scroll down */
 {
     int	    lnum;
 
@@ -1079,12 +1058,12 @@ clip_scroll_selection(rows)
  * 0: invert (GUI only).
  */
     static void
-clip_invert_area(row1, col1, row2, col2, how)
-    int		row1;
-    int		col1;
-    int		row2;
-    int		col2;
-    int		how;
+clip_invert_area(
+    int		row1,
+    int		col1,
+    int		row2,
+    int		col2,
+    int		how)
 {
     int		invert = FALSE;
 
@@ -1139,12 +1118,12 @@ clip_invert_area(row1, col1, row2, col2,
  * "invert" is true if the result is inverted.
  */
     static void
-clip_invert_rectangle(row, col, height, width, invert)
-    int		row;
-    int		col;
-    int		height;
-    int		width;
-    int		invert;
+clip_invert_rectangle(
+    int		row,
+    int		col,
+    int		height,
+    int		width,
+    int		invert)
 {
 #ifdef FEAT_GUI
     if (gui.in_use)
@@ -1160,8 +1139,7 @@ clip_invert_rectangle(row, col, height, 
  * When "both" is TRUE also copy to the '+' register.
  */
     void
-clip_copy_modeless_selection(both)
-    int		both UNUSED;
+clip_copy_modeless_selection(int both UNUSED)
 {
     char_u	*buffer;
     char_u	*bufp;
@@ -1344,10 +1322,7 @@ clip_copy_modeless_selection(both)
 #define CHAR_CLASS(c)	(c <= ' ' ? ' ' : vim_iswordc(c))
 
     static void
-clip_get_word_boundaries(cb, row, col)
-    VimClipboard	*cb;
-    int			row;
-    int			col;
+clip_get_word_boundaries(VimClipboard *cb, int row, int col)
 {
     int		start_class;
     int		temp_col;
@@ -1406,8 +1381,7 @@ clip_get_word_boundaries(cb, row, col)
  * line.
  */
     static int
-clip_get_line_end(row)
-    int		row;
+clip_get_line_end(int row)
 {
     int	    i;
 
@@ -1424,12 +1398,12 @@ clip_get_line_end(row)
  * beginning or end and inverting the changed area(s).
  */
     static void
-clip_update_modeless_selection(cb, row1, col1, row2, col2)
-    VimClipboard    *cb;
-    int		    row1;
-    int		    col1;
-    int		    row2;
-    int		    col2;
+clip_update_modeless_selection(
+    VimClipboard    *cb,
+    int		    row1,
+    int		    col1,
+    int		    row2,
+    int		    col2)
 {
     /* See if we changed at the beginning of the selection */
     if (row1 != cb->start.lnum || col1 != (int)cb->start.col)
@@ -1451,8 +1425,7 @@ clip_update_modeless_selection(cb, row1,
 }
 
     int
-clip_gen_own_selection(cbd)
-    VimClipboard	*cbd;
+clip_gen_own_selection(VimClipboard *cbd)
 {
 #ifdef FEAT_XCLIPBOARD
 # ifdef FEAT_GUI
@@ -1467,8 +1440,7 @@ clip_gen_own_selection(cbd)
 }
 
     void
-clip_gen_lose_selection(cbd)
-    VimClipboard	*cbd;
+clip_gen_lose_selection(VimClipboard *cbd)
 {
 #ifdef FEAT_XCLIPBOARD
 # ifdef FEAT_GUI
@@ -1483,8 +1455,7 @@ clip_gen_lose_selection(cbd)
 }
 
     void
-clip_gen_set_selection(cbd)
-    VimClipboard	*cbd;
+clip_gen_set_selection(VimClipboard *cbd)
 {
     if (!clip_did_set_selection)
     {
@@ -1510,8 +1481,7 @@ clip_gen_set_selection(cbd)
 }
 
     void
-clip_gen_request_selection(cbd)
-    VimClipboard	*cbd;
+clip_gen_request_selection(VimClipboard *cbd)
 {
 #ifdef FEAT_XCLIPBOARD
 # ifdef FEAT_GUI
@@ -1526,8 +1496,7 @@ clip_gen_request_selection(cbd)
 }
 
     int
-clip_gen_owner_exists(cbd)
-    VimClipboard	*cbd UNUSED;
+clip_gen_owner_exists(VimClipboard *cbd UNUSED)
 {
 #ifdef FEAT_XCLIPBOARD
 # ifdef FEAT_GUI_GTK
@@ -1584,20 +1553,20 @@ static int	inbufcount = 0;	    /* number
  */
 
     int
-vim_is_input_buf_full()
+vim_is_input_buf_full(void)
 {
     return (inbufcount >= INBUFLEN);
 }
 
     int
-vim_is_input_buf_empty()
+vim_is_input_buf_empty(void)
 {
     return (inbufcount == 0);
 }
 
 #if defined(FEAT_OLE) || defined(PROTO)
     int
-vim_free_in_input_buf()
+vim_free_in_input_buf(void)
 {
     return (INBUFLEN - inbufcount);
 }
@@ -1605,7 +1574,7 @@ vim_free_in_input_buf()
 
 #if defined(FEAT_GUI_GTK) || defined(PROTO)
     int
-vim_used_in_input_buf()
+vim_used_in_input_buf(void)
 {
     return inbufcount;
 }
@@ -1617,7 +1586,7 @@ vim_used_in_input_buf()
  * The returned pointer must be passed to set_input_buf() later.
  */
     char_u *
-get_input_buf()
+get_input_buf(void)
 {
     garray_T	*gap;
 
@@ -1640,8 +1609,7 @@ get_input_buf()
  * The allocated memory is freed, this only works once!
  */
     void
-set_input_buf(p)
-    char_u	*p;
+set_input_buf(char_u *p)
 {
     garray_T	*gap = (garray_T *)p;
 
@@ -1669,9 +1637,7 @@ set_input_buf(p)
  * CSI KS_EXTRA KE_CSI.  K_SPECIAL doesn't require translation.
  */
     void
-add_to_input_buf(s, len)
-    char_u  *s;
-    int	    len;
+add_to_input_buf(char_u *s, int len)
 {
     if (inbufcount + len > INBUFLEN + MAX_KEY_CODE_LEN)
 	return;	    /* Shouldn't ever happen! */
@@ -1719,9 +1685,7 @@ add_to_input_buf_csi(char_u *str, int le
 
 #if defined(FEAT_HANGULIN) || defined(PROTO)
     void
-push_raw_key(s, len)
-    char_u  *s;
-    int	    len;
+push_raw_key(char_u *s, int len)
 {
     char_u *tmpbuf;
 
@@ -1741,7 +1705,7 @@ push_raw_key(s, len)
 	|| defined(PROTO)
 /* Remove everything from the input buffer.  Called when ^C is found */
     void
-trash_input_buf()
+trash_input_buf(void)
 {
     inbufcount = 0;
 }
@@ -1753,9 +1717,7 @@ trash_input_buf()
  * Note: this function used to be Read() in unix.c
  */
     int
-read_from_input_buf(buf, maxlen)
-    char_u  *buf;
-    long    maxlen;
+read_from_input_buf(char_u *buf, long maxlen)
 {
     if (inbufcount == 0)	/* if the buffer is empty, fill it */
 	fill_input_buf(TRUE);
@@ -1769,8 +1731,7 @@ read_from_input_buf(buf, maxlen)
 }
 
     void
-fill_input_buf(exit_on_error)
-    int	exit_on_error UNUSED;
+fill_input_buf(int exit_on_error UNUSED)
 {
 #if defined(UNIX) || defined(VMS) || defined(MACOS_X_UNIX)
     int		len;
@@ -1948,7 +1909,7 @@ fill_input_buf(exit_on_error)
  * Exit because of an input read error.
  */
     void
-read_error_exit()
+read_error_exit(void)
 {
     if (silent_mode)	/* Normal way to exit for "ex -s" */
 	getout(0);
@@ -1961,7 +1922,7 @@ read_error_exit()
  * May update the shape of the cursor.
  */
     void
-ui_cursor_shape()
+ui_cursor_shape(void)
 {
 # ifdef FEAT_GUI
     if (gui.in_use)
@@ -1986,8 +1947,7 @@ ui_cursor_shape()
  * Check bounds for column number
  */
     int
-check_col(col)
-    int	    col;
+check_col(int col)
 {
     if (col < 0)
 	return 0;
@@ -2000,8 +1960,7 @@ check_col(col)
  * Check bounds for row number
  */
     int
-check_row(row)
-    int	    row;
+check_row(int row)
 {
     if (row < 0)
 	return 0;
@@ -2024,7 +1983,7 @@ check_row(row)
  * Used for Motif and Athena GUI and the xterm clipboard.
  */
     void
-open_app_context()
+open_app_context(void)
 {
     if (app_context == NULL)
     {
@@ -2044,8 +2003,7 @@ static Atom	targets_atom;
 static Atom	timestamp_atom;	/* Used to get a timestamp */
 
     void
-x11_setup_atoms(dpy)
-    Display	*dpy;
+x11_setup_atoms(Display *dpy)
 {
     vim_atom	       = XInternAtom(dpy, VIM_ATOM_NAME,   False);
 #ifdef FEAT_MBYTE
@@ -2073,11 +2031,11 @@ static void  clip_x11_request_selection_
  * Property callback to get a timestamp for XtOwnSelection.
  */
     static void
-clip_x11_timestamp_cb(w, n, event, cont)
-    Widget	w;
-    XtPointer	n UNUSED;
-    XEvent	*event;
-    Boolean	*cont UNUSED;
+clip_x11_timestamp_cb(
+    Widget	w,
+    XtPointer	n UNUSED,
+    XEvent	*event,
+    Boolean	*cont UNUSED)
 {
     Atom	    actual_type;
     int		    format;
@@ -2119,23 +2077,21 @@ clip_x11_timestamp_cb(w, n, event, cont)
 }
 
     void
-x11_setup_selection(w)
-    Widget	w;
+x11_setup_selection(Widget w)
 {
     XtAddEventHandler(w, PropertyChangeMask, False,
 	    /*(XtEventHandler)*/clip_x11_timestamp_cb, (XtPointer)NULL);
 }
 
     static void
-clip_x11_request_selection_cb(w, success, sel_atom, type, value, length,
-			      format)
-    Widget	w UNUSED;
-    XtPointer	success;
-    Atom	*sel_atom;
-    Atom	*type;
-    XtPointer	value;
-    long_u	*length;
-    int		*format;
+clip_x11_request_selection_cb(
+    Widget	w UNUSED,
+    XtPointer	success,
+    Atom	*sel_atom,
+    Atom	*type,
+    XtPointer	value,
+    long_u	*length,
+    int		*format)
 {
     int		motion_type = MAUTO;
     long_u	len;
@@ -2241,10 +2197,10 @@ clip_x11_request_selection_cb(w, success
 }
 
     void
-clip_x11_request_selection(myShell, dpy, cbd)
-    Widget	myShell;
-    Display	*dpy;
-    VimClipboard	*cbd;
+clip_x11_request_selection(
+    Widget	myShell,
+    Display	*dpy,
+    VimClipboard	*cbd)
 {
     XEvent	event;
     Atom	type;
@@ -2346,14 +2302,14 @@ clip_x11_request_selection(myShell, dpy,
 }
 
     static Boolean
-clip_x11_convert_selection_cb(w, sel_atom, target, type, value, length, format)
-    Widget	w UNUSED;
-    Atom	*sel_atom;
-    Atom	*target;
-    Atom	*type;
-    XtPointer	*value;
-    long_u	*length;
-    int		*format;
+clip_x11_convert_selection_cb(
+    Widget	w UNUSED,
+    Atom	*sel_atom,
+    Atom	*target,
+    Atom	*type,
+    XtPointer	*value,
+    long_u	*length,
+    int		*format)
 {
     char_u	*string;
     char_u	*result;
@@ -2488,9 +2444,7 @@ clip_x11_convert_selection_cb(w, sel_ato
 }
 
     static void
-clip_x11_lose_ownership_cb(w, sel_atom)
-    Widget  w UNUSED;
-    Atom    *sel_atom;
+clip_x11_lose_ownership_cb(Widget w UNUSED, Atom *sel_atom)
 {
     if (*sel_atom == clip_plus.sel_atom)
 	clip_lose_selection(&clip_plus);
@@ -2499,18 +2453,14 @@ clip_x11_lose_ownership_cb(w, sel_atom)
 }
 
     void
-clip_x11_lose_selection(myShell, cbd)
-    Widget		myShell;
-    VimClipboard	*cbd;
+clip_x11_lose_selection(Widget myShell, VimClipboard *cbd)
 {
     XtDisownSelection(myShell, cbd->sel_atom,
 				XtLastTimestampProcessed(XtDisplay(myShell)));
 }
 
     int
-clip_x11_own_selection(myShell, cbd)
-    Widget		myShell;
-    VimClipboard	*cbd;
+clip_x11_own_selection(Widget myShell, VimClipboard *cbd)
 {
     /* When using the GUI we have proper timestamps, use the one of the last
      * event.  When in the console we don't get events (the terminal gets
@@ -2542,14 +2492,12 @@ clip_x11_own_selection(myShell, cbd)
  * will fill in the selection only when requested by another app.
  */
     void
-clip_x11_set_selection(cbd)
-    VimClipboard *cbd UNUSED;
+clip_x11_set_selection(VimClipboard *cbd UNUSED)
 {
 }
 
     int
-clip_x11_owner_exists(cbd)
-    VimClipboard	*cbd;
+clip_x11_owner_exists(VimClipboard *cbd)
 {
     return XGetSelectionOwner(X_DISPLAY, cbd->sel_atom) != None;
 }
@@ -2561,9 +2509,7 @@ clip_x11_owner_exists(cbd)
  * Get the contents of the X CUT_BUFFER0 and put it in "cbd".
  */
     void
-yank_cut_buffer0(dpy, cbd)
-    Display		*dpy;
-    VimClipboard	*cbd;
+yank_cut_buffer0(Display *dpy, VimClipboard *cbd)
 {
     int		nbytes = 0;
     char_u	*buffer = (char_u *)XFetchBuffer(dpy, &nbytes, 0);
@@ -2638,10 +2584,10 @@ yank_cut_buffer0(dpy, cbd)
  * remembered.
  */
     int
-jump_to_mouse(flags, inclusive, which_button)
-    int		flags;
-    int		*inclusive;	/* used for inclusive operator, can be NULL */
-    int		which_button;	/* MOUSE_LEFT, MOUSE_RIGHT, MOUSE_MIDDLE */
+jump_to_mouse(
+    int		flags,
+    int		*inclusive,	/* used for inclusive operator, can be NULL */
+    int		which_button)	/* MOUSE_LEFT, MOUSE_RIGHT, MOUSE_MIDDLE */
 {
     static int	on_status_line = 0;	/* #lines below bottom of window */
 #ifdef FEAT_VERTSPLIT
@@ -3051,11 +2997,11 @@ retnomove:
  * Returns TRUE if the position is below the last line.
  */
     int
-mouse_comp_pos(win, rowp, colp, lnump)
-    win_T	*win;
-    int		*rowp;
-    int		*colp;
-    linenr_T	*lnump;
+mouse_comp_pos(
+    win_T	*win,
+    int		*rowp,
+    int		*colp,
+    linenr_T	*lnump)
 {
     int		col = *colp;
     int		row = *rowp;
@@ -3140,9 +3086,7 @@ mouse_comp_pos(win, rowp, colp, lnump)
  * updated to become relative to the top-left of the window.
  */
     win_T *
-mouse_find_win(rowp, colp)
-    int		*rowp;
-    int		*colp UNUSED;
+mouse_find_win(int *rowp, int *colp UNUSED)
 {
     frame_T	*fp;
 
@@ -3184,8 +3128,7 @@ mouse_find_win(rowp, colp)
  * Translate window coordinates to buffer position without any side effects
  */
     int
-get_fpos_of_mouse(mpos)
-    pos_T	*mpos;
+get_fpos_of_mouse(pos_T *mpos)
 {
     win_T	*wp;
     int		row = mouse_row;
@@ -3232,10 +3175,7 @@ get_fpos_of_mouse(mpos)
  * The first column is one.
  */
     int
-vcol2col(wp, lnum, vcol)
-    win_T	*wp;
-    linenr_T	lnum;
-    int		vcol;
+vcol2col(win_T *wp, linenr_T lnum, int vcol)
 {
     /* try to advance to the specified column */
     int		count = 0;
@@ -3260,8 +3200,8 @@ vcol2col(wp, lnum, vcol)
  * be done in the console (Win32).
  */
     void
-ui_focus_change(in_focus)
-    int		in_focus;	/* TRUE if focus gained. */
+ui_focus_change(
+    int		in_focus)	/* TRUE if focus gained. */
 {
     static time_t	last_time = (time_t)0;
     int			need_redraw = FALSE;
@@ -3329,8 +3269,7 @@ ui_focus_change(in_focus)
  * Save current Input Method status to specified place.
  */
     void
-im_save_status(psave)
-    long *psave;
+im_save_status(long *psave)
 {
     /* Don't save when 'imdisable' is set or "xic" is NULL, IM is always
      * disabled then (but might start later).