Skip to content

Commit 66f948e

Browse files
committed
patch 7.4.1207
Problem: Using old style function declarations. Solution: Change to new style function declarations. (script by Hirohito Higashi)
1 parent 78c0b7d commit 66f948e

12 files changed

Lines changed: 980 additions & 1373 deletions

File tree

src/fold.c

Lines changed: 142 additions & 232 deletions
Large diffs are not rendered by default.

src/getchar.c

Lines changed: 152 additions & 200 deletions
Large diffs are not rendered by default.

src/gui.c

Lines changed: 147 additions & 209 deletions
Large diffs are not rendered by default.

src/gui_at_fs.c

Lines changed: 105 additions & 171 deletions
Large diffs are not rendered by default.

src/gui_at_sb.c

Lines changed: 95 additions & 119 deletions
Large diffs are not rendered by default.

src/gui_athena.c

Lines changed: 122 additions & 150 deletions
Large diffs are not rendered by default.

src/gui_beval.c

Lines changed: 33 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@
1616
* Common code, invoked when the mouse is resting for a moment.
1717
*/
1818
void
19-
general_beval_cb(beval, state)
20-
BalloonEval *beval;
21-
int state UNUSED;
19+
general_beval_cb(BalloonEval *beval, int state UNUSED)
2220
{
2321
#ifdef FEAT_EVAL
2422
win_T *wp;
@@ -192,11 +190,11 @@ static void createBalloonEvalWindow(BalloonEval *);
192190
* Returns a pointer to the resulting object (NULL when out of memory).
193191
*/
194192
BalloonEval *
195-
gui_mch_create_beval_area(target, mesg, mesgCB, clientData)
196-
void *target;
197-
char_u *mesg;
198-
void (*mesgCB)(BalloonEval *, int);
199-
void *clientData;
193+
gui_mch_create_beval_area(
194+
void *target,
195+
char_u *mesg,
196+
void (*mesgCB)(BalloonEval *, int),
197+
void *clientData)
200198
{
201199
#ifndef FEAT_GUI_GTK
202200
char *display_name; /* get from gui.dpy */
@@ -262,8 +260,7 @@ gui_mch_create_beval_area(target, mesg, mesgCB, clientData)
262260
* Destroy a balloon-eval and free its associated memory.
263261
*/
264262
void
265-
gui_mch_destroy_beval_area(beval)
266-
BalloonEval *beval;
263+
gui_mch_destroy_beval_area(BalloonEval *beval)
267264
{
268265
cancelBalloon(beval);
269266
removeEventHandler(beval);
@@ -278,16 +275,14 @@ gui_mch_destroy_beval_area(beval)
278275
#endif
279276

280277
void
281-
gui_mch_enable_beval_area(beval)
282-
BalloonEval *beval;
278+
gui_mch_enable_beval_area(BalloonEval *beval)
283279
{
284280
if (beval != NULL)
285281
addEventHandler(beval->target, beval);
286282
}
287283

288284
void
289-
gui_mch_disable_beval_area(beval)
290-
BalloonEval *beval;
285+
gui_mch_disable_beval_area(BalloonEval *beval)
291286
{
292287
if (beval != NULL)
293288
removeEventHandler(beval);
@@ -301,7 +296,7 @@ gui_mch_disable_beval_area(beval)
301296
* Assumption: Only one tooltip can be shown at a time.
302297
*/
303298
BalloonEval *
304-
gui_mch_currently_showing_beval()
299+
gui_mch_currently_showing_beval(void)
305300
{
306301
return current_beval;
307302
}
@@ -317,13 +312,13 @@ gui_mch_currently_showing_beval()
317312
* Returns OK or FAIL.
318313
*/
319314
int
320-
get_beval_info(beval, getword, winp, lnump, textp, colp)
321-
BalloonEval *beval;
322-
int getword;
323-
win_T **winp;
324-
linenr_T *lnump;
325-
char_u **textp;
326-
int *colp;
315+
get_beval_info(
316+
BalloonEval *beval,
317+
int getword,
318+
win_T **winp,
319+
linenr_T *lnump,
320+
char_u **textp,
321+
int *colp)
327322
{
328323
win_T *wp;
329324
int row, col;
@@ -427,9 +422,7 @@ get_beval_info(beval, getword, winp, lnump, textp, colp)
427422
* Show a balloon with "mesg".
428423
*/
429424
void
430-
gui_mch_post_balloon(beval, mesg)
431-
BalloonEval *beval;
432-
char_u *mesg;
425+
gui_mch_post_balloon(BalloonEval *beval, char_u *mesg)
433426
{
434427
beval->msg = mesg;
435428
if (mesg != NULL)
@@ -446,8 +439,7 @@ gui_mch_post_balloon(beval, mesg)
446439
* Hide the given balloon.
447440
*/
448441
void
449-
gui_mch_unpost_balloon(beval)
450-
BalloonEval *beval;
442+
gui_mch_unpost_balloon(BalloonEval *beval)
451443
{
452444
undrawBalloon(beval);
453445
}
@@ -687,9 +679,7 @@ balloon_expose_event_cb(GtkWidget *widget,
687679
#else /* !FEAT_GUI_GTK */
688680

689681
static void
690-
addEventHandler(target, beval)
691-
Widget target;
692-
BalloonEval *beval;
682+
addEventHandler(Widget target, BalloonEval *beval)
693683
{
694684
XtAddEventHandler(target,
695685
PointerMotionMask | EnterWindowMask |
@@ -700,8 +690,7 @@ addEventHandler(target, beval)
700690
}
701691

702692
static void
703-
removeEventHandler(beval)
704-
BalloonEval *beval;
693+
removeEventHandler(BalloonEval *beval)
705694
{
706695
XtRemoveEventHandler(beval->target,
707696
PointerMotionMask | EnterWindowMask |
@@ -716,11 +705,11 @@ removeEventHandler(beval)
716705
* The X event handler. All it does is call the real event handler.
717706
*/
718707
static void
719-
pointerEventEH(w, client_data, event, unused)
720-
Widget w UNUSED;
721-
XtPointer client_data;
722-
XEvent *event;
723-
Boolean *unused UNUSED;
708+
pointerEventEH(
709+
Widget w UNUSED,
710+
XtPointer client_data,
711+
XEvent *event,
712+
Boolean *unused UNUSED)
724713
{
725714
BalloonEval *beval = (BalloonEval *)client_data;
726715
pointerEvent(beval, event);
@@ -733,9 +722,7 @@ pointerEventEH(w, client_data, event, unused)
733722
*/
734723

735724
static void
736-
pointerEvent(beval, event)
737-
BalloonEval *beval;
738-
XEvent *event;
725+
pointerEvent(BalloonEval *beval, XEvent *event)
739726
{
740727
Position distance; /* a measure of how much the pointer moved */
741728
Position delta; /* used to compute distance */
@@ -866,9 +853,7 @@ pointerEvent(beval, event)
866853
}
867854

868855
static void
869-
timerRoutine(dx, id)
870-
XtPointer dx;
871-
XtIntervalId *id UNUSED;
856+
timerRoutine(XtPointer dx, XtIntervalId *id UNUSED)
872857
{
873858
BalloonEval *beval = (BalloonEval *)dx;
874859

@@ -885,8 +870,7 @@ timerRoutine(dx, id)
885870
#endif /* !FEAT_GUI_GTK */
886871

887872
static void
888-
requestBalloon(beval)
889-
BalloonEval *beval;
873+
requestBalloon(BalloonEval *beval)
890874
{
891875
if (beval->showState != ShS_PENDING)
892876
{
@@ -1177,8 +1161,7 @@ createBalloonEvalWindow(BalloonEval *beval)
11771161
* Draw a balloon.
11781162
*/
11791163
static void
1180-
drawBalloon(beval)
1181-
BalloonEval *beval;
1164+
drawBalloon(BalloonEval *beval)
11821165
{
11831166
Dimension w;
11841167
Dimension h;
@@ -1281,8 +1264,7 @@ drawBalloon(beval)
12811264
* Undraw a balloon.
12821265
*/
12831266
static void
1284-
undrawBalloon(beval)
1285-
BalloonEval *beval;
1267+
undrawBalloon(BalloonEval *beval)
12861268
{
12871269
if (beval->balloonShell != (Widget)0)
12881270
XtPopdown(beval->balloonShell);
@@ -1292,8 +1274,7 @@ undrawBalloon(beval)
12921274
}
12931275

12941276
static void
1295-
cancelBalloon(beval)
1296-
BalloonEval *beval;
1277+
cancelBalloon(BalloonEval *beval)
12971278
{
12981279
if (beval->showState == ShS_SHOWING
12991280
|| beval->showState == ShS_UPDATE_PENDING)
@@ -1309,8 +1290,7 @@ cancelBalloon(beval)
13091290

13101291

13111292
static void
1312-
createBalloonEvalWindow(beval)
1313-
BalloonEval *beval;
1293+
createBalloonEvalWindow(BalloonEval *beval)
13141294
{
13151295
Arg args[12];
13161296
int n;

src/gui_gtk.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1988,8 +1988,7 @@ entry_changed_cb(GtkWidget * entry, GtkWidget * dialog)
19881988
* ":helpfind"
19891989
*/
19901990
void
1991-
ex_helpfind(eap)
1992-
exarg_T *eap UNUSED;
1991+
ex_helpfind(exarg_T *eap UNUSED)
19931992
{
19941993
/* This will fail when menus are not loaded. Well, it's only for
19951994
* backwards compatibility anyway. */

src/gui_gtk_x11.c

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ gui_mch_prepare(int *argc, char **argv)
571571

572572
#if defined(EXITFREE) || defined(PROTO)
573573
void
574-
gui_mch_free_all()
574+
gui_mch_free_all(void)
575575
{
576576
vim_free(gui_argv);
577577
#if defined(FEAT_GUI_GNOME) && defined(FEAT_SESSION)
@@ -2224,10 +2224,10 @@ setup_save_yourself(void)
22242224
* GTK tells us that XSMP needs attention
22252225
*/
22262226
static gboolean
2227-
local_xsmp_handle_requests(source, condition, data)
2228-
GIOChannel *source UNUSED;
2229-
GIOCondition condition;
2230-
gpointer data;
2227+
local_xsmp_handle_requests(
2228+
GIOChannel *source UNUSED,
2229+
GIOCondition condition,
2230+
gpointer data)
22312231
{
22322232
if (condition == G_IO_IN)
22332233
{
@@ -3070,8 +3070,7 @@ gui_mch_update_tabline(void)
30703070
* Set the current tab to "nr". First tab is 1.
30713071
*/
30723072
void
3073-
gui_mch_set_curtab(nr)
3074-
int nr;
3073+
gui_mch_set_curtab(int nr)
30753074
{
30763075
if (gui.tabline == NULL)
30773076
return;
@@ -3944,7 +3943,7 @@ force_shell_resize_idle(gpointer data)
39443943
* Return TRUE if the main window is maximized.
39453944
*/
39463945
int
3947-
gui_mch_maximized()
3946+
gui_mch_maximized(void)
39483947
{
39493948
return (gui.mainwin != NULL && gui.mainwin->window != NULL
39503949
&& (gdk_window_get_state(gui.mainwin->window)
@@ -3955,7 +3954,7 @@ gui_mch_maximized()
39553954
* Unmaximize the main window
39563955
*/
39573956
void
3958-
gui_mch_unmaximize()
3957+
gui_mch_unmaximize(void)
39593958
{
39603959
if (gui.mainwin != NULL)
39613960
gtk_window_unmaximize(GTK_WINDOW(gui.mainwin));
@@ -3966,7 +3965,7 @@ gui_mch_unmaximize()
39663965
* new Rows and Columns. This is like resizing the window.
39673966
*/
39683967
void
3969-
gui_mch_newfont()
3968+
gui_mch_newfont(void)
39703969
{
39713970
int w, h;
39723971

src/gui_mac.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2607,8 +2607,7 @@ gui_mch_mousehide(int hide)
26072607
* the menu that we should display
26082608
*/
26092609
void
2610-
gui_mac_handle_contextual_menu(event)
2611-
EventRecord *event;
2610+
gui_mac_handle_contextual_menu(EventRecord *event)
26122611
{
26132612
/*
26142613
* Clone PopUp to use menu
@@ -3697,8 +3696,7 @@ gui_mch_set_font(GuiFont font)
36973696
* If a font is not going to be used, free its structure.
36983697
*/
36993698
void
3700-
gui_mch_free_font(font)
3701-
GuiFont font;
3699+
gui_mch_free_font(GuiFont font)
37023700
{
37033701
/*
37043702
* Free font when "font" is not 0.
@@ -6897,8 +6895,7 @@ gui_mch_update_tabline(void)
68976895
* Set the current tab to "nr". First tab is 1.
68986896
*/
68996897
void
6900-
gui_mch_set_curtab(nr)
6901-
int nr;
6898+
gui_mch_set_curtab(int nr)
69026899
{
69036900
DataBrowserItemID item = nr;
69046901
SetDataBrowserSelectedItems(dataBrowser, 1, &item, kDataBrowserItemsAssign);

0 commit comments

Comments
 (0)