From d11fdff50c91575e977a63617806a61bca98cd35 Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Fri, 3 Jan 2014 13:21:40 +0000 Subject: 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 Reviewed-by: Colin Harrison --- hw/xwin/winconfig.c | 5 +++-- hw/xwin/winmsg.c | 33 ++------------------------------- 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 -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, ...) { @@ -59,16 +49,6 @@ winDrvMsg(int scrnIndex, MessageType type, const char *format, ...) va_end(ap); } -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 +#include /* * 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); -- cgit v1.2.3