(submit/xkb-errmacro) 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 <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult 2024-04-03 13:46:24 +02:00
parent 8b3af47995
commit 5184800734
2 changed files with 6 additions and 2 deletions

View File

@ -304,8 +304,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

View File

@ -43,6 +43,12 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "xkb-procs.h"
#include "protocol-versions.h"
/* "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;