Commit 3bf35074 authored by Peter Hutterer's avatar Peter Hutterer Committed by Ulrich Sibiller

Switch GetEmptyReq and GetResReq to call _XGetRequest

parent 3597915f
......@@ -499,24 +499,12 @@ extern void *_XGetRequest(Display *dpy, CARD8 type, size_t len);
#if !defined(UNIXCPP) || defined(ANSICPP)
#define GetResReq(name, rid, req) \
if ((dpy->bufptr + SIZEOF(xResourceReq)) > dpy->bufmax)\
_XFlush(dpy);\
req = (xResourceReq *) (dpy->last_req = dpy->bufptr);\
req->reqType = X_##name;\
req->length = 2;\
req->id = (rid);\
dpy->bufptr += SIZEOF(xResourceReq);\
dpy->request++
req = (xResourceReq *) _XGetRequest(dpy, X_##name, SIZEOF(xResourceReq)); \
req->id = (rid)
#else
#define GetResReq(name, rid, req) \
if ((dpy->bufptr + SIZEOF(xResourceReq)) > dpy->bufmax)\
_XFlush(dpy);\
req = (xResourceReq *) (dpy->last_req = dpy->bufptr);\
req->reqType = X_/**/name;\
req->length = 2;\
req->id = (rid);\
dpy->bufptr += SIZEOF(xResourceReq);\
dpy->request++
req = (xResourceReq *) _XGetRequest(dpy, X_/**/name, SIZEOF(xResourceReq)); \
req->id = (rid)
#endif
/*
......@@ -525,22 +513,10 @@ extern void *_XGetRequest(Display *dpy, CARD8 type, size_t len);
*/
#if !defined(UNIXCPP) || defined(ANSICPP)
#define GetEmptyReq(name, req) \
if ((dpy->bufptr + SIZEOF(xReq)) > dpy->bufmax)\
_XFlush(dpy);\
req = (xReq *) (dpy->last_req = dpy->bufptr);\
req->reqType = X_##name;\
req->length = 1;\
dpy->bufptr += SIZEOF(xReq);\
dpy->request++
req = (xReq *) _XGetRequest(dpy, X_##name, SIZEOF(xReq))
#else
#define GetEmptyReq(name, req) \
if ((dpy->bufptr + SIZEOF(xReq)) > dpy->bufmax)\
_XFlush(dpy);\
req = (xReq *) (dpy->last_req = dpy->bufptr);\
req->reqType = X_/**/name;\
req->length = 1;\
dpy->bufptr += SIZEOF(xReq);\
dpy->request++
req = (xReq *) _XGetRequest(dpy, X_/**/name, SIZEOF(xReq))
#endif
/*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment