From 278c11f01fbc6d6bd91c5a7127928c9ef5d29fca Mon Sep 17 00:00:00 2001 From: Tiago Vignatti Date: Wed, 8 Oct 2008 01:18:49 -0300 Subject: [PATCH] xfree86: xf86{Enable, Disable}InputHandler can be static. --- hw/xfree86/common/xf86.h | 2 -- hw/xfree86/common/xf86Events.c | 56 +++++++++++++++++----------------- hw/xfree86/loader/xf86sym.c | 2 -- 3 files changed, 28 insertions(+), 32 deletions(-) diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h index 84ea63345..0956f9c37 100644 --- a/hw/xfree86/common/xf86.h +++ b/hw/xfree86/common/xf86.h @@ -191,8 +191,6 @@ xf86SetDGAModeProc xf86SetDGAMode; void SetTimeSinceLastInputEvent(void); pointer xf86AddInputHandler(int fd, InputHandlerProc proc, pointer data); int xf86RemoveInputHandler(pointer handler); -void xf86DisableInputHandler(pointer handler); -void xf86EnableInputHandler(pointer handler); pointer xf86AddGeneralHandler(int fd, InputHandlerProc proc, pointer data); int xf86RemoveGeneralHandler(pointer handler); void xf86InterceptSignals(int *signo); diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c index 520e7f121..6ca0ae714 100644 --- a/hw/xfree86/common/xf86Events.c +++ b/hw/xfree86/common/xf86Events.c @@ -635,6 +635,34 @@ xf86ReleaseKeys(DeviceIntPtr pDev) } } +static void +xf86EnableInputHandler(pointer handler) +{ + IHPtr ih; + + if (!handler) + return; + + ih = handler; + ih->enabled = TRUE; + if (ih->fd >= 0) + AddEnabledDevice(ih->fd); +} + +static void +xf86DisableInputHandler(pointer handler) +{ + IHPtr ih; + + if (!handler) + return; + + ih = handler; + ih->enabled = FALSE; + if (ih->fd >= 0) + RemoveEnabledDevice(ih->fd); +} + /* * xf86VTSwitch -- * Handle requests for switching the vt. @@ -901,34 +929,6 @@ xf86RemoveGeneralHandler(pointer handler) return fd; } -_X_EXPORT void -xf86DisableInputHandler(pointer handler) -{ - IHPtr ih; - - if (!handler) - return; - - ih = handler; - ih->enabled = FALSE; - if (ih->fd >= 0) - RemoveEnabledDevice(ih->fd); -} - -_X_EXPORT void -xf86EnableInputHandler(pointer handler) -{ - IHPtr ih; - - if (!handler) - return; - - ih = handler; - ih->enabled = TRUE; - if (ih->fd >= 0) - AddEnabledDevice(ih->fd); -} - /* * As used currently by the DRI, the return value is ignored. */ diff --git a/hw/xfree86/loader/xf86sym.c b/hw/xfree86/loader/xf86sym.c index 494d2db8d..1677a4934 100644 --- a/hw/xfree86/loader/xf86sym.c +++ b/hw/xfree86/loader/xf86sym.c @@ -375,8 +375,6 @@ _X_HIDDEN void *xfree86LookupTab[] = { SYMFUNC(SetTimeSinceLastInputEvent) SYMFUNC(xf86AddInputHandler) SYMFUNC(xf86RemoveInputHandler) - SYMFUNC(xf86DisableInputHandler) - SYMFUNC(xf86EnableInputHandler) SYMFUNC(xf86AddEnabledDevice) SYMFUNC(xf86RemoveEnabledDevice) SYMFUNC(xf86InterceptSignals)