mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 08:04:30 +00:00
dix: macro for computing extra units needed for reply header
Add macro X_REPLY_HEADER_UNITS() for computing how many extra protocol units are needed for a reply header (for .length field) Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
@@ -739,4 +739,13 @@ static inline Atom dixGetAtomID(const char *name) {
|
||||
return MakeAtom(name, (unsigned int)strlen(name), FALSE);
|
||||
}
|
||||
|
||||
/* compute the amount of extra units a reply header needs.
|
||||
*
|
||||
* all reply header structs are at least the size of xGenericReply
|
||||
* we have to count how many units the header is bigger than xGenericReply
|
||||
*
|
||||
*/
|
||||
#define X_REPLY_HEADER_UNITS(hdrtype) \
|
||||
(pad_to_int32((sizeof(hdrtype) - sizeof(xGenericReply))))
|
||||
|
||||
#endif /* _XSERVER_DIX_PRIV_H */
|
||||
|
||||
Reference in New Issue
Block a user