Files
xserver/dix
Enrico Weigelt, metux IT consult 6a320e76cb dix: add macros for request handlers and swapping
add some macros for making request handlers and byte swapping easier:

    * X_REQUEST_HEAD_STRUCT(type) and X_REQUEST_HEAD_AT_LEAST(type)
      declare header struct pointers and check size
    * X_REQUEST_FIELD_CARD16(field)
      swaps a CARD16 (word) header field (if neccessary)
    * X_REQUEST_FIELD_CARD32(field)
      swaps a CARD32 (dword) header field (if neccessary)
    * X_REQUEST_REST_CARD16()
      swaps remaining CARD16 array payload (if necessary)
    * X_REQUEST_REST_CARD32()
      swaps remaining CARD32 array payload (if necessary)
    * X_REQUEST_REST_COUNT_CARD16(count)
      check swaps `count` CARD16 payload fields and checks size
    * X_REQUEST_REST_COUNT_CARD32(count)
      check swaps `count` CARD32 payload fields and checks size

How to use them:

    1. put X_REQUEST_HEAD_STRUCT() or X_REQUEST_HEAD_AT_LEAST() ontop of each Proc*()
    2. add X_REQUEST_FIELD_*() et al below, for all fields to be swapped and
       drop the corresponding SProc*()'s
    3. let the dispatchers call Proc*() instead of SProc*()

Notes:

    * the length field is already swapped before request handlers called

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-03 10:58:14 +01:00
..
2025-11-11 10:46:29 +01:00
2025-11-20 17:42:29 +01:00
2025-11-11 10:46:29 +01:00
2025-07-18 22:24:55 +02:00
2025-11-20 19:22:35 +01:00
2025-10-31 13:06:11 +01:00
2025-11-25 18:26:02 +01:00
2025-11-27 13:46:37 +01:00
2025-11-27 13:46:37 +01:00
2025-11-27 13:46:37 +01:00