diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-01-30 17:24:07 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-01-30 17:24:07 +0100 |
commit | 68c2f638e65d914dc6e84eb7ce2624f08af525c0 (patch) | |
tree | 051b6b7500c6ac80c45cdeff26296c5b7acb88ff /src/gui_x11.c | |
parent | 66f948e928d5e0cd3123af902aa8ac1613534c94 (diff) | |
download | vim-git-68c2f638e65d914dc6e84eb7ce2624f08af525c0.tar.gz |
patch 7.4.1208v7.4.1208
Problem: Using old style function declarations.
Solution: Change to new style function declarations. (script by Hirohito
Higashi)
Diffstat (limited to 'src/gui_x11.c')
-rw-r--r-- | src/gui_x11.c | 404 |
1 files changed, 172 insertions, 232 deletions
diff --git a/src/gui_x11.c b/src/gui_x11.c index 01e9394b8..af3c3a919 100644 --- a/src/gui_x11.c +++ b/src/gui_x11.c @@ -571,19 +571,19 @@ static char **gui_argv = NULL; */ static void -gui_x11_timer_cb(timed_out, interval_id) - XtPointer timed_out; - XtIntervalId *interval_id UNUSED; +gui_x11_timer_cb( + XtPointer timed_out, + XtIntervalId *interval_id UNUSED) { *((int *)timed_out) = TRUE; } static void -gui_x11_visibility_cb(w, dud, event, dum) - Widget w UNUSED; - XtPointer dud UNUSED; - XEvent *event; - Boolean *dum UNUSED; +gui_x11_visibility_cb( + Widget w UNUSED, + XtPointer dud UNUSED, + XEvent *event, + Boolean *dum UNUSED) { if (event->type != VisibilityNotify) return; @@ -602,11 +602,11 @@ gui_x11_visibility_cb(w, dud, event, dum) } static void -gui_x11_expose_cb(w, dud, event, dum) - Widget w UNUSED; - XtPointer dud UNUSED; - XEvent *event; - Boolean *dum UNUSED; +gui_x11_expose_cb( + Widget w UNUSED, + XtPointer dud UNUSED, + XEvent *event, + Boolean *dum UNUSED) { XExposeEvent *gevent; int new_x; @@ -678,11 +678,11 @@ shellRectangle(Widget shell, XRectangle *r) #endif static void -gui_x11_resize_window_cb(w, dud, event, dum) - Widget w UNUSED; - XtPointer dud UNUSED; - XEvent *event; - Boolean *dum UNUSED; +gui_x11_resize_window_cb( + Widget w UNUSED, + XtPointer dud UNUSED, + XEvent *event, + Boolean *dum UNUSED) { static int lastWidth, lastHeight; @@ -724,31 +724,31 @@ gui_x11_resize_window_cb(w, dud, event, dum) } static void -gui_x11_focus_change_cb(w, data, event, dum) - Widget w UNUSED; - XtPointer data UNUSED; - XEvent *event; - Boolean *dum UNUSED; +gui_x11_focus_change_cb( + Widget w UNUSED, + XtPointer data UNUSED, + XEvent *event, + Boolean *dum UNUSED) { gui_focus_change(event->type == FocusIn); } static void -gui_x11_enter_cb(w, data, event, dum) - Widget w UNUSED; - XtPointer data UNUSED; - XEvent *event UNUSED; - Boolean *dum UNUSED; +gui_x11_enter_cb( + Widget w UNUSED, + XtPointer data UNUSED, + XEvent *event UNUSED, + Boolean *dum UNUSED) { gui_focus_change(TRUE); } static void -gui_x11_leave_cb(w, data, event, dum) - Widget w UNUSED; - XtPointer data UNUSED; - XEvent *event UNUSED; - Boolean *dum UNUSED; +gui_x11_leave_cb( + Widget w UNUSED, + XtPointer data UNUSED, + XEvent *event UNUSED, + Boolean *dum UNUSED) { gui_focus_change(FALSE); } @@ -760,11 +760,11 @@ gui_x11_leave_cb(w, data, event, dum) #endif void -gui_x11_key_hit_cb(w, dud, event, dum) - Widget w UNUSED; - XtPointer dud UNUSED; - XEvent *event; - Boolean *dum UNUSED; +gui_x11_key_hit_cb( + Widget w UNUSED, + XtPointer dud UNUSED, + XEvent *event, + Boolean *dum UNUSED) { XKeyPressedEvent *ev_press; #ifdef FEAT_XIM @@ -1071,11 +1071,11 @@ theend: } static void -gui_x11_mouse_cb(w, dud, event, dum) - Widget w UNUSED; - XtPointer dud UNUSED; - XEvent *event; - Boolean *dum UNUSED; +gui_x11_mouse_cb( + Widget w UNUSED, + XtPointer dud UNUSED, + XEvent *event, + Boolean *dum UNUSED) { static XtIntervalId timer = (XtIntervalId)0; static int timed_out = TRUE; @@ -1166,10 +1166,10 @@ gui_x11_mouse_cb(w, dud, event, dum) #ifdef FEAT_SNIFF /* ARGSUSED */ static void -gui_x11_sniff_request_cb(closure, source, id) - XtPointer closure UNUSED; - int *source UNUSED; - XtInputId *id UNUSED; +gui_x11_sniff_request_cb( + XtPointer closure UNUSED, + int *source UNUSED, + XtInputId *id UNUSED) { static char_u bytes[3] = {CSI, (int)KS_EXTRA, (int)KE_SNIFF}; @@ -1187,9 +1187,7 @@ gui_x11_sniff_request_cb(closure, source, id) * when vim is started, whether or not the GUI has been started. */ void -gui_mch_prepare(argc, argv) - int *argc; - char **argv; +gui_mch_prepare(int *argc, char **argv) { int arg; int i; @@ -1285,7 +1283,7 @@ gui_mch_prepare(argc, argv) * Return OK or FAIL. */ int -gui_mch_init_check() +gui_mch_init_check(void) { #ifdef FEAT_XIM XtSetLanguageProc(NULL, NULL, NULL); @@ -1315,10 +1313,10 @@ static XtInputId _xsmp_xtinputid; static void local_xsmp_handle_requests(XtPointer c, int *s, XtInputId *i); static void -local_xsmp_handle_requests(c, s, i) - XtPointer c UNUSED; - int *s UNUSED; - XtInputId *i UNUSED; +local_xsmp_handle_requests( + XtPointer c UNUSED, + int *s UNUSED, + XtInputId *i UNUSED) { if (xsmp_handle_requests() == FAIL) XtRemoveInput(_xsmp_xtinputid); @@ -1331,7 +1329,7 @@ local_xsmp_handle_requests(c, s, i) * Returns OK for success, FAIL when the GUI can't be started. */ int -gui_mch_init() +gui_mch_init(void) { XtGCMask gc_mask; XGCValues gc_vals; @@ -1575,7 +1573,7 @@ gui_mch_init() * Called when starting the GUI fails after calling gui_mch_init(). */ void -gui_mch_uninit() +gui_mch_uninit(void) { gui_x11_destroy_widgets(); XtCloseDisplay(gui.dpy); @@ -1589,7 +1587,7 @@ gui_mch_uninit() * Called when the foreground or background color has been changed. */ void -gui_mch_new_colors() +gui_mch_new_colors(void) { long_u gc_mask; XGCValues gc_vals; @@ -1619,7 +1617,7 @@ gui_mch_new_colors() * Open the GUI window which was created by a call to gui_mch_init(). */ int -gui_mch_open() +gui_mch_open(void) { /* Actually open the window */ XtRealizeWidget(vimShell); @@ -1700,7 +1698,7 @@ gui_mch_open() * Convert the tooltip fontset name to an XFontSet. */ void -gui_init_tooltip_font() +gui_init_tooltip_font(void) { XrmValue from, to; @@ -1719,7 +1717,7 @@ gui_init_tooltip_font() #if defined(FEAT_MENU) || defined(PROTO) /* Convert the menu font/fontset name to an XFontStruct/XFontset */ void -gui_init_menu_font() +gui_init_menu_font(void) { XrmValue from, to; @@ -1748,8 +1746,7 @@ gui_init_menu_font() #endif void -gui_mch_exit(rc) - int rc UNUSED; +gui_mch_exit(int rc UNUSED) { #if 0 /* Lesstif gives an error message here, and so does Solaris. The man page @@ -1764,8 +1761,7 @@ gui_mch_exit(rc) * Get the position of the top left corner of the window. */ int -gui_mch_get_winpos(x, y) - int *x, *y; +gui_mch_get_winpos(int *x, *y) { Dimension xpos, ypos; @@ -1783,8 +1779,7 @@ gui_mch_get_winpos(x, y) * coordinates. */ void -gui_mch_set_winpos(x, y) - int x, y; +gui_mch_set_winpos(int x, y) { XtVaSetValues(vimShell, XtNx, x, @@ -1793,15 +1788,14 @@ gui_mch_set_winpos(x, y) } void -gui_mch_set_shellsize(width, height, min_width, min_height, - base_width, base_height, direction) - int width; - int height; - int min_width; - int min_height; - int base_width; - int base_height; - int direction UNUSED; +gui_mch_set_shellsize( + int width, + int height, + int min_width, + int min_height, + int base_width, + int base_height, + int direction UNUSED) { #ifdef FEAT_XIM height += xim_get_status_area_height(), @@ -1825,9 +1819,9 @@ gui_mch_set_shellsize(width, height, min_width, min_height, * Is there no way in X to find out how wide the borders really are? */ void -gui_mch_get_screen_dimensions(screen_w, screen_h) - int *screen_w; - int *screen_h; +gui_mch_get_screen_dimensions( + int *screen_w, + int *screen_h) { *screen_w = DisplayWidth(gui.dpy, DefaultScreen(gui.dpy)) - 10; *screen_h = DisplayHeight(gui.dpy, DefaultScreen(gui.dpy)) - p_ghr; @@ -1840,9 +1834,9 @@ gui_mch_get_screen_dimensions(screen_w, screen_h) * Return FAIL if the font could not be loaded, OK otherwise. */ int -gui_mch_init_font(font_name, do_fontset) - char_u *font_name; - int do_fontset UNUSED; +gui_mch_init_font( + char_u *font_name, + int do_fontset UNUSED) { XFontStruct *font = NULL; @@ -1970,9 +1964,7 @@ gui_mch_init_font(font_name, do_fontset) * Get a font structure for highlighting. */ GuiFont -gui_mch_get_font(name, giveErrorIfMissing) - char_u *name; - int giveErrorIfMissing; +gui_mch_get_font(char_u *name, int giveErrorIfMissing) { XFontStruct *font; @@ -2021,9 +2013,7 @@ gui_mch_get_font(name, giveErrorIfMissing) * Don't know how to get the actual name, thus use the provided name. */ char_u * -gui_mch_get_fontname(font, name) - GuiFont font UNUSED; - char_u *name; +gui_mch_get_fontname(GuiFont font UNUSED, char_u *name) { if (name == NULL) return NULL; @@ -2035,7 +2025,7 @@ gui_mch_get_fontname(font, name) * Adjust gui.char_height (after 'linespace' was changed). */ int -gui_mch_adjust_charheight() +gui_mch_adjust_charheight(void) { #ifdef FEAT_XFONTSET if (gui.fontset != NOFONTSET) @@ -2059,8 +2049,7 @@ gui_mch_adjust_charheight() * Set the current text font. */ void -gui_mch_set_font(font) - GuiFont font; +gui_mch_set_font(GuiFont font) { static Font prev_font = (Font)-1; Font fid = ((XFontStruct *)font)->fid; @@ -2083,8 +2072,7 @@ gui_mch_set_font(font) * Adjust the ascent, in case it's different. */ void -gui_mch_set_fontset(fontset) - GuiFontset fontset; +gui_mch_set_fontset(GuiFontset fontset) { current_fontset = (XFontSet)fontset; gui.char_ascent = fontset_ascent(current_fontset) + p_linespace / 2; @@ -2095,8 +2083,7 @@ gui_mch_set_fontset(fontset) * If a font is not going to be used, free its structure. */ void -gui_mch_free_font(font) - GuiFont font; +gui_mch_free_font(GuiFont font) { if (font != NOFONT) XFreeFont(gui.dpy, (XFontStruct *)font); @@ -2107,8 +2094,7 @@ gui_mch_free_font(font) * If a fontset is not going to be used, free its structure. */ void -gui_mch_free_fontset(fontset) - GuiFontset fontset; +gui_mch_free_fontset(GuiFontset fontset) { if (fontset != NOFONTSET) XFreeFontSet(gui.dpy, (XFontSet)fontset); @@ -2119,10 +2105,10 @@ gui_mch_free_fontset(fontset) * Return a reference to the fontset, or NOFONTSET when failing. */ GuiFontset -gui_mch_get_fontset(name, giveErrorIfMissing, fixed_width) - char_u *name; - int giveErrorIfMissing; - int fixed_width; +gui_mch_get_fontset( + char_u *name, + int giveErrorIfMissing, + int fixed_width) { XFontSet fontset; char **missing, *def_str; @@ -2165,8 +2151,7 @@ gui_mch_get_fontset(name, giveErrorIfMissing, fixed_width) * Check if fontset "fs" is fixed width. */ static int -check_fontset_sanity(fs) - XFontSet fs; +check_fontset_sanity(XFontSet fs) { XFontStruct **xfs; char **font_name; @@ -2216,15 +2201,14 @@ check_fontset_sanity(fs) } static int -fontset_width(fs) - XFontSet fs; +fontset_width(XFontSet fs) { - return XmbTextEscapement(fs, "Vim", 3) / 3; + return XmbTextEscapement(fs, "Vim", 3) / 3; } int -fontset_height(fs) - XFontSet fs; +fontset_height( + XFontSet fs) { XFontSetExtents *extents; @@ -2239,8 +2223,7 @@ fontset_height(fs) * characters in all fonts of the fontset. */ int -fontset_height2(fs) - XFontSet fs; +fontset_height2(XFontSet fs) { XFontSetExtents *extents; @@ -2262,8 +2245,7 @@ fontset_descent(fs) */ static int -fontset_ascent(fs) - XFontSet fs; +fontset_ascent(XFontSet fs) { XFontSetExtents *extents; @@ -2278,8 +2260,7 @@ fontset_ascent(fs) * Return INVALCOLOR for error. */ guicolor_T -gui_mch_get_color(reqname) - char_u *reqname; +gui_mch_get_color(char_u *reqname) { int i; char_u *name = reqname; @@ -2382,9 +2363,7 @@ gui_mch_get_color(reqname) * Return FAIL if not able to find or allocate a color. */ static int -find_closest_color(colormap, colorPtr) - Colormap colormap; - XColor *colorPtr; +find_closest_color(Colormap colormap, XColor *colorPtr) { double tmp, distance, closestDistance; int i, closest, numFound, cmap_size; @@ -2452,8 +2431,7 @@ find_closest_color(colormap, colorPtr) * Set the current text foreground color. */ void -gui_mch_set_fg_color(color) - guicolor_T color; +gui_mch_set_fg_color(guicolor_T color) { if (color != prev_fg_color) { @@ -2466,8 +2444,7 @@ gui_mch_set_fg_color(color) * Set the current text background color. */ void -gui_mch_set_bg_color(color) - guicolor_T color; +gui_mch_set_bg_color(guicolor_T color) { if (color != prev_bg_color) { @@ -2480,8 +2457,7 @@ gui_mch_set_bg_color(color) * Set the current text special color. */ void -gui_mch_set_sp_color(color) - guicolor_T color; +gui_mch_set_sp_color(guicolor_T color) { prev_sp_color = color; } @@ -2490,7 +2466,7 @@ gui_mch_set_sp_color(color) * create a mouse pointer that is blank */ static Cursor -gui_x11_create_blank_mouse() +gui_x11_create_blank_mouse(void) { Pixmap blank_pixmap = XCreatePixmap(gui.dpy, gui.wid, 1, 1, 1); GC gc = XCreateGC(gui.dpy, blank_pixmap, (unsigned long)0, (XGCValues*)0); @@ -2504,10 +2480,7 @@ gui_x11_create_blank_mouse() * Draw a curled line at the bottom of the character cell. */ static void -draw_curl(row, col, cells) - int row; - int col; - int cells; +draw_curl(int row, int col, int cells) { int i; int offset; @@ -2524,12 +2497,12 @@ draw_curl(row, col, cells) } void -gui_mch_draw_string(row, col, s, len, flags) - int row; - int col; - char_u *s; - int len; - int flags; +gui_mch_draw_string( + int row, + int col, + char_u *s, + int len, + int flags) { int cells = len; #ifdef FEAT_MBYTE @@ -2691,8 +2664,7 @@ gui_mch_draw_string(row, col, s, len, flags) * Return OK if the key with the termcap name "name" is supported. */ int -gui_mch_haskey(name) - char_u *name; +gui_mch_haskey(char_u *name) { int i; @@ -2707,9 +2679,7 @@ gui_mch_haskey(name) * Return the text window-id and display. Only required for X-based GUI's */ int -gui_get_x11_windis(win, dis) - Window *win; - Display **dis; +gui_get_x11_windis(Window *win, Display **dis) { *win = XtWindow(vimShell); *dis = gui.dpy; @@ -2717,14 +2687,13 @@ gui_get_x11_windis(win, dis) } void -gui_mch_beep() +gui_mch_beep(void) { XBell(gui.dpy, 0); } void -gui_mch_flash(msec) - int msec; +gui_mch_flash(int msec) { /* Do a visual beep by reversing the foreground and background colors */ XFillRectangle(gui.dpy, gui.wid, gui.invert_gc, 0, 0, @@ -2741,11 +2710,11 @@ gui_mch_flash(msec) * Invert a rectangle from row r, column c, for nr rows and nc columns. */ void -gui_mch_invert_rectangle(r, c, nr, nc) - int r; - int c; - int nr; - int nc; +gui_mch_invert_rectangle( + int r, + int c, + int nr, + int nc) { XFillRectangle(gui.dpy, gui.wid, gui.invert_gc, FILL_X(c), FILL_Y(r), (nc) * gui.char_width, (nr) * gui.char_height); @@ -2755,7 +2724,7 @@ gui_mch_invert_rectangle(r, c, nr, nc) * Iconify the GUI window. */ void -gui_mch_iconify() +gui_mch_iconify(void) { XIconifyWindow(gui.dpy, XtWindow(vimShell), DefaultScreen(gui.dpy)); } @@ -2765,7 +2734,7 @@ gui_mch_iconify() * Bring the Vim window to the foreground. */ void -gui_mch_set_foreground() +gui_mch_set_foreground(void) { XMapRaised(gui.dpy, XtWindow(vimShell)); } @@ -2775,8 +2744,7 @@ gui_mch_set_foreground() * Draw a cursor without focus. */ void -gui_mch_draw_hollow_cursor(color) - guicolor_T color; +gui_mch_draw_hollow_cursor(guicolor_T color) { int w = 1; @@ -2794,10 +2762,7 @@ gui_mch_draw_hollow_cursor(color) * color "color". */ void -gui_mch_draw_part_cursor(w, h, color) - int w; - int h; - guicolor_T color; +gui_mch_draw_part_cursor(int w, int h, guicolor_T color) { gui_mch_set_fg_color(color); @@ -2818,7 +2783,7 @@ gui_mch_draw_part_cursor(w, h, color) * immediately. */ void -gui_mch_update() +gui_mch_update(void) { XtInputMask mask, desired; @@ -2843,8 +2808,7 @@ gui_mch_update() * or FAIL otherwise. */ int -gui_mch_wait_for_chars(wtime) - long wtime; +gui_mch_wait_for_chars(long wtime) { int focus; @@ -2930,7 +2894,7 @@ gui_mch_wait_for_chars(wtime) /* Flush any output to the screen */ void -gui_mch_flush() +gui_mch_flush(void) { XFlush(gui.dpy); } @@ -2940,11 +2904,11 @@ gui_mch_flush() * (row2, col2) inclusive. */ void -gui_mch_clear_block(row1, col1, row2, col2) - int row1; - int col1; - int row2; - int col2; +gui_mch_clear_block( + int row1, + int col1, + int row2, + int col2) { int x; @@ -2958,7 +2922,7 @@ gui_mch_clear_block(row1, col1, row2, col2) } void -gui_mch_clear_all() +gui_mch_clear_all(void) { XClearArea(gui.dpy, gui.wid, 0, 0, 0, 0, False); } @@ -2968,9 +2932,7 @@ gui_mch_clear_all() * text further down within the scroll region. */ void -gui_mch_delete_lines(row, num_lines) - int row; - int num_lines; +gui_mch_delete_lines(int row, int num_lines) { if (gui.visibility == VisibilityFullyObscured) return; /* Can't see the window */ @@ -2995,9 +2957,7 @@ gui_mch_delete_lines(row, num_lines) * following text within the scroll region. */ void -gui_mch_insert_lines(row, num_lines) - int row; - int num_lines; +gui_mch_insert_lines(int row, int num_lines) { if (gui.visibility == VisibilityFullyObscured) return; /* Can't see the window */ @@ -3020,7 +2980,7 @@ gui_mch_insert_lines(row, num_lines) * Update the region revealed by scrolling up/down. */ static void -gui_x11_check_copy_area() +gui_x11_check_copy_area(void) { XEvent event; XGraphicsExposeEvent *gevent; @@ -3052,29 +3012,26 @@ gui_x11_check_copy_area() */ void -clip_mch_lose_selection(cbd) - VimClipboard *cbd; +clip_mch_lose_selection(VimClipboard *cbd) { clip_x11_lose_selection(vimShell, cbd); } int -clip_mch_own_selection(cbd) - VimClipboard *cbd; +clip_mch_own_selection(VimClipboard *cbd) { return clip_x11_own_selection(vimShell, cbd); } void -clip_mch_request_selection(cbd) - VimClipboard *cbd; +clip_mch_request_selection(VimClipboard *cbd) { - clip_x11_request_selection(vimShell, gui.dpy, cbd); + clip_x11_request_selection(vimShell, gui.dpy, cbd); } void -clip_mch_set_selection(cbd) - VimClipboard *cbd; +clip_mch_set_selection( + VimClipboard *cbd) { clip_x11_set_selection(cbd); } @@ -3088,9 +3045,7 @@ clip_mch_set_selection(cbd) * Make a menu either grey or not grey. */ void -gui_mch_menu_grey(menu, grey) - vimmenu_T *menu; - int grey; +gui_mch_menu_grey(vimmenu_T *menu, int grey) { if (menu->id != (Widget)0) { @@ -3110,9 +3065,7 @@ gui_mch_menu_grey(menu, grey) * Make menu item hidden or not hidden */ void -gui_mch_menu_hidden(menu, hidden) - vimmenu_T *menu; - int hidden; +gui_mch_menu_hidden(vimmenu_T *menu, int hidden) { if (menu->id != (Widget)0) { @@ -3127,16 +3080,16 @@ gui_mch_menu_hidden(menu, hidden) * This is called after setting all the menus to grey/hidden or not. */ void -gui_mch_draw_menubar() +gui_mch_draw_menubar(void) { /* Nothing to do in X */ } void -gui_x11_menu_cb(w, client_data, call_data) - Widget w UNUSED; - XtPointer client_data; - XtPointer call_data UNUSED; +gui_x11_menu_cb( + Widget w UNUSED, + XtPointer client_data, + XtPointer call_data UNUSED) { gui_menu_cb((vimmenu_T *)client_data); } @@ -3150,11 +3103,11 @@ gui_x11_menu_cb(w, client_data, call_data) * Should put up a requester! */ static void -gui_x11_wm_protocol_handler(w, client_data, event, dum) - Widget w UNUSED; - XtPointer client_data UNUSED; - XEvent *event; - Boolean *dum UNUSED; +gui_x11_wm_protocol_handler( + Widget w UNUSED, + XtPointer client_data UNUSED, + XEvent *event, + Boolean *dum UNUSED) { /* * Only deal with Client messages. @@ -3192,11 +3145,11 @@ gui_x11_wm_protocol_handler(w, client_data, event, dum) * Function called when property changed. Check for incoming commands */ static void -gui_x11_send_event_handler(w, client_data, event, dum) - Widget w UNUSED; - XtPointer client_data UNUSED; - XEvent *event; - Boolean *dum UNUSED; +gui_x11_send_event_handler( + Widget w UNUSED, + XtPointer client_data UNUSED, + XEvent *event, + Boolean *dum UNUSED) { XPropertyEvent *e = (XPropertyEvent *) event; @@ -3228,8 +3181,7 @@ static long_u blink_offtime = 250; static XtIntervalId blink_timer = (XtIntervalId)0; void -gui_mch_set_blinking(waittime, on, off) - long waittime, on, off; +gui_mch_set_blinking(long waittime, on, off) { blink_waittime = waittime; blink_ontime = on; @@ -3240,7 +3192,7 @@ gui_mch_set_blinking(waittime, on, off) * Stop the cursor blinking. Show the cursor if it wasn't shown. */ void -gui_mch_stop_blink() +gui_mch_stop_blink(void) { if (blink_timer != (XtIntervalId)0) { @@ -3257,7 +3209,7 @@ gui_mch_stop_blink() * waiting time and shows the cursor. */ void -gui_mch_start_blink() +gui_mch_start_blink(void) { if (blink_timer != (XtIntervalId)0) XtRemoveTimeOut(blink_timer); @@ -3272,9 +3224,9 @@ gui_mch_start_blink() } static void -gui_x11_blink_cb(timed_out, interval_id) - XtPointer timed_out UNUSED; - XtIntervalId *interval_id UNUSED; +gui_x11_blink_cb( + XtPointer timed_out UNUSED, + XtIntervalId *interval_id UNUSED) { if (blink_state == BLINK_ON) { @@ -3296,8 +3248,7 @@ gui_x11_blink_cb(timed_out, interval_id) * Return the RGB value of a pixel as a long. */ long_u -gui_mch_get_rgb(pixel) - guicolor_T pixel; +gui_mch_get_rgb(guicolor_T pixel) { XColor xc; Colormap colormap; @@ -3314,9 +3265,7 @@ gui_mch_get_rgb(pixel) * Add the callback functions. */ void -gui_x11_callbacks(textArea, vimForm) - Widget textArea; - Widget vimForm; +gui_x11_callbacks(Widget textArea, Widget vimForm) { XtAddEventHandler(textArea, VisibilityChangeMask, FALSE, gui_x11_visibility_cb, (XtPointer)0); @@ -3379,9 +3328,7 @@ gui_mch_getmouse(int *x, int *y) } void -gui_mch_setmouse(x, y) - int x; - int y; +gui_mch_setmouse(int x, int y) { if (gui.wid) XWarpPointer(gui.dpy, (Window)0, gui.wid, 0, 0, 0, 0, x, y); @@ -3389,7 +3336,7 @@ gui_mch_setmouse(x, y) #if (defined(FEAT_GUI_MOTIF) && defined(FEAT_MENU)) || defined(PROTO) XButtonPressedEvent * -gui_x11_get_last_mouse_event() +gui_x11_get_last_mouse_event(void) { return &last_mouse_event; } @@ -3402,10 +3349,7 @@ gui_x11_get_last_mouse_event() # define SIGN_WIDTH (gui.char_width * 2) void -gui_mch_drawsign(row, col, typenr) - int row; - int col; - int typenr; +gui_mch_drawsign(int row, int col, int typenr) { XImage *sign; @@ -3421,8 +3365,7 @@ gui_mch_drawsign(row, col, typenr) } void * -gui_mch_register_sign(signfile) - char_u *signfile; +gui_mch_register_sign(char_u *signfile) { XpmAttributes attrs; XImage *sign = NULL; @@ -3462,8 +3405,7 @@ gui_mch_register_sign(signfile) } void -gui_mch_destroy_sign(sign) - void *sign; +gui_mch_destroy_sign(void *sign) { XDestroyImage((XImage*)sign); } @@ -3480,8 +3422,8 @@ static int last_shape = 0; * Use the blank mouse pointer or not. */ void -gui_mch_mousehide(hide) - int hide; /* TRUE = use blank ptr, FALSE = use parent ptr */ +gui_mch_mousehide( + int hide) /* TRUE = use blank ptr, FALSE = use parent ptr */ { if (gui.pointer_hidden != hide) { @@ -3523,8 +3465,7 @@ static int mshape_ids[] = }; void -mch_set_mouse_shape(shape) - int shape; +mch_set_mouse_shape(int shape) { int id; @@ -3560,8 +3501,7 @@ mch_set_mouse_shape(shape) * passing a normal menu item here. Can't explain that, but better avoid it. */ void -gui_mch_menu_set_tip(menu) - vimmenu_T *menu; +gui_mch_menu_set_tip(vimmenu_T *menu) { if (menu->id != NULL && menu->parent != NULL && menu_is_toolbar(menu->parent->name)) |