summaryrefslogtreecommitdiffstats
path: root/src/gui_at_sb.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-01-30 16:39:25 +0100
committerBram Moolenaar <Bram@vim.org>2016-01-30 16:39:25 +0100
commit66f948e928d5e0cd3123af902aa8ac1613534c94 (patch)
tree7517d2849bb9feb1df2f51baef827536d715aa74 /src/gui_at_sb.c
parent78c0b7d43e5048fd71d12816659667834170c76d (diff)
patch 7.4.1207v7.4.1207
Problem: Using old style function declarations. Solution: Change to new style function declarations. (script by Hirohito Higashi)
Diffstat (limited to 'src/gui_at_sb.c')
-rw-r--r--src/gui_at_sb.c214
1 files changed, 95 insertions, 119 deletions
diff --git a/src/gui_at_sb.c b/src/gui_at_sb.c
index 1c9bab2e04..98caad58e2 100644
--- a/src/gui_at_sb.c
+++ b/src/gui_at_sb.c
@@ -222,7 +222,7 @@ WidgetClass vim_scrollbarWidgetClass = (WidgetClass)&vim_scrollbarClassRec;
#define PAGE_REPEAT 250
static void
-ClassInitialize()
+ClassInitialize(void)
{
XawInitializeWidgetSet();
XtAddConverter( XtRString, XtROrientation, XmuCvtStringToOrientation,
@@ -232,11 +232,11 @@ ClassInitialize()
#define MARGIN(sbw) (sbw)->scrollbar.thickness + (sbw)->scrollbar.shadow_width
static void
-FillArea(sbw, top, bottom, fill, draw_shadow)
- ScrollbarWidget sbw;
- Position top, bottom;
- int fill;
- int draw_shadow;
+FillArea(
+ ScrollbarWidget sbw,
+ Position top, bottom,
+ int fill,
+ int draw_shadow)
{
int tlen = bottom - top; /* length of thumb in pixels */
int sw, margin, floor;
@@ -340,8 +340,7 @@ FillArea(sbw, top, bottom, fill, draw_shadow)
*/
static void
-PaintThumb(sbw)
- ScrollbarWidget sbw;
+PaintThumb(ScrollbarWidget sbw)
{
Position oldtop, oldbot, newtop, newbot;
Dimension margin, tzl;
@@ -374,8 +373,7 @@ PaintThumb(sbw)
}
static void
-PaintArrows(sbw)
- ScrollbarWidget sbw;
+PaintArrows(ScrollbarWidget sbw)
{
XPoint point[6];
Dimension thickness = sbw->scrollbar.thickness - 1;
@@ -454,8 +452,7 @@ PaintArrows(sbw)
}
static void
-Destroy(w)
- Widget w;
+Destroy(Widget w)
{
ScrollbarWidget sbw = (ScrollbarWidget) w;
if (sbw->scrollbar.timer_id != (XtIntervalId) 0)
@@ -466,8 +463,7 @@ Destroy(w)
}
static void
-CreateGC(w)
- Widget w;
+CreateGC(Widget w)
{
ScrollbarWidget sbw = (ScrollbarWidget) w;
XGCValues gcValues;
@@ -505,8 +501,7 @@ CreateGC(w)
}
static void
-SetDimensions(sbw)
- ScrollbarWidget sbw;
+SetDimensions(ScrollbarWidget sbw)
{
if (sbw->scrollbar.orientation == XtorientVertical)
{
@@ -521,11 +516,11 @@ SetDimensions(sbw)
}
static void
-Initialize(request, new, args, num_args)
- Widget request UNUSED; /* what the client asked for */
- Widget new; /* what we're going to give him */
- ArgList args UNUSED;
- Cardinal *num_args UNUSED;
+Initialize(
+ Widget request UNUSED, /* what the client asked for */
+ Widget new, /* what we're going to give him */
+ ArgList args UNUSED,
+ Cardinal *num_args UNUSED)
{
ScrollbarWidget sbw = (ScrollbarWidget) new;
@@ -549,10 +544,10 @@ Initialize(request, new, args, num_args)
}
static void
-Realize(w, valueMask, attributes)
- Widget w;
- Mask *valueMask;
- XSetWindowAttributes *attributes;
+Realize(
+ Widget w,
+ Mask *valueMask,
+ XSetWindowAttributes *attributes)
{
/* The Simple widget actually stuffs the value in the valuemask. */
(*vim_scrollbarWidgetClass->core_class.superclass->core_class.realize)
@@ -560,12 +555,12 @@ Realize(w, valueMask, attributes)
}
static Boolean
-SetValues(current, request, desired, args, num_args)
- Widget current; /* what I am */
- Widget request UNUSED; /* what he wants me to be */
- Widget desired; /* what I will become */
- ArgList args UNUSED;
- Cardinal *num_args UNUSED;
+SetValues(
+ Widget current, /* what I am */
+ Widget request UNUSED, /* what he wants me to be */
+ Widget desired, /* what I will become */
+ ArgList args UNUSED,
+ Cardinal *num_args UNUSED)
{
ScrollbarWidget sbw = (ScrollbarWidget) current;
ScrollbarWidget dsbw = (ScrollbarWidget) desired;
@@ -601,8 +596,7 @@ SetValues(current, request, desired, args, num_args)
}
static void
-Resize(w)
- Widget w;
+Resize(Widget w)
{
/* ForgetGravity has taken care of background, but thumb may
* have to move as a result of the new size. */
@@ -612,10 +606,7 @@ Resize(w)
static void
-Redisplay(w, event, region)
- Widget w;
- XEvent *event;
- Region region;
+Redisplay(Widget w, XEvent *event, Region region)
{
ScrollbarWidget sbw = (ScrollbarWidget) w;
int x, y;
@@ -650,8 +641,7 @@ Redisplay(w, event, region)
static Boolean
-CompareEvents(oldEvent, newEvent)
- XEvent *oldEvent, *newEvent;
+CompareEvents(XEvent *oldEvent, *newEvent)
{
#define Check(field) if (newEvent->field != oldEvent->field) return False;
@@ -693,10 +683,7 @@ struct EventData
};
static Bool
-PeekNotifyEvent(dpy, event, args)
- Display *dpy;
- XEvent *event;
- char *args;
+PeekNotifyEvent(Display *dpy, XEvent *event, char *args)
{
struct EventData *eventData = (struct EventData*)args;
@@ -706,9 +693,7 @@ PeekNotifyEvent(dpy, event, args)
static Boolean
-LookAhead(w, event)
- Widget w;
- XEvent *event;
+LookAhead(Widget w, XEvent *event)
{
XEvent newEvent;
struct EventData eventData;
@@ -726,10 +711,10 @@ LookAhead(w, event)
static void
-ExtractPosition(event, x, y, state)
- XEvent *event;
- Position *x, *y; /* RETURN */
- unsigned int *state; /* RETURN */
+ExtractPosition(
+ XEvent *event,
+ Position *x, *y, /* RETURN */
+ unsigned int *state) /* RETURN */
{
switch (event->type)
{
@@ -768,11 +753,11 @@ ExtractPosition(event, x, y, state)
}
static void
-HandleThumb(w, event, params, num_params)
- Widget w;
- XEvent *event;
- String *params;
- Cardinal *num_params;
+HandleThumb(
+ Widget w,
+ XEvent *event,
+ String *params,
+ Cardinal *num_params)
{
Position x, y, loc;
ScrollbarWidget sbw = (ScrollbarWidget) w;
@@ -791,9 +776,7 @@ HandleThumb(w, event, params, num_params)
}
static void
-RepeatNotify(client_data, idp)
- XtPointer client_data;
- XtIntervalId *idp UNUSED;
+RepeatNotify(XtPointer client_data, XtIntervalId *idp UNUSED)
{
ScrollbarWidget sbw = (ScrollbarWidget) client_data;
int call_data;
@@ -833,57 +816,56 @@ RepeatNotify(client_data, idp)
* Same as above, but for floating numbers.
*/
static float
-FloatInRange(num, small, big)
- float num, small, big;
+FloatInRange(float num, small, big)
{
return (num < small) ? small : ((num > big) ? big : num);
}
static void
-ScrollOneLineUp(w, event, params, num_params)
- Widget w;
- XEvent *event;
- String *params UNUSED;
- Cardinal *num_params UNUSED;
+ScrollOneLineUp(
+ Widget w,
+ XEvent *event,
+ String *params UNUSED,
+ Cardinal *num_params UNUSED)
{
ScrollSome(w, event, -ONE_LINE_DATA);
}
static void
-ScrollOneLineDown(w, event, params, num_params)
- Widget w;
- XEvent *event;
- String *params UNUSED;
- Cardinal *num_params UNUSED;
+ScrollOneLineDown(
+ Widget w,
+ XEvent *event,
+ String *params UNUSED,
+ Cardinal *num_params UNUSED)
{
ScrollSome(w, event, ONE_LINE_DATA);
}
static void
-ScrollPageDown(w, event, params, num_params)
- Widget w;
- XEvent *event;
- String *params UNUSED;
- Cardinal *num_params UNUSED;
+ScrollPageDown(
+ Widget w,
+ XEvent *event,
+ String *params UNUSED,
+ Cardinal *num_params UNUSED)
{
ScrollSome(w, event, ONE_PAGE_DATA);
}
static void
-ScrollPageUp(w, event, params, num_params)
- Widget w;
- XEvent *event;
- String *params UNUSED;
- Cardinal *num_params UNUSED;
+ScrollPageUp(
+ Widget w,
+ XEvent *event,
+ String *params UNUSED,
+ Cardinal *num_params UNUSED)
{
ScrollSome(w, event, -ONE_PAGE_DATA);
}
static void
-ScrollSome(w, event, call_data)
- Widget w;
- XEvent *event;
- int call_data;
+ScrollSome(
+ Widget w,
+ XEvent *event,
+ int call_data)
{
ScrollbarWidget sbw = (ScrollbarWidget) w;
@@ -898,11 +880,11 @@ ScrollSome(w, event, call_data)
}
static void
-NotifyScroll(w, event, params, num_params)
- Widget w;
- XEvent *event;
- String *params UNUSED;
- Cardinal *num_params UNUSED;
+NotifyScroll(
+ Widget w,
+ XEvent *event,
+ String *params UNUSED,
+ Cardinal *num_params UNUSED)
{
ScrollbarWidget sbw = (ScrollbarWidget) w;
Position x, y, loc;
@@ -987,11 +969,11 @@ NotifyScroll(w, event, params, num_params)
}
static void
-EndScroll(w, event, params, num_params)
- Widget w;
- XEvent *event UNUSED;
- String *params UNUSED;
- Cardinal *num_params UNUSED;
+EndScroll(
+ Widget w,
+ XEvent *event UNUSED,
+ String *params UNUSED,
+ Cardinal *num_params UNUSED)
{
ScrollbarWidget sbw = (ScrollbarWidget) w;
@@ -1002,9 +984,7 @@ EndScroll(w, event, params, num_params)
}
static float
-FractionLoc(sbw, x, y)
- ScrollbarWidget sbw;
- int x, y;
+FractionLoc(ScrollbarWidget sbw, int x, y)
{
int margin;
float height, width;
@@ -1018,11 +998,11 @@ FractionLoc(sbw, x, y)
}
static void
-MoveThumb(w, event, params, num_params)
- Widget w;
- XEvent *event;
- String *params UNUSED;
- Cardinal *num_params UNUSED;
+MoveThumb(
+ Widget w,
+ XEvent *event,
+ String *params UNUSED,
+ Cardinal *num_params UNUSED)
{
ScrollbarWidget sbw = (ScrollbarWidget)w;
Position x, y;
@@ -1063,11 +1043,11 @@ MoveThumb(w, event, params, num_params)
static void
-NotifyThumb(w, event, params, num_params)
- Widget w;
- XEvent *event;
- String *params UNUSED;
- Cardinal *num_params UNUSED;
+NotifyThumb(
+ Widget w,
+ XEvent *event,
+ String *params UNUSED,
+ Cardinal *num_params UNUSED)
{
ScrollbarWidget sbw = (ScrollbarWidget)w;
/* Use a union to avoid a warning for the weird conversion from float to
@@ -1089,8 +1069,7 @@ NotifyThumb(w, event, params, num_params)
}
static void
-AllocTopShadowGC(w)
- Widget w;
+AllocTopShadowGC(Widget w)
{
ScrollbarWidget sbw = (ScrollbarWidget) w;
XtGCMask valuemask;
@@ -1102,8 +1081,7 @@ AllocTopShadowGC(w)
}
static void
-AllocBotShadowGC(w)
- Widget w;
+AllocBotShadowGC(Widget w)
{
ScrollbarWidget sbw = (ScrollbarWidget) w;
XtGCMask valuemask;
@@ -1115,11 +1093,11 @@ AllocBotShadowGC(w)
}
static void
-_Xaw3dDrawShadows(gw, event, region, out)
- Widget gw;
- XEvent *event UNUSED;
- Region region;
- int out;
+_Xaw3dDrawShadows(
+ Widget gw,
+ XEvent *event UNUSED,
+ Region region,
+ int out)
{
XPoint pt[6];
ScrollbarWidget sbw = (ScrollbarWidget) gw;
@@ -1187,9 +1165,7 @@ _Xaw3dDrawShadows(gw, event, region, out)
* Set the scroll bar to the given location.
*/
void
-vim_XawScrollbarSetThumb(w, top, shown, max)
- Widget w;
- double top, shown, max;
+vim_XawScrollbarSetThumb(Widget w, double top, shown, max)
{
ScrollbarWidget sbw = (ScrollbarWidget) w;