diff options
Diffstat (limited to 'hw/dmx/glxProxy/unpack.h')
-rw-r--r-- | hw/dmx/glxProxy/unpack.h | 41 |
1 files changed, 17 insertions, 24 deletions
diff --git a/hw/dmx/glxProxy/unpack.h b/hw/dmx/glxProxy/unpack.h index f4a957206..b4b73580c 100644 --- a/hw/dmx/glxProxy/unpack.h +++ b/hw/dmx/glxProxy/unpack.h @@ -63,7 +63,7 @@ extern xGLXSingleReply __glXReply; #define __GLX_PUT_RETVAL(a) \ __glXReply.retval = (a); - + #define __GLX_PUT_SIZE(a) \ __glXReply.size = (a); @@ -98,35 +98,34 @@ extern xGLXSingleReply __glXReply; #define __GLX_PUT_BYTE() \ *(GLbyte *)&__glXReply.pad3 = *(GLbyte *)answer - + #define __GLX_PUT_SHORT() \ *(GLshort *)&__glXReply.pad3 = *(GLshort *)answer - + #define __GLX_PUT_INT() \ *(GLint *)&__glXReply.pad3 = *(GLint *)answer - + #define __GLX_PUT_FLOAT() \ *(GLfloat *)&__glXReply.pad3 = *(GLfloat *)answer - + #define __GLX_PUT_DOUBLE() \ *(GLdouble *)&__glXReply.pad3 = *(GLdouble *)answer - + #define __GLX_SEND_BYTE_ARRAY(len) \ WriteToClient(client, __GLX_PAD((len)*__GLX_SIZE_INT8), (char *)answer) #define __GLX_SEND_SHORT_ARRAY(len) \ WriteToClient(client, __GLX_PAD((len)*__GLX_SIZE_INT16), (char *)answer) - + #define __GLX_SEND_INT_ARRAY(len) \ WriteToClient(client, (len)*__GLX_SIZE_INT32, (char *)answer) - + #define __GLX_SEND_FLOAT_ARRAY(len) \ WriteToClient(client, (len)*__GLX_SIZE_FLOAT32, (char *)answer) - + #define __GLX_SEND_DOUBLE_ARRAY(len) \ WriteToClient(client, (len)*__GLX_SIZE_FLOAT64, (char *)answer) - #define __GLX_SEND_VOID_ARRAY(len) __GLX_SEND_BYTE_ARRAY(len) #define __GLX_SEND_UBYTE_ARRAY(len) __GLX_SEND_BYTE_ARRAY(len) #define __GLX_SEND_USHORT_ARRAY(len) __GLX_SEND_SHORT_ARRAY(len) @@ -144,19 +143,18 @@ extern xGLXSingleReply __glXReply; GLbyte *swapPC; \ GLbyte *swapEnd - #define __GLX_SWAP_INT(pc) \ sw = ((GLbyte *)(pc))[0]; \ ((GLbyte *)(pc))[0] = ((GLbyte *)(pc))[3]; \ ((GLbyte *)(pc))[3] = sw; \ sw = ((GLbyte *)(pc))[1]; \ ((GLbyte *)(pc))[1] = ((GLbyte *)(pc))[2]; \ - ((GLbyte *)(pc))[2] = sw; + ((GLbyte *)(pc))[2] = sw; #define __GLX_SWAP_SHORT(pc) \ sw = ((GLbyte *)(pc))[0]; \ ((GLbyte *)(pc))[0] = ((GLbyte *)(pc))[1]; \ - ((GLbyte *)(pc))[1] = sw; + ((GLbyte *)(pc))[1] = sw; #define __GLX_SWAP_DOUBLE(pc) \ sw = ((GLbyte *)(pc))[0]; \ @@ -170,7 +168,7 @@ extern xGLXSingleReply __glXReply; ((GLbyte *)(pc))[5] = sw; \ sw = ((GLbyte *)(pc))[3]; \ ((GLbyte *)(pc))[3] = ((GLbyte *)(pc))[4]; \ - ((GLbyte *)(pc))[4] = sw; + ((GLbyte *)(pc))[4] = sw; #define __GLX_SWAP_FLOAT(pc) \ sw = ((GLbyte *)(pc))[0]; \ @@ -178,7 +176,7 @@ extern xGLXSingleReply __glXReply; ((GLbyte *)(pc))[3] = sw; \ sw = ((GLbyte *)(pc))[1]; \ ((GLbyte *)(pc))[1] = ((GLbyte *)(pc))[2]; \ - ((GLbyte *)(pc))[2] = sw; + ((GLbyte *)(pc))[2] = sw; #define __GLX_SWAP_INT_ARRAY(pc, count) \ swapPC = ((GLbyte *)(pc)); \ @@ -187,7 +185,7 @@ extern xGLXSingleReply __glXReply; __GLX_SWAP_INT(swapPC); \ swapPC += __GLX_SIZE_INT32; \ } - + #define __GLX_SWAP_SHORT_ARRAY(pc, count) \ swapPC = ((GLbyte *)(pc)); \ swapEnd = ((GLbyte *)(pc)) + (count)*__GLX_SIZE_INT16;\ @@ -195,7 +193,7 @@ extern xGLXSingleReply __glXReply; __GLX_SWAP_SHORT(swapPC); \ swapPC += __GLX_SIZE_INT16; \ } - + #define __GLX_SWAP_DOUBLE_ARRAY(pc, count) \ swapPC = ((GLbyte *)(pc)); \ swapEnd = ((GLbyte *)(pc)) + (count)*__GLX_SIZE_FLOAT64;\ @@ -203,7 +201,7 @@ extern xGLXSingleReply __glXReply; __GLX_SWAP_DOUBLE(swapPC); \ swapPC += __GLX_SIZE_FLOAT64; \ } - + #define __GLX_SWAP_FLOAT_ARRAY(pc, count) \ swapPC = ((GLbyte *)(pc)); \ swapEnd = ((GLbyte *)(pc)) + (count)*__GLX_SIZE_FLOAT32;\ @@ -222,9 +220,4 @@ extern xGLXSingleReply __glXReply; #define __GLX_SWAP_REPLY_SIZE() \ __GLX_SWAP_INT(&__glXReply.size) -#endif /* !__GLX_unpack_h__ */ - - - - - +#endif /* !__GLX_unpack_h__ */ |