diff options
-rw-r--r-- | src/gui_photon.c | 15 | ||||
-rw-r--r-- | src/gui_w32.c | 54 | ||||
-rw-r--r-- | src/gui_w48.c | 15 | ||||
-rw-r--r-- | src/gui_x11.c | 404 | ||||
-rw-r--r-- | src/hangulin.c | 84 | ||||
-rw-r--r-- | src/hardcopy.c | 313 | ||||
-rw-r--r-- | src/hashtab.c | 64 | ||||
-rw-r--r-- | src/if_cscope.c | 203 | ||||
-rw-r--r-- | src/if_mzsch.c | 2 | ||||
-rw-r--r-- | src/if_perlsfio.c | 12 | ||||
-rw-r--r-- | src/if_python.c | 4 | ||||
-rw-r--r-- | src/if_python3.c | 6 | ||||
-rw-r--r-- | src/if_ruby.c | 19 | ||||
-rw-r--r-- | src/if_sniff.c | 59 | ||||
-rw-r--r-- | src/if_tcl.c | 247 | ||||
-rw-r--r-- | src/if_xcmdsrv.c | 159 | ||||
-rw-r--r-- | src/integration.c | 6 | ||||
-rw-r--r-- | src/version.c | 2 |
18 files changed, 687 insertions, 981 deletions
diff --git a/src/gui_photon.c b/src/gui_photon.c index aa99dd74af..67ddc628a3 100644 --- a/src/gui_photon.c +++ b/src/gui_photon.c @@ -1111,9 +1111,7 @@ gui_ph_encoding_changed(int new_encoding) /****************************************************************************/ void -gui_mch_prepare(argc, argv) - int *argc; - char **argv; +gui_mch_prepare(int *argc, char **argv) { PtInit(NULL); } @@ -1720,7 +1718,7 @@ gui_mch_iconify(void) * Bring the Vim window to the foreground. */ void -gui_mch_set_foreground() +gui_mch_set_foreground(void) { PhWindowEvent_t event; @@ -1860,8 +1858,7 @@ static int mshape_ids[] = }; void -mch_set_mouse_shape(shape) - int shape; +mch_set_mouse_shape(int shape) { int id; @@ -2184,7 +2181,7 @@ gui_mch_clear_block(int row1, int col1, int row2, int col2) } void -gui_mch_clear_all() +gui_mch_clear_all(void) { PhRect_t text_rect = { { gui.border_width, gui.border_width }, @@ -3078,9 +3075,7 @@ gui_mch_get_font(char_u *vim_font_name, int report_error) * Don't know how to get the actual name, thus use the provided name. */ char_u * -gui_mch_get_fontname(font, name) - GuiFont font; - char_u *name; +gui_mch_get_fontname(GuiFont font, char_u *name) { if (name == NULL) return NULL; diff --git a/src/gui_w32.c b/src/gui_w32.c index 5fce6e06d5..6a0e0a3594 100644 --- a/src/gui_w32.c +++ b/src/gui_w32.c @@ -2246,7 +2246,7 @@ im_set_active(int active) * Get IM status. When IM is on, return not 0. Else return 0. */ int -im_get_status() +im_get_status(void) { int status = 0; HIMC hImc; @@ -4525,10 +4525,7 @@ typedef struct _signicon_t } signicon_t; void -gui_mch_drawsign(row, col, typenr) - int row; - int col; - int typenr; +gui_mch_drawsign(int row, int col, int typenr) { signicon_t *sign; int x, y, w, h; @@ -4605,8 +4602,7 @@ close_signicon_image(signicon_t *sign) } void * -gui_mch_register_sign(signfile) - char_u *signfile; +gui_mch_register_sign(char_u *signfile) { signicon_t sign, *psign; char_u *ext; @@ -4661,8 +4657,7 @@ gui_mch_register_sign(signfile) } void -gui_mch_destroy_sign(sign) - void *sign; +gui_mch_destroy_sign(void *sign) { if (sign) { @@ -4766,10 +4761,7 @@ multiline_balloon_available(void) } static void -make_tooltip(beval, text, pt) - BalloonEval *beval; - char *text; - POINT pt; +make_tooltip(BalloonEval *beval, char *text, POINT pt) { TOOLINFO *pti; int ToolInfoSize; @@ -4833,19 +4825,18 @@ make_tooltip(beval, text, pt) } static void -delete_tooltip(beval) - BalloonEval *beval; +delete_tooltip(BalloonEval *beval) { PostMessage(beval->balloon, WM_CLOSE, 0, 0); } /*ARGSUSED*/ static VOID CALLBACK -BevalTimerProc(hwnd, uMsg, idEvent, dwTime) - HWND hwnd; - UINT uMsg; - UINT_PTR idEvent; - DWORD dwTime; +BevalTimerProc( + HWND hwnd, + UINT uMsg, + UINT_PTR idEvent, + DWORD dwTime) { POINT pt; RECT rect; @@ -4883,8 +4874,7 @@ BevalTimerProc(hwnd, uMsg, idEvent, dwTime) /*ARGSUSED*/ void -gui_mch_disable_beval_area(beval) - BalloonEval *beval; +gui_mch_disable_beval_area(BalloonEval *beval) { // TRACE0("gui_mch_disable_beval_area {{{"); KillTimer(s_textArea, BevalTimerId); @@ -4893,8 +4883,7 @@ gui_mch_disable_beval_area(beval) /*ARGSUSED*/ void -gui_mch_enable_beval_area(beval) - BalloonEval *beval; +gui_mch_enable_beval_area(BalloonEval *beval) { // TRACE0("gui_mch_enable_beval_area |||"); if (beval == NULL) @@ -4905,9 +4894,7 @@ gui_mch_enable_beval_area(beval) } void -gui_mch_post_balloon(beval, mesg) - BalloonEval *beval; - char_u *mesg; +gui_mch_post_balloon(BalloonEval *beval, char_u *mesg) { POINT pt; // TRACE0("gui_mch_post_balloon {{{"); @@ -4928,11 +4915,11 @@ gui_mch_post_balloon(beval, mesg) /*ARGSUSED*/ BalloonEval * -gui_mch_create_beval_area(target, mesg, mesgCB, clientData) - void *target; /* ignored, always use s_textArea */ - char_u *mesg; - void (*mesgCB)(BalloonEval *, int); - void *clientData; +gui_mch_create_beval_area( + void *target, /* ignored, always use s_textArea */ + char_u *mesg, + void (*mesgCB)(BalloonEval *, int), + void *clientData) { /* partially stolen from gui_beval.c */ BalloonEval *beval; @@ -5010,8 +4997,7 @@ TrackUserActivity(UINT uMsg) } void -gui_mch_destroy_beval_area(beval) - BalloonEval *beval; +gui_mch_destroy_beval_area(BalloonEval *beval) { vim_free(beval); } diff --git a/src/gui_w48.c b/src/gui_w48.c index dfcc288b2f..7789ef26fd 100644 --- a/src/gui_w48.c +++ b/src/gui_w48.c @@ -1144,7 +1144,7 @@ gui_mch_new_colors(void) * Set the colors to their default values. */ void -gui_mch_def_colors() +gui_mch_def_colors(void) { gui.norm_pixel = GetSysColor(COLOR_WINDOWTEXT); gui.back_pixel = GetSysColor(COLOR_WINDOW); @@ -1390,9 +1390,7 @@ gui_mch_get_font( */ /*ARGSUSED*/ char_u * -gui_mch_get_fontname(font, name) - GuiFont font; - char_u *name; +gui_mch_get_fontname(GuiFont font, char_u *name) { if (name == NULL) return NULL; @@ -2623,8 +2621,7 @@ gui_mch_update_tabline(void) * Set the current tab to "nr". First tab is 1. */ void -gui_mch_set_curtab(nr) - int nr; +gui_mch_set_curtab(int nr) { if (s_tabhwnd == NULL) return; @@ -3258,7 +3255,7 @@ update_im_font(void) * Handler of gui.wide_font (p_guifontwide) changed notification. */ void -gui_mch_wide_font_changed() +gui_mch_wide_font_changed(void) { # ifndef MSWIN16_FASTTEXT LOGFONT lf; @@ -3385,7 +3382,7 @@ gui_mch_init_font(char_u *font_name, int fontset) * Return TRUE if the GUI window is maximized, filling the whole screen. */ int -gui_mch_maximized() +gui_mch_maximized(void) { WINDOWPLACEMENT wp; @@ -3403,7 +3400,7 @@ gui_mch_maximized() * new Rows and Columns. This is like resizing the window. */ void -gui_mch_newfont() +gui_mch_newfont(void) { RECT rect; diff --git a/src/gui_x11.c b/src/gui_x11.c index 01e9394b8a..af3c3a919d 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) { i |