Revert "misc.h: drop LengthRestB() macro"
This reverts commit a6b2eb3780
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2015>
This commit is contained in:
parent
cd583932a1
commit
c7b69f1acb
|
@ -756,7 +756,7 @@ SProcStoreColors(ClientPtr client)
|
||||||
REQUEST_AT_LEAST_SIZE(xStoreColorsReq);
|
REQUEST_AT_LEAST_SIZE(xStoreColorsReq);
|
||||||
swapl(&stuff->cmap);
|
swapl(&stuff->cmap);
|
||||||
pItem = (xColorItem *) &stuff[1];
|
pItem = (xColorItem *) &stuff[1];
|
||||||
for (count = ((client->req_len << 2) - sizeof(xStoreColorsReq)) / sizeof(xColorItem); --count >= 0;)
|
for (count = LengthRestB(stuff) / sizeof(xColorItem); --count >= 0;)
|
||||||
SwapColorItem(pItem++);
|
SwapColorItem(pItem++);
|
||||||
return ((*ProcVector[X_StoreColors]) (client));
|
return ((*ProcVector[X_StoreColors]) (client));
|
||||||
}
|
}
|
||||||
|
|
|
@ -600,7 +600,7 @@ are: REQUEST, REQUEST_SIZE_MATCH, REQUEST_AT_LEAST_SIZE,
|
||||||
REQUEST_FIXED_SIZE, LEGAL_NEW_RESOURCE, and
|
REQUEST_FIXED_SIZE, LEGAL_NEW_RESOURCE, and
|
||||||
VALIDATE_DRAWABLE_AND_GC. Useful byte swapping macros can be found
|
VALIDATE_DRAWABLE_AND_GC. Useful byte swapping macros can be found
|
||||||
in Xserver/include/dix.h: WriteReplyToClient and WriteSwappedDataToClient; and
|
in Xserver/include/dix.h: WriteReplyToClient and WriteSwappedDataToClient; and
|
||||||
in Xserver/include/misc.h: bswap_64, bswap_32, bswap_16, LengthRestS,
|
in Xserver/include/misc.h: bswap_64, bswap_32, bswap_16, LengthRestB, LengthRestS,
|
||||||
LengthRestL, SwapRestS, SwapRestL, swapl, swaps, cpswapl, and cpswaps.</para>
|
LengthRestL, SwapRestS, SwapRestL, swapl, swaps, cpswapl, and cpswaps.</para>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -227,6 +227,9 @@ extern _X_EXPORT char **xstrtokenize(const char *str, const char *separators);
|
||||||
|
|
||||||
/* some macros to help swap requests, replies, and events */
|
/* some macros to help swap requests, replies, and events */
|
||||||
|
|
||||||
|
#define LengthRestB(stuff) \
|
||||||
|
((client->req_len << 2) - sizeof(*stuff))
|
||||||
|
|
||||||
#define LengthRestS(stuff) \
|
#define LengthRestS(stuff) \
|
||||||
((client->req_len << 1) - (sizeof(*stuff) >> 1))
|
((client->req_len << 1) - (sizeof(*stuff) >> 1))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue