Generated Code: swapcheck_shape.c
chris at demorecorder.com
chris at demorecorder.com
Thu Feb 26 00:07:17 PST 2015
/*
* This file generated automatically from shape.xml by gen_swap_check.py.
* Edit at your peril.
*/
#include "swapcheck_xproto.h"
#include "swapcheck_shape.h"
#include <stdlib.h>
#include <assert.h>
#include <stddef.h> /* for offsetof() */
#include <errno.h>
#define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
typedef enum xcb_shape_so {
XCB_SHAPE_SO_UNION = 1,
XCB_SHAPE_SO_SET = 0,
XCB_SHAPE_SO_SUBTRACT = 3,
XCB_SHAPE_SO_INTERSECT = 2,
XCB_SHAPE_SO_INVERT = 4,
} xcb_shape_so_t;
typedef enum xcb_shape_sk {
XCB_SHAPE_SK_CLIP = 1,
XCB_SHAPE_SK_BOUNDING = 0,
XCB_SHAPE_SK_INPUT = 2,
} xcb_shape_sk_t;
#define GEN_XCB_SHAPE_RECTANGLES 1
#define GEN_XCB_SHAPE_QUERY_VERSION 0
#define GEN_XCB_SHAPE_COMBINE 3
#define GEN_XCB_SHAPE_MASK 2
#define GEN_XCB_SHAPE_QUERY_EXTENTS 5
#define GEN_XCB_SHAPE_OFFSET 4
#define GEN_XCB_SHAPE_INPUT_SELECTED 7
#define GEN_XCB_SHAPE_SELECT_INPUT 6
#define GEN_XCB_SHAPE_GET_RECTANGLES 8
int
xcb_Shape_QueryVersion_SwapToClient(void *data)
{
//type, field_type, field_name, visible, wire, auto, enum, isfd
uint8_t* p = (uint8_t*)data;
uint8_t* afterEnd = NULL;
//('uint8_t',), major_opcode, False, True, True, None, False
p += 1;
//('uint8_t',), minor_opcode, False, True, True, None, False
p += 1;
//('uint16_t',), length, False, True, True, None, False
afterEnd = ((uint8_t*)data) + 4 * ( *(uint16_t*)p );
if( p + 2 > (uint8_t*)afterEnd)
{
return BadLength;
}
swaps((uint16_t*)p);
p += 2;
if (p == afterEnd)
return Success;
else
return BadLength;
}
int
xcb_Shape_QueryVersion_SwapFromClient(void *data)
{
//type, field_type, field_name, visible, wire, auto, enum, isfd
uint8_t* p = (uint8_t*)data;
uint8_t* afterEnd = NULL;
//('uint8_t',), major_opcode, False, True, True, None, False
p += 1;
//('uint8_t',), minor_opcode, False, True, True, None, False
p += 1;
//('uint16_t',), length, False, True, True, None, False
swaps((uint16_t*)p);
afterEnd = ((uint8_t*)data) + 4 * ( *(uint16_t*)p );
p += 2;
if (p == afterEnd)
return Success;
else
return BadLength;
}
int
xcb_Shape_QueryVersion_Check(void *data)
{
//type, field_type, field_name, visible, wire, auto, enum, isfd
uint8_t* p = (uint8_t*)data;
uint8_t* afterEnd = NULL;
//('uint8_t',), major_opcode, False, True, True, None, False
p += 1;
//('uint8_t',), minor_opcode, False, True, True, None, False
p += 1;
//('uint16_t',), length, False, True, True, None, False
afterEnd = ((uint8_t*)data) + 4 * ( *(uint16_t*)p );
p += 2;
if (p == afterEnd)
return Success;
else
return BadLength;
}
int
xcb_Shape_Rectangles_SwapToClient(void *data)
{
//type, field_type, field_name, visible, wire, auto, enum, isfd
uint8_t* p = (uint8_t*)data;
uint8_t* afterStruct = NULL;
uint8_t* afterEnd = NULL;
//('uint8_t',), major_opcode, False, True, True, None, False
p += 1;
//('uint8_t',), minor_opcode, False, True, True, None, False
p += 1;
//('uint16_t',), length, False, True, True, None, False
afterEnd = ((uint8_t*)data) + 4 * ( *(uint16_t*)p );
if( p + 2 > (uint8_t*)afterEnd)
{
return BadLength;
}
swaps((uint16_t*)p);
p += 2;
//('xcb', 'Shape', 'OP'), operation, True, True, False, SO, False
p += 1;
//('xcb', 'Shape', 'KIND'), destination_kind, True, True, False, SK, False
p += 1;
//('uint8_t',), ordering, True, True, False, ClipOrdering, False
p += 1;
//('uint8_t',), pad0, False, True, False, ClipOrdering, False
p += 1;
//('xcb', 'WINDOW'), destination_window, True, True, False, None, False
if( p + 4 > (uint8_t*)afterEnd)
{
return BadLength;
}
swapl((uint32_t*)p);
p += 4;
//('int16_t',), x_offset, True, True, False, None, False
if( p + 2 > (uint8_t*)afterEnd)
{
return BadLength;
}
swaps((uint16_t*)p);
p += 2;
//('int16_t',), y_offset, True, True, False, None, False
if( p + 2 > (uint8_t*)afterEnd)
{
return BadLength;
}
swaps((uint16_t*)p);
p += 2;
//('uint32_t',), rectangles_len, True, False, False, None, False
uint32_t fieldvalue_rectangles_len;
fieldvalue_rectangles_len = *(uint32_t*)p;
if( p + 4 > (uint8_t*)afterEnd)
{
return BadLength;
}
swapl((uint32_t*)p);
p += 4;
//('xcb', 'RECTANGLE'), rectangles, True, True, False, None, False
{
unsigned int i_rectangles_len;
for(i_rectangles_len = 0; i_rectangles_len < fieldvalue_rectangles_len; i_rectangles_len++)
{
if(xcb_RECTANGLE_SwapToClient(p, afterEnd, &afterStruct) != Success)
return BadLength;
p = afterStruct;
}
}
if (p == afterEnd)
return Success;
else
return BadLength;
}
int
xcb_Shape_Rectangles_SwapFromClient(void *data)
{
//type, field_type, field_name, visible, wire, auto, enum, isfd
uint8_t* p = (uint8_t*)data;
uint8_t* afterStruct = NULL;
uint8_t* afterEnd = NULL;
//('uint8_t',), major_opcode, False, True, True, None, False
p += 1;
//('uint8_t',), minor_opcode, False, True, True, None, False
p += 1;
//('uint16_t',), length, False, True, True, None, False
swaps((uint16_t*)p);
afterEnd = ((uint8_t*)data) + 4 * ( *(uint16_t*)p );
p += 2;
//('xcb', 'Shape', 'OP'), operation, True, True, False, SO, False
p += 1;
//('xcb', 'Shape', 'KIND'), destination_kind, True, True, False, SK, False
p += 1;
//('uint8_t',), ordering, True, True, False, ClipOrdering, False
p += 1;
//('uint8_t',), pad0, False, True, False, ClipOrdering, False
p += 1;
//('xcb', 'WINDOW'), destination_window, True, True, False, None, False
if( p + 4 > (uint8_t*)afterEnd)
{
return BadLength;
}
swapl((uint32_t*)p);
p += 4;
//('int16_t',), x_offset, True, True, False, None, False
if( p + 2 > (uint8_t*)afterEnd)
{
return BadLength;
}
swaps((uint16_t*)p);
p += 2;
//('int16_t',), y_offset, True, True, False, None, False
if( p + 2 > (uint8_t*)afterEnd)
{
return BadLength;
}
swaps((uint16_t*)p);
p += 2;
//('uint32_t',), rectangles_len, True, False, False, None, False
if( p + 4 > (uint8_t*)afterEnd)
{
return BadLength;
}
swapl((uint32_t*)p);
uint32_t fieldvalue_rectangles_len;
fieldvalue_rectangles_len = *(uint32_t*)p;
p += 4;
//('xcb', 'RECTANGLE'), rectangles, True, True, False, None, False
{
unsigned int i_rectangles_len;
for(i_rectangles_len = 0; i_rectangles_len < fieldvalue_rectangles_len; i_rectangles_len++)
{
if(xcb_RECTANGLE_SwapFromClient(p, afterEnd, &afterStruct) != Success)
return BadLength;
p = afterStruct;
}
}
if (p == afterEnd)
return Success;
else
return BadLength;
}
int
xcb_Shape_Rectangles_Check(void *data)
{
//type, field_type, field_name, visible, wire, auto, enum, isfd
uint8_t* p = (uint8_t*)data;
uint8_t* afterStruct = NULL;
uint8_t* afterEnd = NULL;
//('uint8_t',), major_opcode, False, True, True, None, False
p += 1;
//('uint8_t',), minor_opcode, False, True, True, None, False
p += 1;
//('uint16_t',), length, False, True, True, None, False
afterEnd = ((uint8_t*)data) + 4 * ( *(uint16_t*)p );
p += 2;
//('xcb', 'Shape', 'OP'), operation, True, True, False, SO, False
p += 1;
//('xcb', 'Shape', 'KIND'), destination_kind, True, True, False, SK, False
p += 1;
//('uint8_t',), ordering, True, True, False, ClipOrdering, False
p += 1;
//('uint8_t',), pad0, False, True, False, ClipOrdering, False
p += 1;
//('xcb', 'WINDOW'), destination_window, True, True, False, None, False
p += 4;
//('int16_t',), x_offset, True, True, False, None, False
p += 2;
//('int16_t',), y_offset, True, True, False, None, False
p += 2;
//('uint32_t',), rectangles_len, True, False, False, None, False
uint32_t fieldvalue_rectangles_len;
fieldvalue_rectangles_len = *(uint32_t*)p;
p += 4;
//('xcb', 'RECTANGLE'), rectangles, True, True, False, None, False
{
unsigned int i_rectangles_len;
for(i_rectangles_len = 0; i_rectangles_len < fieldvalue_rectangles_len; i_rectangles_len++)
{
if(xcb_RECTANGLE_Check(p, afterEnd, &afterStruct) != Success)
return BadLength;
p = afterStruct;
}
}
if (p == afterEnd)
return Success;
else
return BadLength;
}
int
xcb_Shape_Mask_SwapToClient(void *data)
{
//type, field_type, field_name, visible, wire, auto, enum, isfd
uint8_t* p = (uint8_t*)data;
uint8_t* afterEnd = NULL;
//('uint8_t',), major_opcode, False, True, True, None, False
p += 1;
//('uint8_t',), minor_opcode, False, True, True, None, False
p += 1;
//('uint16_t',), length, False, True, True, None, False
afterEnd = ((uint8_t*)data) + 4 * ( *(uint16_t*)p );
if( p + 2 > (uint8_t*)afterEnd)
{
return BadLength;
}
swaps((uint16_t*)p);
p += 2;
//('xcb', 'Shape', 'OP'), operation, True, True, False, SO, False
p += 1;
//('xcb', 'Shape', 'KIND'), destination_kind, True, True, False, SK, False
p += 1;
//('uint8_t',), pad0, False, True, False, SK, False
p += 2;
//('xcb', 'WINDOW'), destination_window, True, True, False, None, False
if( p + 4 > (uint8_t*)afterEnd)
{
return BadLength;
}
swapl((uint32_t*)p);
p += 4;
//('int16_t',), x_offset, True, True, False, None, False
if( p + 2 > (uint8_t*)afterEnd)
{
return BadLength;
}
swaps((uint16_t*)p);
p += 2;
//('int16_t',), y_offset, True, True, False, None, False
if( p + 2 > (uint8_t*)afterEnd)
{
return BadLength;
}
swaps((uint16_t*)p);
p += 2;
//('xcb', 'PIXMAP'), source_bitmap, True, True, False, None, False
if( p + 4 > (uint8_t*)afterEnd)
{
return BadLength;
}
swapl((uint32_t*)p);
p += 4;
if (p == afterEnd)
return Success;
else
return BadLength;
}
int
xcb_Shape_Mask_SwapFromClient(void *data)
{
//type, field_type, field_name, visible, wire, auto, enum, isfd
uint8_t* p = (uint8_t*)data;
uint8_t* afterEnd = NULL;
//('uint8_t',), major_opcode, False, True, True, None, False
p += 1;
//('uint8_t',), minor_opcode, False, True, True, None, False
p += 1;
//('uint16_t',), length, False, True, True, None, False
swaps((uint16_t*)p);
afterEnd = ((uint8_t*)data) + 4 * ( *(uint16_t*)p );
p += 2;
//('xcb', 'Shape', 'OP'), operation, True, True, False, SO, False
p += 1;
//('xcb', 'Shape', 'KIND'), destination_kind, True, True, False, SK, False
p += 1;
//('uint8_t',), pad0, False, True, False, SK, False
p += 2;
//('xcb', 'WINDOW'), destination_window, True, True, False, None, False
if( p + 4 > (uint8_t*)afterEnd)
{
return BadLength;
}
swapl((uint32_t*)p);
p += 4;
//('int16_t',), x_offset, True, True, False, None, False
if( p + 2 > (uint8_t*)afterEnd)
{
return BadLength;
}
swaps((uint16_t*)p);
p += 2;
//('int16_t',), y_offset, True, True, False, None, False
if( p + 2 > (uint8_t*)afterEnd)
{
return BadLength;
}
swaps((uint16_t*)p);
p += 2;
//('xcb', 'PIXMAP'), source_bitmap, True, True, False, None, False
if( p + 4 > (uint8_t*)afterEnd)
{
return BadLength;
}
swapl((uint32_t*)p);
p += 4;
if (p == afterEnd)
return Success;
else
return BadLength;
}
int
xcb_Shape_Mask_Check(void *data)
{
//type, field_type, field_name, visible, wire, auto, enum, isfd
uint8_t* p = (uint8_t*)data;
uint8_t* afterEnd = NULL;
//('uint8_t',), major_opcode, False, True, True, None, False
p += 1;
//('uint8_t',), minor_opcode, False, True, True, None, False
p += 1;
//('uint16_t',), length, False, True, True, None, False
afterEnd = ((uint8_t*)data) + 4 * ( *(uint16_t*)p );
p += 2;
//('xcb', 'Shape', 'OP'), operation, True, True, False, SO, False
p += 1;
//('xcb', 'Shape', 'KIND'), destination_kind, True, True, False, SK, False
p += 1;
//('uint8_t',), pad0, False, True, False, SK, False
p += 2;
//('xcb', 'WINDOW'), destination_window, True, True, False, None, False
p += 4;
//('int16_t',), x_offset, True, True, False, None, False
p += 2;
//('int16_t',), y_offset, True, True, False, None, False
p += 2;
//('xcb', 'PIXMAP'), source_bitmap, True, True, False, None, False
p += 4;
if (p == afterEnd)
return Success;
else
return BadLength;
}
int
xcb_Shape_Combine_SwapToClient(void *data)
{
//type, field_type, field_name, visible, wire, auto, enum, isfd
uint8_t* p = (uint8_t*)data;
uint8_t* afterEnd = NULL;
//('uint8_t',), major_opcode, False, True, True, None, False
p += 1;
//('uint8_t',), minor_opcode, False, True, True, None, False
p += 1;
//('uint16_t',), length, False, True, True, None, False
afterEnd = ((uint8_t*)data) + 4 * ( *(uint16_t*)p );
if( p + 2 > (uint8_t*)afterEnd)
{
return BadLength;
}
swaps((uint16_t*)p);
p += 2;
//('xcb', 'Shape', 'OP'), operation, True, True, False, SO, False
p += 1;
//('xcb', 'Shape', 'KIND'), destination_kind, True, True, False, SK, False
p += 1;
//('xcb', 'Shape', 'KIND'), source_kind, True, True, False, SK, False
p += 1;
//('uint8_t',), pad0, False, True, False, SK, False
p += 1;
//('xcb', 'WINDOW'), destination_window, True, True, False, None, False
if( p + 4 > (uint8_t*)afterEnd)
{
return BadLength;
}
swapl((uint32_t*)p);
p += 4;
//('int16_t',), x_offset, True, True, False, None, False
if( p + 2 > (uint8_t*)afterEnd)
{
return BadLength;
}
swaps((uint16_t*)p);
p += 2;
//('int16_t',), y_offset, True, True, False, None, False
if( p + 2 > (uint8_t*)afterEnd)
{
return BadLength;
}
swaps((uint16_t*)p);
p += 2;
//('xcb', 'WINDOW'), source_window, True, True, False, None, False
if( p + 4 > (uint8_t*)afterEnd)
{
return BadLength;
}
swapl((uint32_t*)p);
p += 4;
if (p == afterEnd)
return Success;
else
return BadLength;
}
int
xcb_Shape_Combine_SwapFromClient(void *data)
{
//type, field_type, field_name, visible, wire, auto, enum, isfd
uint8_t* p = (uint8_t*)data;
uint8_t* afterEnd = NULL;
//('uint8_t',), major_opcode, False, True, True, None, False
p += 1;
//('uint8_t',), minor_opcode, False, True, True, None, False
p += 1;
//('uint16_t',), length, False, True, True, None, False
swaps((uint16_t*)p);
afterEnd = ((uint8_t*)data) + 4 * ( *(uint16_t*)p );
p += 2;
//('xcb', 'Shape', 'OP'), operation, True, True, False, SO, False
p += 1;
//('xcb', 'Shape', 'KIND'), destination_kind, True, True, False, SK, False
p += 1;
//('xcb', 'Shape', 'KIND'), source_kind, True, True, False, SK, False
p += 1;
//('uint8_t',), pad0, False, True, False, SK, False
p += 1;
//('xcb', 'WINDOW'), destination_window, True, True, False, None, False
if( p + 4 > (uint8_t*)afterEnd)
{
return BadLength;
}
swapl((uint32_t*)p);
p += 4;
//('int16_t',), x_offset, True, True, False, None, False
if( p + 2 > (uint8_t*)afterEnd)
{
return BadLength;
}
swaps((uint16_t*)p);
p += 2;
//('int16_t',), y_offset, True, True, False, None, False
if( p + 2 > (uint8_t*)afterEnd)
{
return BadLength;
}
swaps((uint16_t*)p);
p += 2;
//('xcb', 'WINDOW'), source_window, True, True, False, None, False
if( p + 4 > (uint8_t*)afterEnd)
{
return BadLength;
}
swapl((uint32_t*)p);
p += 4;
if (p == afterEnd)
return Success;
else
return BadLength;
}
int
xcb_Shape_Combine_Check(void *data)
{
//type, field_type, field_name, visible, wire, auto, enum, isfd
uint8_t* p = (uint8_t*)data;
uint8_t* afterEnd = NULL;
//('uint8_t',), major_opcode, False, True, True, None, False
p += 1;
//('uint8_t',), minor_opcode, False, True, True, None, False
p += 1;
//('uint16_t',), length, False, True, True, None, False
afterEnd = ((uint8_t*)data) + 4 * ( *(uint16_t*)p );
p += 2;
//('xcb', 'Shape', 'OP'), operation, True, True, False, SO, False
p += 1;
//('xcb', 'Shape', 'KIND'), destination_kind, True, True, False, SK, False
p += 1;
//('xcb', 'Shape', 'KIND'), source_kind, True, True, False, SK, False
p += 1;
//('uint8_t',), pad0, False, True, False, SK, False
p += 1;
//('xcb', 'WINDOW'), destination_window, True, True, False, None, False
p += 4;
//('int16_t',), x_offset, True, True, False, None, False
p += 2;
//('int16_t',), y_offset, True, True, False, None, False
p += 2;
//('xcb', 'WINDOW'), source_window, True, True, False, None, False
p += 4;
if (p == afterEnd)
return Success;
else
return BadLength;
}
int
xcb_Shape_Offset_SwapToClient(void *data)
{
//type, field_type, field_name, visible, wire, auto, enum, isfd
uint8_t* p = (uint8_t*)data;
uint8_t* afterEnd = NULL;
//('uint8_t',), major_opcode, False, True, True, None, False
p += 1;
//('uint8_t',), minor_opcode, False, True, True, None, False
p += 1;
//('uint16_t',), length, False, True, True, None, False
afterEnd = ((uint8_t*)data) + 4 * ( *(uint16_t*)p );
if( p + 2 > (uint8_t*)afterEnd)
{
return BadLength;
}
swaps((uint16_t*)p);
p += 2;
//('xcb', 'Shape', 'KIND'), destination_kind, True, True, False, SK, False
p += 1;
//('uint8_t',), pad0, False, True, False, SK, False
p += 3;
//('xcb', 'WINDOW'), destination_window, True, True, False, None, False
if( p + 4 > (uint8_t*)afterEnd)
{
return BadLength;
}
swapl((uint32_t*)p);
p += 4;
//('int16_t',), x_offset, True, True, False, None, False
if( p + 2 > (uint8_t*)afterEnd)
{
return BadLength;
}
swaps((uint16_t*)p);
p += 2;
//('int16_t',), y_offset, True, True, False, None, False
if( p + 2 > (uint8_t*)afterEnd)
{
return BadLength;
}
swaps((uint16_t*)p);
p += 2;
if (p == afterEnd)
return Success;
else
return BadLength;
}
int
xcb_Shape_Offset_SwapFromClient(void *data)
{
//type, field_type, field_name, visible, wire, auto, enum, isfd
uint8_t* p = (uint8_t*)data;
uint8_t* afterEnd = NULL;
//('uint8_t',), major_opcode, False, True, True, None, False
p += 1;
//('uint8_t',), minor_opcode, False, True, True, None, False
p += 1;
//('uint16_t',), length, False, True, True, None, False
swaps((uint16_t*)p);
afterEnd = ((uint8_t*)data) + 4 * ( *(uint16_t*)p );
p += 2;
//('xcb', 'Shape', 'KIND'), destination_kind, True, True, False, SK, False
p += 1;
//('uint8_t',), pad0, False, True, False, SK, False
p += 3;
//('xcb', 'WINDOW'), destination_window, True, True, False, None, False
if( p + 4 > (uint8_t*)afterEnd)
{
return BadLength;
}
swapl((uint32_t*)p);
p += 4;
//('int16_t',), x_offset, True, True, False, None, False
if( p + 2 > (uint8_t*)afterEnd)
{
return BadLength;
}
swaps((uint16_t*)p);
p += 2;
//('int16_t',), y_offset, True, True, False, None, False
if( p + 2 > (uint8_t*)afterEnd)
{
return BadLength;
}
swaps((uint16_t*)p);
p += 2;
if (p == afterEnd)
return Success;
else
return BadLength;
}
int
xcb_Shape_Offset_Check(void *data)
{
//type, field_type, field_name, visible, wire, auto, enum, isfd
uint8_t* p = (uint8_t*)data;
uint8_t* afterEnd = NULL;
//('uint8_t',), major_opcode, False, True, True, None, False
p += 1;
//('uint8_t',), minor_opcode, False, True, True, None, False
p += 1;
//('uint16_t',), length, False, True, True, None, False
afterEnd = ((uint8_t*)data) + 4 * ( *(uint16_t*)p );
p += 2;
//('xcb', 'Shape', 'KIND'), destination_kind, True, True, False, SK, False
p += 1;
//('uint8_t',), pad0, False, True, False, SK, False
p += 3;
//('xcb', 'WINDOW'), destination_window, True, True, False, None, False
p += 4;
//('int16_t',), x_offset, True, True, False, None, False
p += 2;
//('int16_t',), y_offset, True, True, False, None, False
p += 2;
if (p == afterEnd)
return Success;
else
return BadLength;
}
int
xcb_Shape_QueryExtents_SwapToClient(void *data)
{
//type, field_type, field_name, visible, wire, auto, enum, isfd
uint8_t* p = (uint8_t*)data;
uint8_t* afterEnd = NULL;
//('uint8_t',), major_opcode, False, True, True, None, False
p += 1;
//('uint8_t',), minor_opcode, False, True, True, None, False
p += 1;
//('uint16_t',), length, False, True, True, None, False
afterEnd = ((uint8_t*)data) + 4 * ( *(uint16_t*)p );
if( p + 2 > (uint8_t*)afterEnd)
{
return BadLength;
}
swaps((uint16_t*)p);
p += 2;
//('xcb', 'WINDOW'), destination_window, True, True, False, None, False
if( p + 4 > (uint8_t*)afterEnd)
{
return BadLength;
}
swapl((uint32_t*)p);
p += 4;
if (p == afterEnd)
return Success;
else
return BadLength;
}
int
xcb_Shape_QueryExtents_SwapFromClient(void *data)
{
//type, field_type, field_name, visible, wire, auto, enum, isfd
uint8_t* p = (uint8_t*)data;
uint8_t* afterEnd = NULL;
//('uint8_t',), major_opcode, False, True, True, None, False
p += 1;
//('uint8_t',), minor_opcode, False, True, True, None, False
p += 1;
//('uint16_t',), length, False, True, True, None, False
swaps((uint16_t*)p);
afterEnd = ((uint8_t*)data) + 4 * ( *(uint16_t*)p );
p += 2;
//('xcb', 'WINDOW'), destination_window, True, True, False, None, False
if( p + 4 > (uint8_t*)afterEnd)
{
return BadLength;
}
swapl((uint32_t*)p);
p += 4;
if (p == afterEnd)
return Success;
else
return BadLength;
}
int
xcb_Shape_QueryExtents_Check(void *data)
{
//type, field_type, field_name, visible, wire, auto, enum, isfd
uint8_t* p = (uint8_t*)data;
uint8_t* afterEnd = NULL;
//('uint8_t',), major_opcode, False, True, True, None, False
p += 1;
//('uint8_t',), minor_opcode, False, True, True, None, False
p += 1;
//('uint16_t',), length, False, True, True, None, False
afterEnd = ((uint8_t*)data) + 4 * ( *(uint16_t*)p );
p += 2;
//('xcb', 'WINDOW'), destination_window, True, True, False, None, False
p += 4;
if (p == afterEnd)
return Success;
else
return BadLength;
}
int
xcb_Shape_SelectInput_SwapToClient(void *data)
{
//type, field_type, field_name, visible, wire, auto, enum, isfd
uint8_t* p = (uint8_t*)data;
uint8_t* afterEnd = NULL;
//('uint8_t',), major_opcode, False, True, True, None, False
p += 1;
//('uint8_t',), minor_opcode, False, True, True, None, False
p += 1;
//('uint16_t',), length, False, True, True, None, False
afterEnd = ((uint8_t*)data) + 4 * ( *(uint16_t*)p );
if( p + 2 > (uint8_t*)afterEnd)
{
return BadLength;
}
swaps((uint16_t*)p);
p += 2;
//('xcb', 'WINDOW'), destination_window, True, True, False, None, False
if( p + 4 > (uint8_t*)afterEnd)
{
return BadLength;
}
swapl((uint32_t*)p);
p += 4;
//('uint8_t',), enable, True, True, False, None, False
p += 1;
//('uint8_t',), pad0, False, True, False, None, False
p += 3;
if (p == afterEnd)
return Success;
else
return BadLength;
}
int
xcb_Shape_SelectInput_SwapFromClient(void *data)
{
//type, field_type, field_name, visible, wire, auto, enum, isfd
uint8_t* p = (uint8_t*)data;
uint8_t* afterEnd = NULL;
//('uint8_t',), major_opcode, False, True, True, None, False
p += 1;
//('uint8_t',), minor_opcode, False, True, True, None, False
p += 1;
//('uint16_t',), length, False, True, True, None, False
swaps((uint16_t*)p);
afterEnd = ((uint8_t*)data) + 4 * ( *(uint16_t*)p );
p += 2;
//('xcb', 'WINDOW'), destination_window, True, True, False, None, False
if( p + 4 > (uint8_t*)afterEnd)
{
return BadLength;
}
swapl((uint32_t*)p);
p += 4;
//('uint8_t',), enable, True, True, False, None, False
p += 1;
//('uint8_t',), pad0, False, True, False, None, False
p += 3;
if (p == afterEnd)
return Success;
else
return BadLength;
}
int
xcb_Shape_SelectInput_Check(void *data)
{
//type, field_type, field_name, visible, wire, auto, enum, isfd
uint8_t* p = (uint8_t*)data;
uint8_t* afterEnd = NULL;
//('uint8_t',), major_opcode, False, True, True, None, False
p += 1;
//('uint8_t',), minor_opcode, False, True, True, None, False
p += 1;
//('uint16_t',), length, False, True, True, None, False
afterEnd = ((uint8_t*)data) + 4 * ( *(uint16_t*)p );
p += 2;
//('xcb', 'WINDOW'), destination_window, True, True, False, None, False
p += 4;
//('uint8_t',), enable, True, True, False, None, False
p += 1;
//('uint8_t',), pad0, False, True, False, None, False
p += 3;
if (p == afterEnd)
return Success;
else
return BadLength;
}
int
xcb_Shape_InputSelected_SwapToClient(void *data)
{
//type, field_type, field_name, visible, wire, auto, enum, isfd
uint8_t* p = (uint8_t*)data;
uint8_t* afterEnd = NULL;
//('uint8_t',), major_opcode, False, True, True, None, False
p += 1;
//('uint8_t',), minor_opcode, False, True, True, None, False
p += 1;
//('uint16_t',), length, False, True, True, None, False
afterEnd = ((uint8_t*)data) + 4 * ( *(uint16_t*)p );
if( p + 2 > (uint8_t*)afterEnd)
{
return BadLength;
}
swaps((uint16_t*)p);
p += 2;
//('xcb', 'WINDOW'), destination_window, True, True, False, None, False
if( p + 4 > (uint8_t*)afterEnd)
{
return BadLength;
}
swapl((uint32_t*)p);
p += 4;
if (p == afterEnd)
return Success;
else
return BadLength;
}
int
xcb_Shape_InputSelected_SwapFromClient(void *data)
{
//type, field_type, field_name, visible, wire, auto, enum, isfd
uint8_t* p = (uint8_t*)data;
uint8_t* afterEnd = NULL;
//('uint8_t',), major_opcode, False, True, True, None, False
p += 1;
//('uint8_t',), minor_opcode, False, True, True, None, False
p += 1;
//('uint16_t',), length, False, True, True, None, False
swaps((uint16_t*)p);
afterEnd = ((uint8_t*)data) + 4 * ( *(uint16_t*)p );
p += 2;
//('xcb', 'WINDOW'), destination_window, True, True, False, None, False
if( p + 4 > (uint8_t*)afterEnd)
{
return BadLength;
}
swapl((uint32_t*)p);
p += 4;
if (p == afterEnd)
return Success;
else
return BadLength;
}
int
xcb_Shape_InputSelected_Check(void *data)
{
//type, field_type, field_name, visible, wire, auto, enum, isfd
uint8_t* p = (uint8_t*)data;
uint8_t* afterEnd = NULL;
//('uint8_t',), major_opcode, False, True, True, None, False
p += 1;
//('uint8_t',), minor_opcode, False, True, True, None, False
p += 1;
//('uint16_t',), length, False, True, True, None, False
afterEnd = ((uint8_t*)data) + 4 * ( *(uint16_t*)p );
p += 2;
//('xcb', 'WINDOW'), destination_window, True, True, False, None, False
p += 4;
if (p == afterEnd)
return Success;
else
return BadLength;
}
int
xcb_Shape_GetRectangles_SwapToClient(void *data)
{
//type, field_type, field_name, visible, wire, auto, enum, isfd
uint8_t* p = (uint8_t*)data;
uint8_t* afterEnd = NULL;
//('uint8_t',), major_opcode, False, True, True, None, False
p += 1;
//('uint8_t',), minor_opcode, False, True, True, None, False
p += 1;
//('uint16_t',), length, False, True, True, None, False
afterEnd = ((uint8_t*)data) + 4 * ( *(uint16_t*)p );
if( p + 2 > (uint8_t*)afterEnd)
{
return BadLength;
}
swaps((uint16_t*)p);
p += 2;
//('xcb', 'WINDOW'), window, True, True, False, None, False
if( p + 4 > (uint8_t*)afterEnd)
{
return BadLength;
}
swapl((uint32_t*)p);
p += 4;
//('xcb', 'Shape', 'KIND'), source_kind, True, True, False, SK, False
p += 1;
//('uint8_t',), pad0, False, True, False, SK, False
p += 3;
if (p == afterEnd)
return Success;
else
return BadLength;
}
int
xcb_Shape_GetRectangles_SwapFromClient(void *data)
{
//type, field_type, field_name, visible, wire, auto, enum, isfd
uint8_t* p = (uint8_t*)data;
uint8_t* afterEnd = NULL;
//('uint8_t',), major_opcode, False, True, True, None, False
p += 1;
//('uint8_t',), minor_opcode, False, True, True, None, False
p += 1;
//('uint16_t',), length, False, True, True, None, False
swaps((uint16_t*)p);
afterEnd = ((uint8_t*)data) + 4 * ( *(uint16_t*)p );
p += 2;
//('xcb', 'WINDOW'), window, True, True, False, None, False
if( p + 4 > (uint8_t*)afterEnd)
{
return BadLength;
}
swapl((uint32_t*)p);
p += 4;
//('xcb', 'Shape', 'KIND'), source_kind, True, True, False, SK, False
p += 1;
//('uint8_t',), pad0, False, True, False, SK, False
p += 3;
if (p == afterEnd)
return Success;
else
return BadLength;
}
int
xcb_Shape_GetRectangles_Check(void *data)
{
//type, field_type, field_name, visible, wire, auto, enum, isfd
uint8_t* p = (uint8_t*)data;
uint8_t* afterEnd = NULL;
//('uint8_t',), major_opcode, False, True, True, None, False
p += 1;
//('uint8_t',), minor_opcode, False, True, True, None, False
p += 1;
//('uint16_t',), length, False, True, True, None, False
afterEnd = ((uint8_t*)data) + 4 * ( *(uint16_t*)p );
p += 2;
//('xcb', 'WINDOW'), window, True, True, False, None, False
p += 4;
//('xcb', 'Shape', 'KIND'), source_kind, True, True, False, SK, False
p += 1;
//('uint8_t',), pad0, False, True, False, SK, False
p += 3;
if (p == afterEnd)
return Success;
else
return BadLength;
}
int
xcb_shape_SwapToClient_dispatch(void *req)
{
long switch_item;
int return_val = 0;
xReq* request = (xReq*)req;
switch_item = request->data;
switch(switch_item)
{
case GEN_XCB_SHAPE_RECTANGLES:
return_val = xcb_Shape_Rectangles_SwapToClient((void*)request);
break;
case GEN_XCB_SHAPE_QUERY_VERSION:
return_val = xcb_Shape_QueryVersion_SwapToClient((void*)request);
break;
case GEN_XCB_SHAPE_COMBINE:
return_val = xcb_Shape_Combine_SwapToClient((void*)request);
break;
case GEN_XCB_SHAPE_MASK:
return_val = xcb_Shape_Mask_SwapToClient((void*)request);
break;
case GEN_XCB_SHAPE_QUERY_EXTENTS:
return_val = xcb_Shape_QueryExtents_SwapToClient((void*)request);
break;
case GEN_XCB_SHAPE_OFFSET:
return_val = xcb_Shape_Offset_SwapToClient((void*)request);
break;
case GEN_XCB_SHAPE_INPUT_SELECTED:
return_val = xcb_Shape_InputSelected_SwapToClient((void*)request);
break;
case GEN_XCB_SHAPE_SELECT_INPUT:
return_val = xcb_Shape_SelectInput_SwapToClient((void*)request);
break;
case GEN_XCB_SHAPE_GET_RECTANGLES:
return_val = xcb_Shape_GetRectangles_SwapToClient((void*)request);
break;
}
return return_val;
}
int
xcb_shape_SwapFromClient_dispatch(void *req)
{
long switch_item;
int return_val = 0;
xReq* request = (xReq*)req;
switch_item = request->data;
switch(switch_item)
{
case GEN_XCB_SHAPE_RECTANGLES:
return_val = xcb_Shape_Rectangles_SwapFromClient((void*)request);
break;
case GEN_XCB_SHAPE_QUERY_VERSION:
return_val = xcb_Shape_QueryVersion_SwapFromClient((void*)request);
break;
case GEN_XCB_SHAPE_COMBINE:
return_val = xcb_Shape_Combine_SwapFromClient((void*)request);
break;
case GEN_XCB_SHAPE_MASK:
return_val = xcb_Shape_Mask_SwapFromClient((void*)request);
break;
case GEN_XCB_SHAPE_QUERY_EXTENTS:
return_val = xcb_Shape_QueryExtents_SwapFromClient((void*)request);
break;
case GEN_XCB_SHAPE_OFFSET:
return_val = xcb_Shape_Offset_SwapFromClient((void*)request);
break;
case GEN_XCB_SHAPE_INPUT_SELECTED:
return_val = xcb_Shape_InputSelected_SwapFromClient((void*)request);
break;
case GEN_XCB_SHAPE_SELECT_INPUT:
return_val = xcb_Shape_SelectInput_SwapFromClient((void*)request);
break;
case GEN_XCB_SHAPE_GET_RECTANGLES:
return_val = xcb_Shape_GetRectangles_SwapFromClient((void*)request);
break;
}
return return_val;
}
int
xcb_shape_Check_dispatch(void *req)
{
long switch_item;
int return_val = 0;
xReq* request = (xReq*)req;
switch_item = request->data;
switch(switch_item)
{
case GEN_XCB_SHAPE_RECTANGLES:
return_val = xcb_Shape_Rectangles_Check((void*)request);
break;
case GEN_XCB_SHAPE_QUERY_VERSION:
return_val = xcb_Shape_QueryVersion_Check((void*)request);
break;
case GEN_XCB_SHAPE_COMBINE:
return_val = xcb_Shape_Combine_Check((void*)request);
break;
case GEN_XCB_SHAPE_MASK:
return_val = xcb_Shape_Mask_Check((void*)request);
break;
case GEN_XCB_SHAPE_QUERY_EXTENTS:
return_val = xcb_Shape_QueryExtents_Check((void*)request);
break;
case GEN_XCB_SHAPE_OFFSET:
return_val = xcb_Shape_Offset_Check((void*)request);
break;
case GEN_XCB_SHAPE_INPUT_SELECTED:
return_val = xcb_Shape_InputSelected_Check((void*)request);
break;
case GEN_XCB_SHAPE_SELECT_INPUT:
return_val = xcb_Shape_SelectInput_Check((void*)request);
break;
case GEN_XCB_SHAPE_GET_RECTANGLES:
return_val = xcb_Shape_GetRectangles_Check((void*)request);
break;
}
return return_val;
}
More information about the xorg-devel
mailing list