Xext: xf86bigfont: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
Use the new macros to make request struct parsing / field swapping much easier. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
c133b094ef
commit
9cc70cd9ff
|
@ -265,7 +265,7 @@ XF86BigfontResetProc(ExtensionEntry * extEntry)
|
|||
static int
|
||||
ProcXF86BigfontQueryVersion(ClientPtr client)
|
||||
{
|
||||
REQUEST_SIZE_MATCH(xXF86BigfontQueryVersionReq);
|
||||
REQUEST_HEAD_STRUCT(xXF86BigfontQueryVersionReq);
|
||||
|
||||
xXF86BigfontQueryVersionReply reply = {
|
||||
.type = X_Reply,
|
||||
|
@ -314,9 +314,10 @@ swapCharInfo(xCharInfo * pCI)
|
|||
static int
|
||||
ProcXF86BigfontQueryFont(ClientPtr client)
|
||||
{
|
||||
FontPtr pFont;
|
||||
REQUEST_HEAD_NO_CHECK(xXF86BigfontQueryFontReq);
|
||||
REQUEST_FIELD_CARD32(id);
|
||||
|
||||
REQUEST(xXF86BigfontQueryFontReq);
|
||||
FontPtr pFont;
|
||||
CARD32 stuff_flags;
|
||||
xCharInfo *pmax;
|
||||
xCharInfo *pmin;
|
||||
|
@ -644,37 +645,6 @@ ProcXF86BigfontDispatch(ClientPtr client)
|
|||
}
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
SProcXF86BigfontQueryVersion(ClientPtr client)
|
||||
{
|
||||
REQUEST(xXF86BigfontQueryVersionReq);
|
||||
return ProcXF86BigfontQueryVersion(client);
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
SProcXF86BigfontQueryFont(ClientPtr client)
|
||||
{
|
||||
REQUEST(xXF86BigfontQueryFontReq);
|
||||
REQUEST_SIZE_MATCH(xXF86BigfontQueryFontReq);
|
||||
swapl(&stuff->id);
|
||||
return ProcXF86BigfontQueryFont(client);
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
SProcXF86BigfontDispatch(ClientPtr client)
|
||||
{
|
||||
REQUEST(xReq);
|
||||
|
||||
switch (stuff->data) {
|
||||
case X_XF86BigfontQueryVersion:
|
||||
return SProcXF86BigfontQueryVersion(client);
|
||||
case X_XF86BigfontQueryFont:
|
||||
return SProcXF86BigfontQueryFont(client);
|
||||
default:
|
||||
return BadRequest;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
XFree86BigfontExtensionInit(void)
|
||||
{
|
||||
|
@ -682,7 +652,7 @@ XFree86BigfontExtensionInit(void)
|
|||
XF86BigfontNumberEvents,
|
||||
XF86BigfontNumberErrors,
|
||||
ProcXF86BigfontDispatch,
|
||||
SProcXF86BigfontDispatch,
|
||||
ProcXF86BigfontDispatch,
|
||||
XF86BigfontResetProc, StandardMinorOpcode)) {
|
||||
#ifdef MITSHM
|
||||
#ifdef MUST_CHECK_FOR_SHM_SYSCALL
|
||||
|
|
Loading…
Reference in New Issue