diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2014-01-03 13:21:40 +0000 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2016-03-09 16:13:54 +0000 |
commit | d11fdff50c91575e977a63617806a61bca98cd35 (patch) | |
tree | 7295bce9ed376d0dee4d4efe751bde199a338e11 | |
parent | 519b98765f0c7d083a744ae7beb641753e4eb751 (diff) |
hw/xwin: Tidy-up of winmsg.h
- winVMsg() has no uses, so remove
- winMsgVerb() has only one use, with default verbosity, so remove
- winMsg() is identical to LogMessage()
- Put winDrvMsg() and winDrvMsgVerb() under XWIN_XF86CONFIG
- Include what you use Xfuncproto.h for _X_ATTRIBUTE_PRINTF
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
-rw-r--r-- | hw/xwin/winconfig.c | 5 | ||||
-rw-r--r-- | hw/xwin/winmsg.c | 33 | ||||
-rw-r--r-- | hw/xwin/winmsg.h | 17 |
3 files changed, 14 insertions, 41 deletions
diff --git a/hw/xwin/winconfig.c b/hw/xwin/winconfig.c index fb99113d5..31894d2fb 100644 --- a/hw/xwin/winconfig.c +++ b/hw/xwin/winconfig.c @@ -264,8 +264,9 @@ winConfigKeyboard(DeviceIntPtr pDevice) break; } g_winInfo.keyboard.rate = (kbd_speed > 0) ? kbd_speed : 1; - winMsgVerb(X_PROBED, 1, "Setting autorepeat to delay=%ld, rate=%ld\n", - g_winInfo.keyboard.delay, g_winInfo.keyboard.rate); + winMsg(X_PROBED, "Setting autorepeat to delay=%ld, rate=%ld\n", + g_winInfo.keyboard.delay, g_winInfo.keyboard.rate); + } } diff --git a/hw/xwin/winmsg.c b/hw/xwin/winmsg.c index 575bc47b2..2ee48ce5a 100644 --- a/hw/xwin/winmsg.c +++ b/hw/xwin/winmsg.c @@ -38,17 +38,7 @@ #endif #include <stdarg.h> -void -winVMsg(int, MessageType, int verb, const char *, va_list) -_X_ATTRIBUTE_PRINTF(4, 0); - -void -winVMsg(int scrnIndex, MessageType type, int verb, const char *format, - va_list ap) -{ - LogVMessageVerb(type, verb, format, ap); -} - +#ifdef XWIN_XF86CONFIG void winDrvMsg(int scrnIndex, MessageType type, const char *format, ...) { @@ -60,16 +50,6 @@ winDrvMsg(int scrnIndex, MessageType type, const char *format, ...) } void -winMsg(MessageType type, const char *format, ...) -{ - va_list ap; - - va_start(ap, format); - LogVMessageVerb(type, 1, format, ap); - va_end(ap); -} - -void winDrvMsgVerb(int scrnIndex, MessageType type, int verb, const char *format, ...) { @@ -79,16 +59,7 @@ winDrvMsgVerb(int scrnIndex, MessageType type, int verb, const char *format, LogVMessageVerb(type, verb, format, ap); va_end(ap); } - -void -winMsgVerb(MessageType type, int verb, const char *format, ...) -{ - va_list ap; - - va_start(ap, format); - LogVMessageVerb(type, verb, format, ap); - va_end(ap); -} +#endif void winErrorFVerb(int verb, const char *format, ...) diff --git a/hw/xwin/winmsg.h b/hw/xwin/winmsg.h index 6c96c4070..02f672f08 100644 --- a/hw/xwin/winmsg.h +++ b/hw/xwin/winmsg.h @@ -1,5 +1,3 @@ -#ifndef __WIN_MSG_H__ -#define __WIN_MSG_H__ /* *Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved. * @@ -30,12 +28,17 @@ * Authors: Alexander Gottwald */ +#ifndef __WIN_MSG_H__ +#define __WIN_MSG_H__ + #include <X11/Xwindows.h> +#include <X11/Xfuncproto.h> /* * Function prototypes */ +#ifdef XWIN_XF86CONFIG void winDrvMsgVerb(int scrnIndex, MessageType type, int verb, const char *format, ...) @@ -43,12 +46,10 @@ _X_ATTRIBUTE_PRINTF(4, 5); void winDrvMsg(int scrnIndex, MessageType type, const char *format, ...) _X_ATTRIBUTE_PRINTF(3, 4); -void -winMsgVerb(MessageType type, int verb, const char *format, ...) -_X_ATTRIBUTE_PRINTF(3, 4); -void -winMsg(MessageType type, const char *format, ...) -_X_ATTRIBUTE_PRINTF(2, 3); +#endif + +#define winMsg LogMessage + void winDebug(const char *format, ...) _X_ATTRIBUTE_PRINTF(1, 2); |