summaryrefslogtreecommitdiff
path: root/src/Event.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Event.c')
-rw-r--r--src/Event.c38
1 files changed, 18 insertions, 20 deletions
diff --git a/src/Event.c b/src/Event.c
index 313f14e..a682d24 100644
--- a/src/Event.c
+++ b/src/Event.c
@@ -184,7 +184,7 @@ RemoveEventHandler(
Boolean raw)
{
XtEventRec *p, **pp;
- EventMask eventMask, oldMask = XtBuildEventMask(widget);
+ EventMask oldMask = XtBuildEventMask(widget);
if (raw) raw = 1;
pp = &widget->core.event_table;
@@ -197,7 +197,7 @@ RemoveEventHandler(
/* un-register it */
if (!has_type_specifier) {
- eventMask = *(EventMask*)select_data;
+ EventMask eventMask = *(EventMask*)select_data;
eventMask &= ~NonMaskableMask;
if (other)
eventMask |= NonMaskableMask;
@@ -316,7 +316,6 @@ AddEventHandler(
if (position == XtListHead) {
p->next = widget->core.event_table;
widget->core.event_table = p;
- pp = &widget->core.event_table;
} else {
*pp = p;
p->next = NULL;
@@ -391,7 +390,7 @@ void XtRemoveEventHandler(
WIDGET_TO_APPCON(widget);
LOCK_APP(app);
RemoveEventHandler(widget, (XtPointer) &eventMask, 0, FALSE,
- other, proc, closure, FALSE);
+ (Boolean) other, proc, closure, FALSE);
UNLOCK_APP(app);
}
@@ -404,7 +403,7 @@ void XtAddEventHandler(
{
WIDGET_TO_APPCON(widget);
LOCK_APP(app);
- AddEventHandler(widget, (XtPointer) &eventMask, 0, FALSE, other,
+ AddEventHandler(widget, (XtPointer) &eventMask, 0, FALSE, (Boolean) other,
proc, closure, XtListTail, FALSE, FALSE);
UNLOCK_APP(app);
}
@@ -419,7 +418,7 @@ void XtInsertEventHandler(
{
WIDGET_TO_APPCON(widget);
LOCK_APP(app);
- AddEventHandler(widget, (XtPointer) &eventMask, 0, FALSE, other,
+ AddEventHandler(widget, (XtPointer) &eventMask, 0, FALSE, (Boolean) other,
proc, closure, position, TRUE, FALSE);
UNLOCK_APP(app);
}
@@ -434,7 +433,7 @@ void XtRemoveRawEventHandler(
WIDGET_TO_APPCON(widget);
LOCK_APP(app);
RemoveEventHandler(widget, (XtPointer) &eventMask, 0, FALSE,
- other, proc, closure, TRUE);
+ (Boolean) other, proc, closure, TRUE);
UNLOCK_APP(app);
}
@@ -448,7 +447,7 @@ void XtInsertRawEventHandler(
{
WIDGET_TO_APPCON(widget);
LOCK_APP(app);
- AddEventHandler(widget, (XtPointer) &eventMask, 0, FALSE, other,
+ AddEventHandler(widget, (XtPointer) &eventMask, 0, FALSE, (Boolean) other,
proc, closure, position, TRUE, TRUE);
UNLOCK_APP(app);
}
@@ -462,7 +461,7 @@ void XtAddRawEventHandler(
{
WIDGET_TO_APPCON(widget);
LOCK_APP(app);
- AddEventHandler(widget, (XtPointer) &eventMask, 0, FALSE, other,
+ AddEventHandler(widget, (XtPointer) &eventMask, 0, FALSE, (Boolean) other,
proc, closure, XtListTail, FALSE, TRUE);
UNLOCK_APP(app);
}
@@ -526,7 +525,7 @@ void XtRegisterDrawable(
Widget widget)
{
WWTable tab;
- int idx, rehash;
+ int idx;
Widget entry;
Window window = (Window) drawable;
WIDGET_TO_APPCON(widget);
@@ -550,7 +549,7 @@ void XtRegisterDrawable(
idx = (int) WWHASH(tab, window);
if ((entry = tab->entries[idx]) && entry != &WWfake) {
- rehash = (int) WWREHASHVAL(tab, window);
+ int rehash = (int) WWREHASHVAL(tab, window);
do {
idx = (int) WWREHASH(tab, idx, rehash);
} while ((entry = tab->entries[idx]) && entry != &WWfake);
@@ -569,7 +568,7 @@ void XtUnregisterDrawable(
Drawable drawable)
{
WWTable tab;
- int idx, rehash;
+ int idx;
Widget entry;
Window window = (Window) drawable;
Widget widget = XtWindowToWidget (display, window);
@@ -597,7 +596,7 @@ void XtUnregisterDrawable(
idx = (int) WWHASH(tab, window);
if ((entry = tab->entries[idx])) {
if (entry != widget) {
- rehash = (int) WWREHASHVAL(tab, window);
+ int rehash = (int) WWREHASHVAL(tab, window);
do {
idx = (int) WWREHASH(tab, idx, rehash);
if (!(entry = tab->entries[idx])) {
@@ -652,9 +651,9 @@ Widget XtWindowToWidget(
register Display *display,
register Window window)
{
- register WWTable tab;
- register int idx, rehash;
- register Widget entry;
+ WWTable tab;
+ int idx;
+ Widget entry;
WWPair pair;
DPY_TO_APPCON(display);
@@ -665,7 +664,7 @@ Widget XtWindowToWidget(
tab = WWTABLE(display);
idx = (int) WWHASH(tab, window);
if ((entry = tab->entries[idx]) && XtWindow(entry) != window) {
- rehash = (int) WWREHASHVAL(tab, window);
+ int rehash = (int) WWREHASHVAL(tab, window);
do {
idx = (int) WWREHASH(tab, idx, rehash);
} while ((entry = tab->entries[idx]) && XtWindow(entry) != window);
@@ -1485,7 +1484,7 @@ void XtAddGrab(
exclusive = TRUE;
}
- gl = NewGrabRec(widget, exclusive, spring_loaded);
+ gl = NewGrabRec(widget, (Boolean) exclusive, (Boolean) spring_loaded);
gl->next = *grabListPtr;
*grabListPtr = gl;
@@ -1668,7 +1667,6 @@ void XtRegisterExtensionSelector(
XtExtensionSelectProc proc,
XtPointer client_data)
{
- ExtSelectRec *e;
XtPerDisplay pd;
int i;
DPY_TO_APPCON(dpy);
@@ -1683,7 +1681,7 @@ void XtRegisterExtensionSelector(
pd = _XtGetPerDisplay(dpy);
for (i = 0; i < pd->ext_select_count; i++) {
- e = &pd->ext_select_list[i];
+ ExtSelectRec *e = &pd->ext_select_list[i];
if (e->min == min_event_type && e->max == max_event_type) {
e->proc = proc;
e->client_data = client_data;