From 88b718bece73cc3dfd998f8ffa0da66b38d4e185 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 3 Apr 2024 13:46:24 +0200 Subject: [PATCH] xkb: move _XkbErrCode3() and _XkbErrCode4() These are only used inside xkb.c, nowhere else, so no need to keep them in public header. Signed-off-by: Enrico Weigelt, metux IT consult --- include/xkbsrv.h | 2 -- xkb/xkb.c | 7 +++++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/include/xkbsrv.h b/include/xkbsrv.h index 21cd8768d0..7d2788dee0 100644 --- a/include/xkbsrv.h +++ b/include/xkbsrv.h @@ -317,8 +317,6 @@ extern _X_EXPORT CARD32 xkbDebugFlags; * statement in this function". lovely. */ #define _XkbErrCode2(a,b) ((XID)((((unsigned int)(a))<<24)|((b)&0xffffff))) -#define _XkbErrCode3(a,b,c) _XkbErrCode2(a,(((unsigned int)(b))<<16)|(c)) -#define _XkbErrCode4(a,b,c,d) _XkbErrCode3(a,b,((((unsigned int)(c))<<8)|(d))) #define Status int diff --git a/xkb/xkb.c b/xkb/xkb.c index 8d52e25df8..e92ddc2e15 100644 --- a/xkb/xkb.c +++ b/xkb/xkb.c @@ -43,6 +43,13 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include +/* "a" is a "unique" numeric identifier that just defines which error + * code statement it is. _XkbErrCode2(4, foo) means "this is the 4th error + * statement in this function". lovely. + */ +#define _XkbErrCode3(a,b,c) _XkbErrCode2(a,(((unsigned int)(b))<<16)|(c)) +#define _XkbErrCode4(a,b,c,d) _XkbErrCode3(a,b,((((unsigned int)(c))<<8)|(d))) + int XkbEventBase; static int XkbErrorBase; int XkbReqCode;